Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-25 18:12:33 +08:00
parent b5fe0faeec
commit 99602eea95
4 changed files with 18 additions and 16 deletions

View File

@@ -629,7 +629,7 @@ class Vote {
Vote.fromJson(Map<String, dynamic> json) {
joinNum = Utils.safeToInt(json['join_num']);
voteId = Utils.safeToInt(json['vote_id']);
title = json['title'];
title = _parseString(json['title']) ?? _parseString(json['desc']);
}
}

View File

@@ -435,11 +435,12 @@ Widget addWidget(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
vote.title!,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
if (vote.title case final title?)
Text(
title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
Text(
'${NumUtils.numFormat(vote.joinNum)}人参与',
maxLines: 1,

View File

@@ -640,16 +640,16 @@ List<SettingsModel> get extraSettings => [
setKey: SettingBoxKey.enableCommAntifraud,
defaultVal: false,
),
const SwitchModel(
title: '使用「哔哩发评反诈」检查评论',
subtitle: '仅对Android生效',
leading: Icon(
FontAwesomeIcons.b,
size: 22,
if (Platform.isAndroid)
const SwitchModel(
title: '使用「哔哩发评反诈」检查评论',
leading: Icon(
FontAwesomeIcons.b,
size: 22,
),
setKey: SettingBoxKey.biliSendCommAntifraud,
defaultVal: false,
),
setKey: SettingBoxKey.biliSendCommAntifraud,
defaultVal: false,
),
const SwitchModel(
title: '发布/转发动态反诈',
subtitle: '发布/转发动态后检查动态是否可见',

View File

@@ -455,6 +455,7 @@ abstract final class Pref {
_setting.get(SettingBoxKey.enableCommAntifraud, defaultValue: false);
static bool get biliSendCommAntifraud =>
Platform.isAndroid &&
_setting.get(SettingBoxKey.biliSendCommAntifraud, defaultValue: false);
static bool get enableCreateDynAntifraud =>
@@ -658,7 +659,7 @@ abstract final class Pref {
static bool get dynamicColor =>
!Platform.isIOS &&
_setting.get(SettingBoxKey.dynamicColor, defaultValue: !Platform.isIOS);
_setting.get(SettingBoxKey.dynamicColor, defaultValue: true);
static bool get autoClearCache =>
_setting.get(SettingBoxKey.autoClearCache, defaultValue: false);