Skip to content

Commit 7646859

Browse files
committed
Cancel toast if update dialog appear
1 parent 2f62a49 commit 7646859

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/com/surcumference/fingerprint/network/updateCheck/UpdateFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public void onHasUpdate(UpdateInfo updateInfo) {
8989
return;
9090
}
9191
}
92+
Toaster.cancel();
9293
UpdateInfoView updateInfoView = new UpdateInfoView(context);
9394
updateInfoView.setTitle(Lang.getString(R.id.found_new_version) + updateInfo.version);
9495
updateInfoView.setContent(updateInfo.content);
@@ -112,7 +113,7 @@ public void onHasUpdate(UpdateInfo updateInfo) {
112113
});
113114
}});
114115
});
115-
updateInfoView.showInDialog();
116+
Task.onMain(200, updateInfoView::showInDialog);
116117
}
117118
}).doUpdateCheck();
118119
} catch (Exception | Error e) {

0 commit comments

Comments
 (0)