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
|
||||
void didChangeMetrics() => _updateCutoutInsets();
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ class _TagEditorPageState extends State<TagEditorPage> {
|
|||
builder: (context, value, child) {
|
||||
return IconButton(
|
||||
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,
|
||||
);
|
||||
},
|
||||
|
@ -296,6 +296,7 @@ class _TagEditorPageState extends State<TagEditorPage> {
|
|||
}
|
||||
|
||||
void _addCustomTag(String newTag) {
|
||||
newTag = newTag.trim();
|
||||
if (newTag.isNotEmpty) {
|
||||
_addTag(TagFilter(newTag));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue