Closed icefields closed 5 months ago
That affects the username too. When I open with api token that says error instead of username
yes, "ERROR" is my debug error string to make it clear to me that the data is unavailable. You're not getting the username, that's why you see ERROR as your username. I removed token login option for now, I will close this issue and open a new feature ticket "Enable token login". Users logging in with a token won't be able to edit playlists and all the other features that depend on the username will be disabled.
When logging in using a token (instead of a username/password combination), no username is retrieved from the server, this is causing a crash on playlists, since I use the username to determine which playlists the user is allowed to edit.
"kotlin.UninitializedPropertyAccessException: lateinit property currentUsername has not been initialized\n\tat luci.sixsixsix.powerampache2.presentation.screens.playlists.PlaylistsViewModel.isCurrentUserOwner(PlaylistsViewModel.kt:51)\n\tat luci.sixsixsix.powerampache2.presentation.screens.playlists.PlaylistsScreenKt$PlaylistsScreen$2$1$2$1$invoke$$inlined$itemsIndexed$default$3.invoke(LazyDsl.kt:434)\n\tat luci.sixsixsix.powerampache2.presentation.screens.playlists.PlaylistsScreenKt$PlaylistsScreen$2$1$2$1$invoke$$inlined$itemsIndexed$default$3.invoke(LazyDsl.kt:180)\n\tat