Commit ccb17b88 by 何天远

增加 退出登录 通知

parent 9636ee6d
......@@ -48,7 +48,7 @@ ext {
"m-fm" : "0.0.15",
"m-muse" : "0.0.11",
"m-tests" : "0.0.10",
"m-user" : "0.0.30",
"m-user" : "0.0.31",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.1",
......
......@@ -8,6 +8,7 @@ import com.yidianling.router.im.IMLoginInfo
import com.yidianling.router.im.IMRequestCallback
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.api.event.UserLoginEvent
import com.yidianling.user.api.event.UserLogoutEvent
import com.yidianling.user.http.UserHttpImpl
import com.yidianling.user.http.request.Logout
import com.yidianling.user.route.UserIn
......@@ -76,6 +77,7 @@ object LoginUtils {
@JvmStatic
fun logout() {
EventBus.getDefault().post(UserLogoutEvent())
UserHttpImpl.getInstance().logout(Logout())
.compose(RxUtils.resultData())
.observeOn(AndroidSchedulers.mainThread())
......
......@@ -97,8 +97,6 @@ class PrivacyDialog : Dialog {
//清除UserInfo
UserHelper.setUserinfo(null)
LoginUtils.logout()
EventBus.getDefault().post(UserLogoutEvent())
activity!!.startActivity(Intent(activity, RegisterAndLoginActivity::class.java))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment