feat: hot rcmd entrance

Closes #151

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-14 11:54:40 +08:00
parent d4b005f6ae
commit c1104c931b
7 changed files with 176 additions and 20 deletions

View File

@@ -342,6 +342,9 @@ class GStorage {
static bool get mergeDanmaku =>
GStorage.setting.get(SettingBoxKey.mergeDanmaku, defaultValue: false);
static bool get showHotRcmd =>
GStorage.setting.get(SettingBoxKey.showHotRcmd, defaultValue: false);
static List<double> get dynamicDetailRatio => List<double>.from(setting
.get(SettingBoxKey.dynamicDetailRatio, defaultValue: [60.0, 40.0]));
@@ -562,6 +565,7 @@ class SettingBoxKey {
refreshDisplacement = 'refreshDisplacement',
showVipDanmaku = 'showVipDanmaku',
mergeDanmaku = 'mergeDanmaku',
showHotRcmd = 'showHotRcmd',
// Sponsor Block
enableSponsorBlock = 'enableSponsorBlock',

View File

@@ -63,8 +63,12 @@ class Utils {
);
}
static void handleWebview(String url, {bool off = false}) {
if (GStorage.openInBrowser) {
static void handleWebview(
String url, {
bool off = false,
bool inApp = false,
}) {
if (inApp.not && GStorage.openInBrowser) {
launchURL(url);
} else {
if (off) {