Skip to content

Commit

Permalink
-Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisknepper committed Feb 5, 2019
1 parent 86906d0 commit 7c99bc7
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -13,4 +13,4 @@ Thumbs.db
/app/**/*.map

# Dictionary files are downloaded by the user's machine
/resources/dictionaries/**/*
/resources/dictionaries/**/*
5 changes: 0 additions & 5 deletions src/app.js
Expand Up @@ -10,13 +10,8 @@ const state = {
loaded: false
};

import fs from 'fs';
import path from 'path';
import { SpellCheckerProvider } from 'electron-hunspell';

const app = remote.app;


androidMessagesWebview.addEventListener('did-start-loading', () => {
// Intercept request for notifications and accept it
androidMessagesWebview.getWebContents().session.setPermissionRequestHandler((webContents, permission, callback) => {
Expand Down
7 changes: 1 addition & 6 deletions src/background.js
Expand Up @@ -22,8 +22,7 @@ import { IS_MAC, IS_WINDOWS, IS_LINUX, IS_DEV, SETTING_TRAY_ENABLED, SETTING_TRA
import env from 'env';

const state = {
unreadNotificationCount: 0,
currentLanguage: null
unreadNotificationCount: 0
};

let mainWindow = null;
Expand Down Expand Up @@ -70,9 +69,6 @@ if (isSecondInstance) {
}

app.on('ready', () => {
state.currentLanguage = app.getLocale();
console.log('the locale', state.currentLanguage);

trayManager = new TrayManager();

// TODO: Create a preference manager which handles all of these
Expand Down Expand Up @@ -263,6 +259,5 @@ if (isSecondInstance) {
if (IS_DEV) {
mainWindow.openDevTools();
}

});
}
4 changes: 0 additions & 4 deletions src/helpers/dictionary_manager.js
Expand Up @@ -139,11 +139,9 @@ export default class DictionaryManager {
response.pipe(affFile);

affFile.on('error', (err) => {
console.log('aff error downloading', err);
reject(null);
});
affFile.on('finish', (finished) => {
console.log('aff finished downloading', finished, 'dic is', downloadState.dicFile);
downloadState.affFile = true;

(downloadState.affFile && downloadState.dicFile) && resolve(localDictionaryFiles);
Expand All @@ -157,11 +155,9 @@ export default class DictionaryManager {
response.pipe(dicFile);

dicFile.on('error', (err) => {
console.log('dic error downloading', err);
reject(null);
});
dicFile.on('finish', (finished) => {
console.log('dic finished downloading', finished, 'aff is', downloadState.affFile);
downloadState.dicFile = true;

(downloadState.affFile && downloadState.dicFile) && resolve(localDictionaryFiles);
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/webview/context_menu.js
Expand Up @@ -132,4 +132,4 @@ const popupContextMenu = async (event, params) => {
}
};

module.exports = popupContextMenu;
module.exports = popupContextMenu;

0 comments on commit 7c99bc7

Please sign in to comment.