Skip to content

Commit

Permalink
🚿 Clean up unnecessary app notification
Browse files Browse the repository at this point in the history
  • Loading branch information
tterb committed Nov 11, 2017
1 parent 30e14ac commit c4b2904
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions assets/js/ipc_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ ipc.on('file-open-new', () => {
var options = {
'properties': ['openFile'],
'filters': [{
name: 'Markdown',
'extensions': ['md','markdown','mdown','mkdn','mkd','mdwn','mdtxt','mdtext']
name: 'Markdown', 'extensions': ['md','markdown','mdown','mkdn','mkd','mdwn','mdtxt','mdtext']
}]
};
if('filename' in data)
Expand All @@ -108,9 +107,9 @@ ipc.on('file-open-new', () => {
if(file === undefined) {
return notify('You didn\'t select a file to open', 'info');
}
data = { 'filename' : this.currentFile };
data = { 'filename' : file[0] };
// this.isFileLoadedInitially = true;
// this.currentFile = file[0]; // <-- This fixes bottom file but not save
// this.currentFile = data.filename; // <-- This fixes bottom file but not save
// file is a string that contains the path and filename created in the save file dialog.
settings.set('targetFile', file[0]);
main.createWindow();
Expand All @@ -127,7 +126,7 @@ ipc.on('insert-heading', () => { toggleHeading(); });
ipc.on('insert-italic', () => { toggleFormat('em'); });
ipc.on('insert-image', () => { insert('image'); });
ipc.on('insert-link', () => { insert('link'); });
ipc.on('toggle-menu', () => { if(process.platform !== 'darwin') toggleMenu(); notify('Toggle app menu', 'error'); });
ipc.on('toggle-menu', () => { if(process.platform !== 'darwin') toggleMenu(); });
ipc.on('toggle-preview', () => { togglePreview(); });
ipc.on('win-close', () => { closeWindow(remote.BrowserWindow.getFocusedWindow()); });
ipc.on('win-reload', () => { reloadWin(); });
Expand Down

0 comments on commit c4b2904

Please sign in to comment.