mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-13 23:10:19 +00:00
fix: #264 show notification on auto update finish
This commit is contained in:
parent
f19dbdb400
commit
b7d7c3108a
3 changed files with 13 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "3.9.3",
|
||||
"version": "3.9.4",
|
||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||
"description": "Stream anime torrents, real-time with no waiting for downloads.",
|
||||
"main": "src/index.js",
|
||||
|
|
|
|||
|
|
@ -291,5 +291,8 @@ ipcMain.on('update', () => {
|
|||
|
||||
autoUpdater.checkForUpdatesAndNotify()
|
||||
autoUpdater.on('update-available', () => {
|
||||
BrowserWindow.getAllWindows()[0]?.send('update', true)
|
||||
BrowserWindow.getAllWindows()[0]?.send('update-available', true)
|
||||
})
|
||||
autoUpdater.on('update-downloaded', () => {
|
||||
BrowserWindow.getAllWindows()[0]?.send('update-downloaded', true)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
window.IPC.emit('version')
|
||||
|
||||
let wasUpdated = false
|
||||
window.IPC.on('update', () => {
|
||||
window.IPC.on('update-available', () => {
|
||||
if (!wasUpdated) {
|
||||
wasUpdated = true
|
||||
addToast({
|
||||
|
|
@ -68,6 +68,13 @@
|
|||
})
|
||||
}
|
||||
})
|
||||
window.IPC.on('update-downloaded', () => {
|
||||
addToast({
|
||||
title: 'Auto Updater',
|
||||
text: 'A new version of Miru has downloaded. You can restart to update!',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
function checkUpdate () {
|
||||
window.IPC.emit('update')
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue