feat: setting to keep screen on

This commit is contained in:
2024-07-16 06:50:36 +02:00
committed by Illusion
parent 6af9de24f4
commit d2b4cbb535
15 changed files with 163 additions and 106 deletions
@@ -96,7 +96,9 @@ class HomeViewModel(private val homeRepository: HomeRepository): ViewModel() {
}
fun setSong(song: NotificationEvent) {
_uiState.value = _uiState.value.copy(isLoading = true, notification = song, error = null)
_uiState.update { state ->
state.copy(isLoading = true, notification = song, error = null)
}
}
fun makeRequestToGenius(song: String, artist: String) {