Fix DeleteSortTag not re-indexing tags
This commit is contained in:
parent
8facc5346f
commit
33fc5fcc0e
@ -1,7 +1,6 @@
|
|||||||
package eu.kanade.domain.manga.interactor
|
package eu.kanade.domain.manga.interactor
|
||||||
|
|
||||||
import eu.kanade.domain.library.service.LibraryPreferences
|
import eu.kanade.domain.library.service.LibraryPreferences
|
||||||
import eu.kanade.tachiyomi.util.preference.minusAssign
|
|
||||||
|
|
||||||
class DeleteSortTag(
|
class DeleteSortTag(
|
||||||
private val preferences: LibraryPreferences,
|
private val preferences: LibraryPreferences,
|
||||||
@ -9,8 +8,10 @@ class DeleteSortTag(
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
fun await(tag: String) {
|
fun await(tag: String) {
|
||||||
getSortTag.await().withIndex().find { it.value == tag }?.let {
|
preferences.sortTagsForLibrary().set(
|
||||||
preferences.sortTagsForLibrary() -= CreateSortTag.encodeTag(it.index, it.value)
|
(getSortTag.await() - tag).mapIndexed { index, s ->
|
||||||
}
|
CreateSortTag.encodeTag(index, s)
|
||||||
|
}.toSet(),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user