fix [打招呼的弹窗出现时,只会闪一下就自动消失]

This commit is contained in:
zlzw 2024-03-27 16:09:33 +08:00
parent e256b61238
commit 2c41e9418d
5 changed files with 27 additions and 7 deletions

View File

@ -63,6 +63,8 @@ import com.yunbao.live.utils.LiveImDeletUtil;
import com.yunbao.live.views.PortraitLiveManager;
import com.yunbao.live.views.RecommendLiveRoomProvider;
import com.yunbao.main.activity.CompleteUserInfoActivity;
import com.yunbao.main.activity.EntryActivity;
import com.yunbao.main.activity.LoginActivity;
import com.yunbao.main.activity.MainActivity;
import com.yunbao.main.activity.MainHomeCommunityActivity;
import com.yunbao.main.activity.MsgSettActivity;
@ -131,6 +133,14 @@ public class AppContext extends CommonAppContext {
MessageSayHiNotifyManager.getInstance().stop();
return;
}
if (activity instanceof LoginActivity) {
MessageSayHiNotifyManager.getInstance().stop();
return;
}
if (activity instanceof EntryActivity) {
MessageSayHiNotifyManager.getInstance().stop();
return;
}
MessageSayHiNotifyManager.getInstance().reload();
}

View File

@ -43,4 +43,14 @@ public class MessageSayHiBean extends BaseModel{
public void setStatus(int status) {
this.status = status;
}
@Override
public String toString() {
return "MessageSayHiBean{" +
"user=" + user +
", model='" + model + '\'' +
", nextTime=" + nextTime +
", status=" + status +
'}';
}
}

View File

@ -14,7 +14,7 @@ public class MessageUserInfoBean extends BaseModel{
@SerializedName("msg")
String sayHiMsg;
int id;
int id=-1;
int status; //0 需要跳转到 编辑资料页面
String extras;

View File

@ -60,8 +60,7 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow {
@Override
public void buildDialog(XPopup.Builder builder) {
builder.isClickThrough(true);
builder.isTouchThrough(true);
}
@Override

View File

@ -77,7 +77,7 @@ public class MessageSayHiNotifyManager {
@Override
public void onSuccess(MessageSayHiBean data) {
if (data.getStatus() == -1) {
Log.i(TAG, "onSuccess: 定时器为关,不再轮训");
Log.i(TAG, "onSuccess: 定时器为关,不再轮训 " + data);
return;
}
if (data.getStatus() == 0) {
@ -91,6 +91,7 @@ public class MessageSayHiNotifyManager {
@Override
public void onError(String error) {
Log.e(TAG, "onError: "+error );
}
@ -112,7 +113,7 @@ public class MessageSayHiNotifyManager {
return;
}
isShowDialog = true;
Log.i(TAG, "showDialog: 打开本轮打招呼弹框");
Log.i(TAG, "showDialog: 打开本轮打招呼弹框 " + bean);
lastActivity = AppManager.getInstance().getLastActivity().getClass().getSimpleName();
new MessageSayHiNotifyDialog(AppManager.getInstance().getLastActivity(), bean.getUser()).setOnDismissListener((userId, position) ->
{