Skip to content

Commit

Permalink
Fixed a bug preventing Vessel from quitting
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Jan 3, 2018
1 parent e1e7bd7 commit 4d89912
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title>Vessel - 0.2.3</title>
<title>Vessel - 0.2.4</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.min.css" integrity="sha256-5+W3JHnvGYIJkVxUBsw+jBi9+pOlu9enPX3vZapXj5M=" crossorigin="anonymous" />
<script>
(function() {
Expand Down
12 changes: 10 additions & 2 deletions app/main.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { app, dialog, BrowserWindow } from 'electron';
import MenuBuilder from './menu';

let mainWindow = null;
let promptWindow = null;
let customURI

if (process.env.NODE_ENV === 'production') {
Expand Down Expand Up @@ -69,7 +70,6 @@ async function createWindow() {
width: 970,
height: 750
});

// mainWindow.webContents.openDevTools()

mainWindow.loadURL(`file://${__dirname}/app.html`);
Expand All @@ -87,6 +87,8 @@ async function createWindow() {

mainWindow.on('closed', () => {
mainWindow = null;
promptWindow = null;
app.quit();
});

const menuBuilder = new MenuBuilder(mainWindow);
Expand All @@ -100,7 +102,7 @@ async function createPrompt(event, url) {
if(event) event.preventDefault()
customURI = url
var parse = require('url-parse');
const promptWindow = new BrowserWindow({
promptWindow = new BrowserWindow({
alwaysOnTop: true,
show: false,
width: 500,
Expand Down Expand Up @@ -142,6 +144,12 @@ app.on('window-all-closed', () => {
app.quit();
});

app.on('will-quit', () => {
mainWindow = null;
promptWindow = null;
});


function devToolsLog(s) {
console.log(s)
if (mainWindow && mainWindow.webContents) {
Expand Down
2 changes: 1 addition & 1 deletion app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vessel",
"productName": "vessel",
"version": "0.2.3",
"version": "0.2.4",
"description": "A simple wallet for managing your Steem accounts.",
"main": "./main.prod.js",
"author": {
Expand Down

0 comments on commit 4d89912

Please sign in to comment.