File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
manami-app/src/main/kotlin/io/github/manamiproject/manami/app/state Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ internal object InternalState : State {
3737
3838 override fun addAllAnimeListEntries (anime : Collection <AnimeListEntry >) {
3939 animeList.addAll(anime.distinct())
40+
4041 val uris = anime.map { it.link }.filterIsInstance<Link >().map { it.uri }.toSet()
4142 watchList.removeIf { uris.contains(it.link.uri) }
4243 ignoreList.removeIf { uris.contains(it.link.uri) }
@@ -50,7 +51,9 @@ internal object InternalState : State {
5051
5152 override fun addAllWatchListEntries (anime : Collection <WatchListEntry >) {
5253 watchList.addAll(anime.distinct())
53- ignoreList.removeAll(anime.map { IgnoreListEntry (it) })
54+
55+ val uris = anime.map { it.link.uri }.toSet()
56+ ignoreList.removeIf { uris.contains(it.link.uri) }
5457 }
5558
5659 override fun removeWatchListEntry (entry : WatchListEntry ) {
@@ -61,7 +64,9 @@ internal object InternalState : State {
6164
6265 override fun addAllIgnoreListEntries (anime : Collection <IgnoreListEntry >) {
6366 ignoreList.addAll(anime.distinct())
64- watchList.removeAll(anime.map { WatchListEntry (it) })
67+
68+ val uris = anime.map { it.link.uri }.toSet()
69+ watchList.removeIf { uris.contains(it.link.uri) }
6570 }
6671
6772 override fun removeIgnoreListEntry (entry : IgnoreListEntry ) {
You can’t perform that action at this time.
0 commit comments