mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Fix several UI focus issues (#81)
Remembers the page position & focused item on both Movie & Series detail pages Only loads similar movies & series once so that if you click on one and go back, it doesn't refresh the entire list Remember the tab on the Favorite page (if remember tabs is enabled in settings)
This commit is contained in:
parent
c4df751918
commit
f1f6b729aa
8 changed files with 241 additions and 153 deletions
|
|
@ -11,6 +11,15 @@ interface RememberTabManager {
|
|||
preferences: UserPreferences,
|
||||
itemId: UUID,
|
||||
defaultTab: Int,
|
||||
): Int = getRememberedTab(preferences, itemId.toString(), defaultTab)
|
||||
|
||||
/**
|
||||
* If enabled, get the remembered tab index for the given item
|
||||
*/
|
||||
fun getRememberedTab(
|
||||
preferences: UserPreferences,
|
||||
itemId: String,
|
||||
defaultTab: Int,
|
||||
): Int
|
||||
|
||||
/**
|
||||
|
|
@ -20,5 +29,14 @@ interface RememberTabManager {
|
|||
preferences: UserPreferences,
|
||||
itemId: UUID,
|
||||
tabIndex: Int,
|
||||
) = saveRememberedTab(preferences, itemId.toString(), tabIndex)
|
||||
|
||||
/**
|
||||
* If enabled, save the remembered tab index for the given item
|
||||
*/
|
||||
fun saveRememberedTab(
|
||||
preferences: UserPreferences,
|
||||
itemId: String,
|
||||
tabIndex: Int,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue