1、未登录不提示更新
This commit is contained in:
shenzuqiang 2026-03-12 14:20:59 +08:00
parent fe4f5b9ce1
commit 6a3d5594ea
2 changed files with 4 additions and 2 deletions

View File

@ -127,7 +127,10 @@ class MainActivity : ComponentActivity(), LoadingCallback {
when (event) {
// 软件更新提示
is GlobalEvent.ShowAppUpdateNotify -> {
showUpdateDialog = true
val loginInfo = PreferenceUtil.getLoginInfos()
if(loginInfo?.isNotEmpty() == true){
showUpdateDialog = true
}
}
// 小程序资源下载提示
is GlobalEvent.ShowUniDownloadNotify -> {

View File

@ -66,7 +66,6 @@ sealed class TabItem(val title: String, val router:String, val normalIconRes: In
@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter")
@Composable
fun MainScreen(generalViewModel: GeneralViewModel, loginViewModel: LoginViewModel) {
val context = LocalContext.current
val navController = rememberNavController()
val networkStatus by generalViewModel.networkStatus.observeAsState(initial = true)
val isNavigationBarVisible by generalViewModel.isNavigationBarVisible.observeAsState(initial = true)