Skip to content

Commit

Permalink
Fix selecting homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
Blatzar committed Sep 11, 2022
1 parent 9c5f2ef commit 6f60298
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,13 @@ class HomeViewModel : ViewModel() {
if (!forceReload && api?.let { expandable[it.name]?.list?.list?.isNotEmpty() } == true) {
return@launchSafe
}
// If the plugin isn't loaded yet. (Does not set the key)
if (api == null) {
loadAndCancel(noneApi)
} else if (preferredApiName == noneApi.name) {

if (preferredApiName == noneApi.name) {
setKey(USER_SELECTED_HOMEPAGE_API, noneApi.name)
loadAndCancel(noneApi)
// If the plugin isn't loaded yet. (Does not set the key)
} else if (api == null) {
loadAndCancel(noneApi)
} else if (preferredApiName == randomApi.name) {
val validAPIs = context?.filterProviderByPreferredMedia()
if (validAPIs.isNullOrEmpty()) {
Expand Down

0 comments on commit 6f60298

Please sign in to comment.