opt: push dyn

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-05 10:50:29 +08:00
parent 4aaaffbcea
commit ff30c8c2bf
8 changed files with 73 additions and 62 deletions

View File

@@ -69,6 +69,9 @@ class HtmlRenderController extends ReplyController {
late dynamic res;
if (dynamicType == 'opus' || dynamicType == 'picture') {
res = await HtmlHttp.reqHtml(id, dynamicType);
if (res != null) {
type = res['commentType'];
}
} else {
res = await HtmlHttp.reqReadHtml(id, dynamicType);
}

View File

@@ -216,17 +216,8 @@ class SearchDynamic extends StatelessWidget {
required String content,
}) {
return InkWell(
onTap: () async {
SmartDialog.showLoading();
dynamic res = await DynamicsHttp.dynamicDetail(id: id);
if (res['status']) {
SmartDialog.dismiss();
Get.toNamed('/dynamicDetail',
arguments: {'item': res['data'], 'floor': 1, 'action': 'detail'});
} else {
SmartDialog.dismiss();
SmartDialog.showToast(res['msg']);
}
onTap: () {
Utils.pushDynFromId(id);
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),