update 調整定時器參數

This commit is contained in:
zlzw 2024-03-22 17:31:27 +08:00
parent 3b4ffe8c51
commit 2cc58b920f

View File

@ -76,10 +76,15 @@ public class MessageSayHiNotifyManager {
.getMessageSayHiTimer(new HttpCallback<MessageSayHiBean>() { .getMessageSayHiTimer(new HttpCallback<MessageSayHiBean>() {
@Override @Override
public void onSuccess(MessageSayHiBean data) { public void onSuccess(MessageSayHiBean data) {
if (data.getStatus() == 0) { if (data.getStatus() == -1) {
Log.i(TAG, "onSuccess: 定时器为关,不再轮训"); Log.i(TAG, "onSuccess: 定时器为关,不再轮训");
return; return;
} }
if(data.getStatus()==0){
timer = new Timer();
timer.schedule(createTask(), data.getNextTime() * 1000L);
return;
}
hiBean = data; hiBean = data;
showDialog(data); showDialog(data);
} }