From a6c914cf7f0a5efbf4abdaa0e549bf65cbe04388 Mon Sep 17 00:00:00 2001 From: tzugen Date: Tue, 4 May 2021 09:49:47 +0200 Subject: [PATCH] Make the server setting model a local val --- .../kotlin/org/moire/ultrasonic/fragment/SelectAlbumFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultrasonic/src/main/kotlin/org/moire/ultrasonic/fragment/SelectAlbumFragment.kt b/ultrasonic/src/main/kotlin/org/moire/ultrasonic/fragment/SelectAlbumFragment.kt index 6c024294..63694ff9 100644 --- a/ultrasonic/src/main/kotlin/org/moire/ultrasonic/fragment/SelectAlbumFragment.kt +++ b/ultrasonic/src/main/kotlin/org/moire/ultrasonic/fragment/SelectAlbumFragment.kt @@ -93,7 +93,6 @@ class SelectAlbumFragment : Fragment() { private var cancellationToken: CancellationToken? = null private val activeServerProvider: ActiveServerProvider by inject() - private val serverSettingsModel: ServerSettingsModel by viewModel() private val model: SelectAlbumModel by viewModels() private val random: Random = SecureRandom() @@ -133,6 +132,7 @@ class SelectAlbumFragment : Fragment() { requireContext(), view as ViewGroup ) { selectedFolderId -> if (!isOffline(context)) { + val serverSettingsModel: ServerSettingsModel by viewModel() val currentSetting = activeServerProvider.getActiveServer() currentSetting.musicFolderId = selectedFolderId serverSettingsModel.updateItem(currentSetting)