mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-03 07:12:41 -08:00
Fix empty tag
This commit is contained in:
1 parent
9110a1aca6
commit
d06829ff7b
1 file changed
+5
-2
@@ -11,7 +11,10 @@ class Tags: Parcelable {
|
||||
constructor()
|
||||
|
||||
constructor(values: String): this() {
|
||||
mTags.addAll(values.removeSpaceChars().split(DELIMITER, DELIMITER1))
|
||||
mTags.addAll(values
|
||||
.split(DELIMITER, DELIMITER1)
|
||||
.filter { it.removeSpaceChars().isNotEmpty() }
|
||||
)
|
||||
}
|
||||
|
||||
constructor(parcel: Parcel) : this() {
|
||||
@@ -36,7 +39,7 @@ class Tags: Parcelable {
|
||||
}
|
||||
|
||||
fun put(tag: String) {
|
||||
if (tag.isNotEmpty() && !mTags.contains(tag))
|
||||
if (tag.removeSpaceChars().isNotEmpty() && !mTags.contains(tag))
|
||||
mTags.add(tag)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user