trim new tags
This commit is contained in:
parent
ffbf0bd8f2
commit
5b6eb44c05
2 changed files with 2 additions and 8 deletions
|
@ -423,13 +423,6 @@ class _AvesAppState extends State<AvesApp> with WidgetsBindingObserver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
void didHaveMemoryPressure() {
|
|
||||||
super.didHaveMemoryPressure();
|
|
||||||
debugPrint('App memory pressure');
|
|
||||||
imageCache.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeMetrics() => _updateCutoutInsets();
|
void didChangeMetrics() => _updateCutoutInsets();
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ class _TagEditorPageState extends State<TagEditorPage> {
|
||||||
builder: (context, value, child) {
|
builder: (context, value, child) {
|
||||||
return IconButton(
|
return IconButton(
|
||||||
icon: const Icon(AIcons.add),
|
icon: const Icon(AIcons.add),
|
||||||
onPressed: value.text.isEmpty ? null : () => _addCustomTag(_newTagTextController.text),
|
onPressed: value.text.trim().isEmpty ? null : () => _addCustomTag(_newTagTextController.text),
|
||||||
tooltip: l10n.tagEditorPageAddTagTooltip,
|
tooltip: l10n.tagEditorPageAddTagTooltip,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -296,6 +296,7 @@ class _TagEditorPageState extends State<TagEditorPage> {
|
||||||
}
|
}
|
||||||
|
|
||||||
void _addCustomTag(String newTag) {
|
void _addCustomTag(String newTag) {
|
||||||
|
newTag = newTag.trim();
|
||||||
if (newTag.isNotEmpty) {
|
if (newTag.isNotEmpty) {
|
||||||
_addTag(TagFilter(newTag));
|
_addTag(TagFilter(newTag));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue