Skip to content

Commit

Permalink
initialize currentUser after login, reduce logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kawaiiDango committed Apr 6, 2024
1 parent 8d7b9f5 commit 5505e3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/arn/scrobble/utils/BugReportUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import android.net.Uri
import android.os.Build
import androidx.core.content.ContextCompat
import androidx.core.content.FileProvider
import com.arn.scrobble.main.App
import com.arn.scrobble.BuildConfig
import com.arn.scrobble.R
import com.arn.scrobble.main.App
import com.arn.scrobble.utils.UiUtils.toast
import java.io.File

Expand Down Expand Up @@ -54,7 +54,7 @@ object BugReportUtils {
text += "\n\n[Describe the issue]\n[If it is related to scrobbling, mention the media player name]\n"
//keep the email in english

val log = Stuff.exec("logcat -d")
val log = Stuff.exec("logcat -i")
val logFile = File(App.context.cacheDir, "share/log.txt")
logFile.parentFile!!.mkdirs()
logFile.writeText(log)
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/arn/scrobble/utils/NavUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ object NavUtils {
val accountType = Scrobblables.current?.userAccount?.type

if (accountType == null || mainNotifierViewModel.drawerData.value == null) {
headerNavBinding.navName.text =
headerNavBinding.root.context.getString(R.string.app_name)
return
}

Expand Down Expand Up @@ -158,6 +160,9 @@ object NavUtils {
return@setOnClickListener
}

Scrobblables.currentScrobblableUser?.let {
mainNotifierViewModel.initializeCurrentUser(it)
}

val currentUser = mainNotifierViewModel.currentUser

Expand Down

0 comments on commit 5505e3d

Please sign in to comment.