Add allowOverride app source option

This commit is contained in:
Michael Wood
2025-05-12 13:18:16 +02:00
parent 8d54824a7d
commit 1d69e42949
3 changed files with 11 additions and 3 deletions

View File

@@ -407,8 +407,14 @@ class AddAppPageState extends State<AddAppPage> {
defaultValue: pickedSourceOverride ?? '',
[
MapEntry('', tr('none')),
...sourceProvider.sources.map(
(s) => MapEntry(s.runtimeType.toString(), s.name))
...sourceProvider.sources
.where((s) =>
s.allowOverride ||
(pickedSource != null &&
pickedSource.runtimeType ==
s.runtimeType))
.map((s) =>
MapEntry(s.runtimeType.toString(), s.name))
],
label: tr('overrideSource'))
]