@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
44import android.content.Intent
55import android.net.Uri
66import android.widget.Toast
7+ import androidx.activity.compose.BackHandler
78import androidx.activity.compose.rememberLauncherForActivityResult
89import androidx.activity.result.contract.ActivityResultContracts
910import androidx.compose.material.icons.Icons
@@ -27,8 +28,6 @@ import androidx.navigation3.ui.NavDisplay
2728import kotlinx.coroutines.Dispatchers
2829import kotlinx.coroutines.launch
2930import kotlinx.coroutines.withContext
30- import org.nqmgaming.aneko.core.service.AnimationService
31- import org.nqmgaming.aneko.core.util.extension.checkNotificationPermission
3231import org.nqmgaming.aneko.presentation.AnekoViewModel
3332import org.nqmgaming.aneko.presentation.BottomTab
3433import org.nqmgaming.aneko.presentation.ExploreKey
@@ -41,7 +40,6 @@ import org.nqmgaming.aneko.presentation.home.HomeScreen
4140import org.nqmgaming.aneko.presentation.setting.LanguageScreen
4241import org.nqmgaming.aneko.presentation.setting.ThemeScreen
4342import timber.log.Timber
44- import kotlin.collections.forEach
4543
4644@SuppressLint(" UnusedMaterial3ScaffoldPaddingParameter" )
4745@Composable
@@ -103,6 +101,11 @@ fun HomeAppScreen(
103101 }
104102 )
105103
104+ BackHandler (enabled = currentTab != BottomTab .HOME && currentBackStack.size <= 1 ) {
105+ currentTab = BottomTab .HOME
106+ showBottomBar = true
107+ }
108+
106109 Scaffold (
107110 bottomBar = {
108111 if (! showBottomBar) return @Scaffold
0 commit comments