Allow deferring of Update Toast until the next morning
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
f45c584c8a
commit
9431393bda
3 changed files with 42 additions and 2 deletions
|
@ -40,6 +40,10 @@ function installUpdate() {
|
|||
}
|
||||
|
||||
export const showToast = (version: string, newVersion: string, releaseNotes?: string) => {
|
||||
function onReject() {
|
||||
PlatformPeg.get().deferUpdate(newVersion);
|
||||
}
|
||||
|
||||
let onAccept;
|
||||
let acceptLabel = _t("What's new?");
|
||||
if (releaseNotes) {
|
||||
|
@ -79,6 +83,8 @@ export const showToast = (version: string, newVersion: string, releaseNotes?: st
|
|||
description: _t("A new version of Riot is available!"),
|
||||
acceptLabel,
|
||||
onAccept,
|
||||
rejectLabel: _t("Later"),
|
||||
onReject,
|
||||
},
|
||||
component: GenericToast,
|
||||
priority: 20,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue