Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-31 13:10:09 +08:00
parent dbc7bcd0dd
commit 8964197b73
68 changed files with 560 additions and 293 deletions

View File

@@ -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);

View File

@@ -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;
}