diff --git a/lib/http/search.dart b/lib/http/search.dart index 706a3627f..d69fcebe2 100644 --- a/lib/http/search.dart +++ b/lib/http/search.dart @@ -176,8 +176,8 @@ class SearchHttp { } static Future> pgcInfo({ - int? seasonId, - int? epId, + dynamic seasonId, + dynamic epId, }) async { var res = await Request().get( Api.pgcInfo, @@ -193,7 +193,7 @@ class SearchHttp { } } - static Future episodeInfo({int? epId}) async { + static Future episodeInfo({dynamic epId}) async { var res = await Request().get( Api.episodeInfo, queryParameters: { diff --git a/lib/pages/common/dyn/common_dyn_controller.dart b/lib/pages/common/dyn/common_dyn_controller.dart index 32dc635e5..00bca0be8 100644 --- a/lib/pages/common/dyn/common_dyn_controller.dart +++ b/lib/pages/common/dyn/common_dyn_controller.dart @@ -13,7 +13,7 @@ abstract class CommonDynController extends ReplyController late final AnimationController fabAnimationCtr; late final Animation fabAnim; - final RxBool showTitle = false.obs; + late final RxBool showTitle = false.obs; late final horizontalPreview = Pref.horizontalPreview; late final List ratio = Pref.dynamicDetailRatio; diff --git a/lib/pages/common/dyn/common_dyn_page.dart b/lib/pages/common/dyn/common_dyn_page.dart index 66a5f0186..ed0c728c3 100644 --- a/lib/pages/common/dyn/common_dyn_page.dart +++ b/lib/pages/common/dyn/common_dyn_page.dart @@ -60,9 +60,12 @@ abstract class CommonDynPageState extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Obx( - () => Text( - '${controller.count.value == -1 ? 0 : NumUtil.numFormat(controller.count.value)}条回复', - ), + () { + final count = controller.count.value; + return Text( + '${count == -1 ? 0 : NumUtil.numFormat(count)}条回复', + ); + }, ), SizedBox( height: 35, diff --git a/lib/pages/dynamics_detail/view.dart b/lib/pages/dynamics_detail/view.dart index 61bdf99b0..29e44d663 100644 --- a/lib/pages/dynamics_detail/view.dart +++ b/lib/pages/dynamics_detail/view.dart @@ -60,11 +60,12 @@ class _DynamicDetailPageState extends CommonDynPageState { padding: const EdgeInsets.only(right: 12), child: Obx( () { + final showTitle = controller.showTitle.value; return AnimatedOpacity( - opacity: controller.showTitle.value ? 1 : 0, + opacity: showTitle ? 1 : 0, duration: const Duration(milliseconds: 300), child: IgnorePointer( - ignoring: !controller.showTitle.value, + ignoring: !showTitle, child: AuthorPanel( item: controller.dynItem, isDetail: true,