Skip to content

Commit

Permalink
Graduate reactive homepage to stable
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Aug 8, 2024
1 parent 213fa1f commit f8c5345
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,6 @@ class UserPreferences(context: Context) : SharedPreferenceStore(
* Whether items shown in the screensaver are required to have an age rating set.
*/
var screensaverAgeRatingRequired = booleanPreference("screensaver_agerating_required", true)

/**
* Enable reactive homepage
*/
var homeReactive = booleanPreference("home_reactive", false)
}

init {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,13 @@ class HomeRowsFragment : RowsSupportFragment(), AudioEventListener, View.OnKeyLi

lifecycleScope.launch {
lifecycle.repeatOnLifecycle(Lifecycle.State.RESUMED) {
if (userPreferences[UserPreferences.homeReactive]) {
api.webSocket.subscribe<UserDataChangedMessage>()
.onEach { refreshRows(force = true, delayed = false) }
.launchIn(this)

api.webSocket.subscribe<LibraryChangedMessage>()
.onEach { refreshRows(force = true, delayed = false) }
.launchIn(this)
}
api.webSocket.subscribe<UserDataChangedMessage>()
.onEach { refreshRows(force = true, delayed = false) }
.launchIn(this)

api.webSocket.subscribe<LibraryChangedMessage>()
.onEach { refreshRows(force = true, delayed = false) }
.launchIn(this)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ class DeveloperPreferencesScreen : OptionsFragment() {
}
}

checkbox {
setTitle(R.string.enable_reactive_homepage)
setContent(R.string.enable_playback_module_description)
bind(userPreferences, UserPreferences.homeReactive)
}

// Only show in debug mode
// some strings are hardcoded because these options don't show in beta/release builds
if (BuildConfig.DEVELOPMENT) {
Expand Down

0 comments on commit f8c5345

Please sign in to comment.