From 9e907f9151918defd55fe56d91cf1af6660d6847 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Fri, 8 Sep 2023 18:35:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BD=AC=E5=8F=91=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E3=80=81=E5=8A=A8=E6=80=81=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E5=8A=A0tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/dynamics/controller.dart | 3 --- lib/pages/dynamics/deatil/view.dart | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/pages/dynamics/controller.dart b/lib/pages/dynamics/controller.dart index 4ab06faa..5b524510 100644 --- a/lib/pages/dynamics/controller.dart +++ b/lib/pages/dynamics/controller.dart @@ -162,9 +162,6 @@ class DynamicsController extends GetxController { /// 纯文字动态查看 case 'DYNAMIC_TYPE_WORD': print('纯文本'); - if (item.modules.moduleDynamic.major.draw == null) { - return; - } Get.toNamed('/dynamicDetail', arguments: {'item': item, 'floor': floor}); break; diff --git a/lib/pages/dynamics/deatil/view.dart b/lib/pages/dynamics/deatil/view.dart index 6a779ba3..b17eb78b 100644 --- a/lib/pages/dynamics/deatil/view.dart +++ b/lib/pages/dynamics/deatil/view.dart @@ -38,15 +38,25 @@ class _DynamicDetailPageState extends State { // floor 1原创 2转发 if (Get.arguments['floor'] == 1) { oid = int.parse(Get.arguments['item'].basic!['comment_id_str']); + print(oid); } else { - oid = Get.arguments['item'].modules.moduleDynamic.major.draw.id; + try { + String type = Get.arguments['item'].modules.moduleDynamic.major.type; + + /// TODO + if (type == 'MAJOR_TYPE_OPUS') { + } else { + oid = Get.arguments['item'].modules.moduleDynamic.major.draw.id; + } + } catch (_) {} } int commentType = Get.arguments['item'].basic!['comment_type'] ?? 11; type = (commentType == 0) ? 11 : commentType; action = Get.arguments.containsKey('action') ? Get.arguments['action'] : null; - _dynamicDetailController = Get.put(DynamicDetailController(oid, type)); + _dynamicDetailController = + Get.put(DynamicDetailController(oid, type), tag: oid.toString()); _futureBuilderFuture = _dynamicDetailController!.queryReplyList(); titleStreamC = StreamController(); scrollController.addListener(_listen);