Fix last used source pinned status

This commit is contained in:
arkon 2020-08-01 18:23:46 -04:00
parent 0d15cbe334
commit 4efc195548

View File

@ -103,7 +103,10 @@ class SourcePresenter(
}
private fun updateLastUsedSource(sourceId: Long) {
val source = (sourceManager.get(sourceId) as? CatalogueSource)?.let { SourceItem(it) }
val source = (sourceManager.get(sourceId) as? CatalogueSource)?.let {
val isPinned = it.id.toString() in preferences.pinnedSources().get()
SourceItem(it, null, isPinned)
}
source?.let { view?.setLastUsedSource(it) }
}