fix(ui): 修复初始化页面导航状态和设置页面跳转逻辑
- 在InitActivity中重写onNewIntent方法以重置导航状态 - 移除SettingActivity中的无用toast导入 - 简化SubmitFoodActivity启动语法 - 将设置页面清除数据后的跳转目标从HomeActivity改为InitActivity
This commit is contained in:
@@ -252,4 +252,8 @@ class InitActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onNewIntent(intent: Intent) {
|
||||||
|
super.onNewIntent(intent)
|
||||||
|
hasNavigated = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,6 @@ import com.shuwei.dish.match.scale.ScaleServiceManager
|
|||||||
import com.shuwei.dish.match.utils.SpTool
|
import com.shuwei.dish.match.utils.SpTool
|
||||||
import com.shuwei.dish.match.utils.ext.clickWithDebounce
|
import com.shuwei.dish.match.utils.ext.clickWithDebounce
|
||||||
import com.shuwei.dish.match.utils.ext.startActivity
|
import com.shuwei.dish.match.utils.ext.startActivity
|
||||||
import com.shuwei.dish.match.utils.ext.toast
|
|
||||||
import com.shuwei.dish.match.utils.ext.visible
|
import com.shuwei.dish.match.utils.ext.visible
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -113,9 +112,7 @@ class SettingActivity : BaseActivity() {
|
|||||||
SpTool.canteenId = "0"
|
SpTool.canteenId = "0"
|
||||||
// 通知所有已连接子设备同步清除数据
|
// 通知所有已连接子设备同步清除数据
|
||||||
ScaleServiceManager.sendClearData()
|
ScaleServiceManager.sendClearData()
|
||||||
startActivity<HomeActivity> {
|
startActivity<InitActivity>()
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.show()
|
.show()
|
||||||
|
|||||||
Reference in New Issue
Block a user