Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit fb4a7a8

Browse files
committed
Removed wizard code and updated startup
1 parent 031c761 commit fb4a7a8

File tree

1 file changed

+8
-59
lines changed

1 file changed

+8
-59
lines changed

src/electron/index.js

Lines changed: 8 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function createWindow() {
4141
playerpath: '',
4242
hide_zeroreplay_fans: false,
4343
hide_zeroreplay_followings: true,
44-
enableHomeScan: true
44+
enableHomeScan: false
4545
})
4646
appSettings.set('position', {
4747
mainWindow: [-1, -1],
@@ -107,51 +107,6 @@ function createWindow() {
107107
}
108108
})
109109

110-
if (isFreshInstall) {
111-
wizardWindow = new BrowserWindow({
112-
icon: path.join(__dirname, 'appicon.png'),
113-
width: 520,
114-
height: 300,
115-
darkTheme: true,
116-
autoHideMenuBar: false,
117-
disableAutoHideCursor: true,
118-
titleBarStyle: 'default',
119-
resizable: false,
120-
fullscreen: false,
121-
maximizable: false,
122-
show: false,
123-
frame: false,
124-
backgroundColor: 'transparent',
125-
webPreferences: {
126-
webSecurity: false,
127-
textAreasAreResizable: false,
128-
plugins: true
129-
}
130-
})
131-
132-
wizardWindow.on('close', () => {
133-
// Don't allow wizard to run next time
134-
appSettings.set('general.fresh_install', false)
135-
DataManager.enableWrites()
136-
137-
wizardWindow.webContents.session.clearCache(() => {
138-
// Purge the cache to help avoid eating up space on the drive
139-
})
140-
141-
if (mainWindow != null) {
142-
setTimeout(() => {
143-
let pos = appSettings.get('position.mainWindow')
144-
mainWindow.setPosition(pos[0], pos[1], false)
145-
mainWindow.show()
146-
}, 250)
147-
148-
}
149-
150-
wizardWindow = null
151-
152-
})
153-
}
154-
155110
/**
156111
* Configure our window contents and callbacks
157112
*/
@@ -184,7 +139,7 @@ function createWindow() {
184139
app.quit()
185140
}, 500)
186141
})
187-
142+
188143
/**
189144
* Build our application menus using the templates provided
190145
* further down.
@@ -196,28 +151,22 @@ function createWindow() {
196151
global.LiveMe = LiveMe
197152
global.DataManager = DataManager
198153

199-
200154
DataManager.loadFromDisk()
201155

202156
setTimeout(() => {
203157
const dt = new Date()
204158
let ma = appSettings.get('history.viewed_maxage')
205159
let od = Math.floor((dt.getTime() - (ma * 86400000)) / 1000)
206160
DataManager.unviewProfiles(od, false)
207-
}, 250)
208161

209-
if (isFreshInstall) {
210-
DataManager.disableWrites()
211-
wizardWindow.loadURL(`file://${__dirname}/app/wizard.html`)
212-
wizardWindow.show()
213-
} else {
214-
mainWindow.show()
162+
}, 250)
215163

216-
let pos = appSettings.get('position.mainWindow').length > 1 ? appSettings.get('position.mainWindow') : [null, null]
217-
if (pos[0] != null) {
218-
mainWindow.setPosition(pos[0], pos[1], false)
219-
}
164+
let pos = appSettings.get('position.mainWindow').length > 1 ? appSettings.get('position.mainWindow') : [null, null]
165+
if (pos[0] != null) {
166+
mainWindow.setPosition(pos[0], pos[1], false)
220167
}
168+
mainWindow.show()
169+
221170
}
222171

223172
app.on('ready', () => {

0 commit comments

Comments
 (0)