fix [打招呼的弹窗出现时,只会闪一下就自动消失]
This commit is contained in:
parent
e256b61238
commit
2c41e9418d
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ public class MessageUserInfoBean extends BaseModel{
|
||||
@SerializedName("msg")
|
||||
String sayHiMsg;
|
||||
|
||||
int id;
|
||||
int id=-1;
|
||||
|
||||
int status; //0 需要跳转到 编辑资料页面
|
||||
String extras;
|
||||
|
@ -60,8 +60,7 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow {
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.isClickThrough(true);
|
||||
builder.isTouchThrough(true);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +47,7 @@ public class MessageSayHiNotifyManager {
|
||||
.getMessageSayHiStartTimer(new HttpCallback<MessageSayHiStartBean>() {
|
||||
@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) ->
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user