Browse Source

1.退出登陆弹窗禁止多次弹出。

0423x6e6f
wangwanlei 1 week ago
parent
commit
227a56348a
1 changed files with 18 additions and 10 deletions
  1. 18
    10
      app/src/main/java/com/xhly/manageapp/ui/main/activity/MainActivity.kt

+ 18
- 10
app/src/main/java/com/xhly/manageapp/ui/main/activity/MainActivity.kt View File

@@ -849,18 +849,26 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(), Downloa
849 849
         //禁用注销则需要输入密码才能注销,不限制则直接注销登录
850 850
         if (schoolDeviceSetBean != null && schoolDeviceSetBean.logout == 1) {
851 851
             //禁用注销
852
-            showEditDialog()
852
+            if (accountDialog!=null&&accountDialog?.isShow!!){
853
+                return
854
+            }else{
855
+                showEditDialog()
856
+            }
853 857
         } else {
854
-            showTwoBtnDialog(
855
-                getString(R.string.loginout), getString(R.string.loginouttips)
856
-            ) {
857
-                try {
858
-                    val userBean = spUtils.getFromJson(
859
-                        Const.USERINFO, UserBean().javaClass
860
-                    ) as UserBean
861
-                    viewModel.loginOut(userBean.userid.toString(), "")
862
-                } catch (e: Exception) {
858
+            if (quitAccountDialog!=null&&quitAccountDialog?.isShow!!){
859
+                return
860
+            }else{
861
+                showTwoBtnDialog(
862
+                    getString(R.string.loginout), getString(R.string.loginouttips)
863
+                ) {
864
+                    try {
865
+                        val userBean = spUtils.getFromJson(
866
+                            Const.USERINFO, UserBean().javaClass
867
+                        ) as UserBean
868
+                        viewModel.loginOut(userBean.userid.toString(), "")
869
+                    } catch (e: Exception) {
863 870
 
871
+                    }
864 872
                 }
865 873
             }
866 874
         }

Loading…
Cancel
Save