Fix pinned tags changing positions when renamed

This commit is contained in:
MM20
2024-10-20 22:16:27 +02:00
parent 52bba7f5f2
commit bbaba3aad9
3 changed files with 34 additions and 2 deletions
@@ -51,8 +51,7 @@ internal class TagsServiceImpl(
).first()
val oldTag = Tag(tag)
if (pinnedTags.any { it.key == oldTag.key }) {
searchableRepository.update(oldTag, pinned = false)
searchableRepository.update(Tag(newName), pinned = true)
searchableRepository.replace(oldTag.key, Tag(newName))
}
}