Browse Source

1.修改策略更新的提示时机。

20241218TB223FC(测试jar包)
wangwanlei 10 months ago
parent
commit
a5875b8d02

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

181
             spUtils.saveJson(Const.STRATEGYBEANKEY, it)
181
             spUtils.saveJson(Const.STRATEGYBEANKEY, it)
182
             StrategyUtils.setStrategy(it)
182
             StrategyUtils.setStrategy(it)
183
             useTimeStrategy()
183
             useTimeStrategy()
184
+            updateStrategyFlag=true
185
+            if (updateTimeFlag){
186
+                showSucessToast()
187
+                updateStrategyFlag=false
188
+            }
184
         }
189
         }
185
         viewModel.appStrategyData.observe(this) {
190
         viewModel.appStrategyData.observe(this) {
186
             //存储app时间策略
191
             //存储app时间策略
187
             spUtils.saveJson(Const.APPSTRATEGYBEANKEY, it)
192
             spUtils.saveJson(Const.APPSTRATEGYBEANKEY, it)
188
-            showSucessToast()
193
+            updateTimeFlag=true
194
+            if (updateStrategyFlag){
195
+                showSucessToast()
196
+                updateTimeFlag=false
197
+            }
189
         }
198
         }
190
         viewModel.padInfoData.observe(this) {
199
         viewModel.padInfoData.observe(this) {
191
             //存储信息上传时间
200
             //存储信息上传时间
722
 
731
 
723
             Const.CODE2008.toString() -> {
732
             Const.CODE2008.toString() -> {
724
                 postLogPush(8)
733
                 postLogPush(8)
725
-                currentSpUtils.setParam(Const.EXIT_CONTROL,true)
726
-                StrategyUtils.releaseControl(this)
727
             }
734
             }
728
 
735
 
729
             Const.LOGAPPSTART -> {
736
             Const.LOGAPPSTART -> {

Loading…
Cancel
Save