mod: option show dyn actionbar

Closes #412

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-09 21:12:16 +08:00
parent 35a53bc8ac
commit 95e50e436b
6 changed files with 556 additions and 431 deletions

View File

@@ -25,6 +25,7 @@ class HtmlRenderController extends ReplyController {
RxBool loaded = false.obs;
late final horizontalPreview = GStorage.horizontalPreview;
late final showDynActionBar = GStorage.showDynActionBar;
@override
dynamic get sourceId => id;
@@ -35,16 +36,20 @@ class HtmlRenderController extends ReplyController {
id = Get.parameters['id']!;
dynamicType = Get.parameters['dynamicType']!;
type = dynamicType == 'picture' ? 11 : 12;
if (RegExp(r'^cv', caseSensitive: false).hasMatch(id)) {
UrlUtils.parseRedirectUrl('https://www.bilibili.com/read/$id/')
.then((url) {
if (url != null) {
_queryDyn(url.split('/').last);
}
});
} else {
_queryDyn(id);
if (showDynActionBar) {
if (RegExp(r'^cv', caseSensitive: false).hasMatch(id)) {
UrlUtils.parseRedirectUrl('https://www.bilibili.com/read/$id/')
.then((url) {
if (url != null) {
_queryDyn(url.split('/').last);
}
});
} else {
_queryDyn(id);
}
}
reqHtml();
}