修复 [在直播间中,点击推送弹窗,进入聊天详情界面,点击聊天记录中的直播间【站内分享】,无法进入直播间]
This commit is contained in:
parent
b285512914
commit
d06f4599fa
@ -1,5 +1,6 @@
|
|||||||
package com.yunbao.common.provider;
|
package com.yunbao.common.provider;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
@ -10,11 +11,13 @@ import com.yunbao.common.Constants;
|
|||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.bean.ActiveBean;
|
import com.yunbao.common.bean.ActiveBean;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.LiveHttpUtil;
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
import com.yunbao.common.message.content.MessageChatCardContent;
|
import com.yunbao.common.message.content.MessageChatCardContent;
|
||||||
|
import com.yunbao.common.utils.AppManager;
|
||||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||||
import com.yunbao.common.utils.MicStatusManager;
|
import com.yunbao.common.utils.MicStatusManager;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
@ -105,8 +108,16 @@ public class MessageChatCardItemProvider extends BaseMessageItemProvider<Message
|
|||||||
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (AppManager.getInstance().getLiveActivity() != null) {
|
||||||
|
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true));
|
||||||
|
Activity activity = AppManager.getActivity("PDLiveConversationActivity");
|
||||||
|
if (activity != null) {
|
||||||
|
activity.finish();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCheckError(String contextError) {
|
public void onCheckError(String contextError) {
|
||||||
|
@ -20,6 +20,15 @@ public class AppManager {
|
|||||||
return SingleApp.INSTANCE;
|
return SingleApp.INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Activity getActivity(String activityName) {
|
||||||
|
for (Activity activity : activityStack) {
|
||||||
|
if (activity.getClass().getSimpleName().contains(activityName)) {
|
||||||
|
return activity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public Activity getMainActivity() {
|
public Activity getMainActivity() {
|
||||||
for (Activity activity : activityStack) {
|
for (Activity activity : activityStack) {
|
||||||
if (activity.getClass().getSimpleName().contains("MainActivity")) {
|
if (activity.getClass().getSimpleName().contains("MainActivity")) {
|
||||||
@ -29,6 +38,15 @@ public class AppManager {
|
|||||||
return getLastActivity();
|
return getLastActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Activity getLiveActivity() {
|
||||||
|
for (Activity activity : activityStack) {
|
||||||
|
if (activity.getClass().getSimpleName().contains("LiveAudienceActivity")) {
|
||||||
|
return activity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public static class SingleApp {
|
public static class SingleApp {
|
||||||
public static AppManager INSTANCE = new AppManager();
|
public static AppManager INSTANCE = new AppManager();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user