提交 fa867c67 编写于 作者: F fancy

退出登录的时候需要停止极速打卡

上级 1ea30fda
......@@ -260,10 +260,7 @@ class MainActivity : BaseMVPActivity<MainContract.View, MainContract.Presenter>(
checkAppUpdateInner()
}
// 极速打卡
if (fastCheckInManager == null) {
fastCheckInManager = FastCheckInManager()
}
fastCheckInManager?.start(this)
startFastCheckIn()
}
......@@ -288,7 +285,7 @@ class MainActivity : BaseMVPActivity<MainContract.View, MainContract.Presenter>(
if (mReceiver != null) {
LocalBroadcastManager.getInstance(O2App.instance.applicationContext).unregisterReceiver(mReceiver!!)
}
fastCheckInManager?.stopAll()
stopFastCheckIn()
super.onDestroy()
}
......@@ -351,6 +348,24 @@ class MainActivity : BaseMVPActivity<MainContract.View, MainContract.Presenter>(
}
}
/**
* 极速打卡启动
*/
private fun startFastCheckIn() {
if (fastCheckInManager == null) {
fastCheckInManager = FastCheckInManager()
}
fastCheckInManager?.start(this)
}
/**
* 极速打卡关闭
* 退出登录需要用到
*/
fun stopFastCheckIn() {
fastCheckInManager?.stopAll()
}
//刷新ActionBar的菜单按钮 应用页面使用
fun refreshMenu() {
invalidateOptionsMenu()
......
......@@ -121,6 +121,7 @@ class SettingsFragment : BaseMVPViewPagerFragment<SettingsContract.View, Setting
mPresenter.jPushUnBindDevice()
if (activity is MainActivity) {
(activity as MainActivity).webSocketClose()
(activity as MainActivity).stopFastCheckIn()
}
mPresenter.logout()
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册