mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-19 01:56:53 +08:00
@@ -40,13 +40,20 @@ class PgcReviewChildPage extends StatefulWidget {
|
||||
|
||||
class _PgcReviewChildPageState extends State<PgcReviewChildPage>
|
||||
with AutomaticKeepAliveClientMixin {
|
||||
late final _tag = '${widget.mediaId}${widget.type.name}';
|
||||
late final _controller = Get.put(
|
||||
PgcReviewController(type: widget.type, mediaId: widget.mediaId),
|
||||
tag: _tag,
|
||||
);
|
||||
late final String _tag;
|
||||
late final PgcReviewController _controller;
|
||||
late final isLongReview = widget.type == PgcReviewType.long;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tag = '${widget.mediaId}${widget.type.name}';
|
||||
_controller = Get.put(
|
||||
PgcReviewController(type: widget.type, mediaId: widget.mediaId),
|
||||
tag: _tag,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
Get.delete<PgcReviewController>(tag: _tag);
|
||||
|
||||
@@ -46,7 +46,7 @@ class _PgcReviewPostPanelState extends State<PgcReviewPostPanel> {
|
||||
}
|
||||
|
||||
void _onScore(double dx) {
|
||||
int index = (dx / 50).toInt().clamp(0, 4);
|
||||
int index = (dx ~/ 50).clamp(0, 4);
|
||||
_enablePost.value = true;
|
||||
_score.value = index + 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user