opt.: snippet auto run ids

This commit is contained in:
lollipopkit
2024-02-20 15:03:45 +08:00
parent 828752e354
commit 813cfb56a2

View File

@@ -168,6 +168,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
valueListenable: _autoRunOn, valueListenable: _autoRunOn,
builder: (_, vals, __) { builder: (_, vals, __) {
return ListTile( return ListTile(
leading: const Icon(Icons.settings_remote, size: 19),
title: Text(l10n.autoRun), title: Text(l10n.autoRun),
trailing: const Icon(Icons.keyboard_arrow_right), trailing: const Icon(Icons.keyboard_arrow_right),
subtitle: vals.isEmpty subtitle: vals.isEmpty
@@ -178,6 +179,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
onTap: () async { onTap: () async {
vals.removeWhere((e) => !Pros.server.serverOrder.contains(e));
final serverIds = await context.showPickDialog( final serverIds = await context.showPickDialog(
items: Pros.server.serverOrder, items: Pros.server.serverOrder,
initial: vals, initial: vals,