Attempt to flush the rageshake logs on close
... so that we get to see what happened in the last 30s.
This commit is contained in:
parent
fab50bc1f1
commit
cc56ef3abd
4 changed files with 23 additions and 0 deletions
|
@ -22,9 +22,16 @@ import dis from 'matrix-react-sdk/lib/dispatcher';
|
|||
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||
import q from 'q';
|
||||
import {remote, ipcRenderer} from 'electron';
|
||||
import rageshake from '../rageshake';
|
||||
|
||||
remote.autoUpdater.on('update-downloaded', onUpdateDownloaded);
|
||||
|
||||
// try to flush the rageshake logs to indexeddb before quit.
|
||||
ipcRenderer.on('before-quit', function () {
|
||||
console.log('riot-desktop closing');
|
||||
rageshake.flush();
|
||||
});
|
||||
|
||||
function onUpdateDownloaded(ev: Event, releaseNotes: string, ver: string, date: Date, updateURL: string) {
|
||||
dis.dispatch({
|
||||
action: 'new_version',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue