mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
@@ -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 == '黑名单') {
|
||||
|
||||
Reference in New Issue
Block a user