Minor bug fix (#2167)

## Description
- Fixes typo that could prevent restoring a page with artists or album
artists
- Clarified some javadocs

### Related issues
N/A

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-11-03 14:52:56 -05:00 • committed by GitHub
parent 06c1d622bb
commit d711760dbe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 11 deletions

View file

@ -16,7 +16,7 @@ import java.util.UUID
/** /**
* Represents the status of the most recently used server * Represents the status of the most recently used server
* *
* This can be read/written to shared preferences * This can be saved/retrieved from a [MostRecentServerProvider]
*/ */
sealed interface MostRecentServer { sealed interface MostRecentServer {
/** /**
@ -58,12 +58,12 @@ sealed interface MostRecentServer {
interface MostRecentServerProvider { interface MostRecentServerProvider {
/** /**
* Get the [MostRecentServer] from the shared preferences in [context] * Get the [MostRecentServer] from this provider
*/ */
fun get(): MostRecentServer fun get(): MostRecentServer
/** /**
* Save the [CurrentUser] as the most recent server into the shared preferences in [context] * Save the [CurrentUser] as the most recent server
*/ */
suspend fun save(current: CurrentUser) suspend fun save(current: CurrentUser)
@ -86,9 +86,6 @@ class MostRecentServerSharedPreferences(
) : MostRecentServerProvider { ) : MostRecentServerProvider {
private val prefs = getServerSharedPreferences(context) private val prefs = getServerSharedPreferences(context)
/**
* Get the [MostRecentServer] from the shared preferences in [context]
*/
override fun get(): MostRecentServer { override fun get(): MostRecentServer {
val serverId = prefs.getString(SERVER_ID_KEY, null)?.toUUIDOrNull() val serverId = prefs.getString(SERVER_ID_KEY, null)?.toUUIDOrNull()
val serverUrl = prefs.getString(SERVER_URL_KEY, null) val serverUrl = prefs.getString(SERVER_URL_KEY, null)
@ -103,9 +100,6 @@ class MostRecentServerSharedPreferences(
} }
} }
/**
* Save the [CurrentUser] as the most recent server into the shared preferences in [context]
*/
override suspend fun save(current: CurrentUser) { override suspend fun save(current: CurrentUser) {
prefs.edit(true) { prefs.edit(true) {
putString(SERVER_ID_KEY, current.server.id.toServerString()) putString(SERVER_ID_KEY, current.server.id.toServerString())

View file

@ -436,7 +436,7 @@ val requestSerializersModule =
subclass(GetStudiosRequest::class) subclass(GetStudiosRequest::class)
subclass(GetRecordingsRequest::class) subclass(GetRecordingsRequest::class)
subclass(GetLiveTvChannelsRequest::class) subclass(GetLiveTvChannelsRequest::class)
subclass(GetArtistsHandler::class) subclass(GetArtistsRequest::class)
subclass(GetAlbumArtistsHandler::class) subclass(GetAlbumArtistsRequest::class)
} }
} }