From d711760dbefed42ae3cddebac939fbafc2da8dc1 Mon Sep 17 00:00:00 2001 From: Damontecres Date: Tue, 3 Nov 2026 14:52:56 -0500 Subject: [PATCH] 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 --- .../damontecres/wholphin/data/MostRecentServer.kt | 12 +++--------- .../damontecres/wholphin/util/ApiRequestPager.kt | 4 ++-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/github/damontecres/wholphin/data/MostRecentServer.kt b/app/src/main/java/com/github/damontecres/wholphin/data/MostRecentServer.kt index b46a5f33..5139fb73 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/data/MostRecentServer.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/data/MostRecentServer.kt @@ -16,7 +16,7 @@ import java.util.UUID /** * 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 { /** @@ -58,12 +58,12 @@ sealed interface MostRecentServer { interface MostRecentServerProvider { /** - * Get the [MostRecentServer] from the shared preferences in [context] + * Get the [MostRecentServer] from this provider */ 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) @@ -86,9 +86,6 @@ class MostRecentServerSharedPreferences( ) : MostRecentServerProvider { private val prefs = getServerSharedPreferences(context) - /** - * Get the [MostRecentServer] from the shared preferences in [context] - */ override fun get(): MostRecentServer { val serverId = prefs.getString(SERVER_ID_KEY, null)?.toUUIDOrNull() 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) { prefs.edit(true) { putString(SERVER_ID_KEY, current.server.id.toServerString()) diff --git a/app/src/main/java/com/github/damontecres/wholphin/util/ApiRequestPager.kt b/app/src/main/java/com/github/damontecres/wholphin/util/ApiRequestPager.kt index a82201a9..2f98fccc 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/util/ApiRequestPager.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/util/ApiRequestPager.kt @@ -436,7 +436,7 @@ val requestSerializersModule = subclass(GetStudiosRequest::class) subclass(GetRecordingsRequest::class) subclass(GetLiveTvChannelsRequest::class) - subclass(GetArtistsHandler::class) - subclass(GetAlbumArtistsHandler::class) + subclass(GetArtistsRequest::class) + subclass(GetAlbumArtistsRequest::class) } }