Merge pull request #6132 from Bnyro/master

feat: remember selected channel group across app restarts
This commit is contained in:
Bnyro 2024-06-14 18:44:16 +02:00 committed by GitHub
commit 8e7999c080
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -139,4 +139,5 @@ object PreferenceKeys {
const val LAST_WATCHED_FEED_TIME = "last_watched_feed_time" const val LAST_WATCHED_FEED_TIME = "last_watched_feed_time"
const val AUTH_PREF_FILE = "auth" const val AUTH_PREF_FILE = "auth"
const val IMAGE_PROXY_URL = "image_proxy_url" const val IMAGE_PROXY_URL = "image_proxy_url"
const val SELECTED_CHANNEL_GROUP = "selected_channel_group"
} }

View File

@ -58,7 +58,10 @@ class SubscriptionsFragment : DynamicLayoutManagerFragment() {
private val viewModel: SubscriptionsViewModel by activityViewModels() private val viewModel: SubscriptionsViewModel by activityViewModels()
private val playerModel: PlayerViewModel by activityViewModels() private val playerModel: PlayerViewModel by activityViewModels()
private val channelGroupsModel: EditChannelGroupsModel by activityViewModels() private val channelGroupsModel: EditChannelGroupsModel by activityViewModels()
private var selectedFilterGroup = 0 private var selectedFilterGroup
set(value) = PreferenceHelper.putInt(PreferenceKeys.SELECTED_CHANNEL_GROUP, value)
get() = PreferenceHelper.getInt(PreferenceKeys.SELECTED_CHANNEL_GROUP, 0)
private var isCurrentTabSubChannels = false private var isCurrentTabSubChannels = false
private var isAppBarFullyExpanded = true private var isAppBarFullyExpanded = true