Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-29 13:35:51 +08:00
parent bcbfe5c849
commit 5979ddb60c
46 changed files with 3266 additions and 3293 deletions

View File

@@ -77,52 +77,50 @@ class _WhisperSettingsPageState extends State<WhisperSettingsPage> {
String? selected;
showDialog(
context: context,
builder: (context) {
return AlertDialog(
clipBehavior: Clip.hardEdge,
contentPadding: const EdgeInsets.symmetric(vertical: 12),
content: Column(
mainAxisSize: MainAxisSize.min,
children: item.redirect.windowSelect.item.map(
(e) {
if (e.selected) {
selected ??= e.text;
}
return ListTile(
dense: true,
onTap: () async {
if (!e.selected) {
Get.back();
for (final j in item.redirect.windowSelect.item) {
j.selected = false;
}
item.redirect.selectedSummary = e.text;
e.selected = true;
_controller.loadingState.refresh();
final settings = {key: item};
final res = await _controller.onSet(settings);
if (!res) {
for (final j in item.redirect.windowSelect.item) {
j.selected = j.text == selected;
}
item.redirect.selectedSummary = selected!;
_controller.loadingState.refresh();
}
builder: (context) => AlertDialog(
clipBehavior: Clip.hardEdge,
contentPadding: const EdgeInsets.symmetric(vertical: 12),
content: Column(
mainAxisSize: MainAxisSize.min,
children: item.redirect.windowSelect.item.map(
(e) {
if (e.selected) {
selected ??= e.text;
}
return ListTile(
dense: true,
onTap: () async {
if (!e.selected) {
Get.back();
for (final j in item.redirect.windowSelect.item) {
j.selected = false;
}
},
title: Text(
e.text,
style: TextStyle(
fontSize: 14,
color: e.selected ? theme.colorScheme.primary : null,
),
item.redirect.selectedSummary = e.text;
e.selected = true;
_controller.loadingState.refresh();
final settings = {key: item};
final res = await _controller.onSet(settings);
if (!res) {
for (final j in item.redirect.windowSelect.item) {
j.selected = j.text == selected;
}
item.redirect.selectedSummary = selected!;
_controller.loadingState.refresh();
}
}
},
title: Text(
e.text,
style: TextStyle(
fontSize: 14,
color: e.selected ? theme.colorScheme.primary : null,
),
);
},
).toList(),
),
);
},
),
);
},
).toList(),
),
),
);
} else if (item.redirect.otherPage.hasUrl()) {
if (item.redirect.title == '黑名单') {