From a28b9c4112bc6516badcd75335c45d2cb2d11b8c Mon Sep 17 00:00:00 2001 From: KingLucius Date: Tue, 6 Aug 2024 13:13:36 +0300 Subject: [PATCH] Update MainActivity.kt --- .../main/java/com/lagradost/cloudstream3/MainActivity.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt b/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt index 77a6d83f..03f0c357 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt @@ -29,6 +29,7 @@ import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import androidx.cardview.widget.CardView import androidx.constraintlayout.widget.ConstraintLayout +import androidx.core.view.GravityCompat import androidx.core.view.children import androidx.core.view.isGone import androidx.core.view.isInvisible @@ -1220,7 +1221,6 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener, BiometricCa ) newLocalBinding.root.viewTreeObserver.addOnGlobalFocusChangeListener { _, newFocus -> - //Log.d("King", "Focus => $newFocus") if (exceptionButtons.contains(newFocus?.id)) return@addOnGlobalFocusChangeListener centerView(newFocus) } @@ -1680,13 +1680,17 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener, BiometricCa showAccountSelectLinear() } - val profileImage = DataStoreHelper.getCurrentAccount()?.image + val profileImage = DataStoreHelper.getCurrentAccount()?.image ?: DataStoreHelper.getDefaultAccount(context).image if (navProfilePic != null) { navProfilePic.setImage(profileImage) } else { navProfileRoot?.isGone = true } + + /*headerView?.findViewById(R.id.nav_header_notification)?.setOnClickListener { + binding?.homeRoot?.openDrawer(GravityCompat.END, true) + }*/ } loadCache()