Commit 56a15b4a by 刘鹏

1.倾诉模块,登录接入优先一键登录功能

parent 859a19a6
......@@ -258,9 +258,8 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
* 私聊
*/
override fun toChatForMsg(doctorId: String?) {
if (!PhoneCallIn.isLogin() && null != mContext && mContext is Activity) {
mContext!!.startActivity(PhoneCallIn.loginWayIntent(mContext as Activity))
if (null != mContext && mContext is Activity){
PhoneCallIn.loginByOneKeyLogin(mContext as Activity,true)
return
}
if (mContext is AppCompatActivity && !TextUtils.isEmpty(doctorId)) {
......
package com.ydl.confide.router
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.support.v7.app.AppCompatActivity
import com.ydl.ydlcommon.modular.ModularServiceManager
......@@ -42,4 +43,14 @@ object PhoneCallIn {
fun startChat(context: AppCompatActivity, toUid: String, flag: Int, canTalk: Int) {
getImService().startChat(context,toUid,flag,canTalk)
}
/**
* 调用优先使用一键登录,并返回调用时的登录状态,
* @param isOpenDialog true:一键登录使用弹窗展示 false:一键登录使用全屏模式
* @return true:已登录,不触发登录跳转,false:未登录,优先一键登录
* */
fun loginByOneKeyLogin(context: Context, isOpenDialog: Boolean) :Boolean{
return getUserService().loginByOneKeyLogin(context,isOpenDialog)
}
}
\ No newline at end of file
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