Fix stored stub sources not loading and being rewritten on every reload

Stub sources loaded from the database were written into a throwaway copy of the map, so they never reached the source manager. StubSource also becomes a data class, so a stored one compares equal to the same source again and isn't rewritten on every reload.
This commit is contained in:
AntsyLich
2026-09-27 22:43:48 +06:00
parent 6ee529c5aa
commit 0044cc73ec
2 changed files with 2 additions and 3 deletions
@@ -66,9 +66,8 @@ class AndroidSourceManager(
scope.launch {
sourceRepository.subscribeAll()
.collectLatest { sources ->
val mutableMap = stubSourcesMap.toMutableMap()
sources.forEach {
mutableMap[it.id] = it
stubSourcesMap[it.id] = it
}
}
}