Prevent adding new labels if there are some to add

This commit is contained in:
konrad 2019-03-23 19:59:24 +01:00
parent e9c70eade7
commit d184b0e47c
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 0 deletions

View File

@ -379,6 +379,11 @@ class _TaskEditPageState extends State<TaskEditPage> {
}
_createAndAddLabel(String labelTitle) {
// Only add a label if there are none to add
if(labelTitle == '' || _suggestedLabels.length > 0) {
return;
}
Label newLabel = Label(title: labelTitle);
VikunjaGlobal.of(context)
.labelService