diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index c1f1fe212..604211141 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -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(); } diff --git a/common/src/main/java/com/yunbao/common/bean/MessageSayHiBean.java b/common/src/main/java/com/yunbao/common/bean/MessageSayHiBean.java index 73a6360d7..4baea89cd 100644 --- a/common/src/main/java/com/yunbao/common/bean/MessageSayHiBean.java +++ b/common/src/main/java/com/yunbao/common/bean/MessageSayHiBean.java @@ -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 + + '}'; + } } diff --git a/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java b/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java index 5bc50c48d..1aaa44d9f 100644 --- a/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java +++ b/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java @@ -14,7 +14,7 @@ public class MessageUserInfoBean extends BaseModel{ @SerializedName("msg") String sayHiMsg; - int id; + int id=-1; int status; //0 需要跳转到 编辑资料页面 String extras; diff --git a/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java b/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java index d5f8adf05..dd88f561d 100644 --- a/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java @@ -60,8 +60,7 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow { @Override public void buildDialog(XPopup.Builder builder) { - builder.isClickThrough(true); - builder.isTouchThrough(true); + } @Override diff --git a/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java b/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java index 8dd826091..484ad1480 100644 --- a/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java +++ b/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java @@ -47,7 +47,7 @@ public class MessageSayHiNotifyManager { .getMessageSayHiStartTimer(new HttpCallback() { @Override public void onSuccess(MessageSayHiStartBean data) { - if(data.getStatus()==0){ + if (data.getStatus() == 0) { Log.i(TAG, "onSuccess: 初始化定时器,定时器关:" + data.toString()); return; } @@ -77,10 +77,10 @@ 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){ + if (data.getStatus() == 0) { timer = new Timer(); timer.schedule(createTask(), data.getNextTime() * 1000L); return; @@ -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) -> {