mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 03:32:12 -08:00
cleanup.
This commit is contained in:
parent
a731fa90ea
commit
e3af7669d8
@ -6,11 +6,10 @@ const path = require('path')
|
||||
const logger = LoggerUtil.getLogger('ConfigManager')
|
||||
|
||||
const sysRoot = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Application Support' : process.env.HOME)
|
||||
// TODO change
|
||||
|
||||
const dataPath = path.join(sysRoot, '.helioslauncher')
|
||||
|
||||
// Forked processes do not have access to electron, so we have this workaround.
|
||||
const launcherDir = process.env.CONFIG_DIRECT_PATH || require('@electron/remote').app.getPath('userData')
|
||||
const launcherDir = require('@electron/remote').app.getPath('userData')
|
||||
|
||||
/**
|
||||
* Retrieve the absolute path of the launcher directory.
|
||||
|
@ -540,8 +540,8 @@ async function dlAsync(login = true) {
|
||||
toggleLaunchArea(false)
|
||||
if(hasRPC){
|
||||
DiscordWrapper.updateDetails('Loading game..')
|
||||
}
|
||||
proc.stdout.on('data', gameStateChange)
|
||||
}
|
||||
proc.stdout.removeListener('data', tempListener)
|
||||
proc.stderr.removeListener('data', gameErrorListener)
|
||||
}
|
||||
@ -789,7 +789,7 @@ function initNews(){
|
||||
let news = {}
|
||||
loadNews().then(news => {
|
||||
|
||||
newsArr = news.articles || null
|
||||
newsArr = news?.articles || null
|
||||
|
||||
if(newsArr == null){
|
||||
// News Loading Failed
|
||||
@ -938,6 +938,10 @@ function displayArticle(articleObject, index){
|
||||
async function loadNews(){
|
||||
|
||||
const distroData = await DistroAPI.getDistribution()
|
||||
if(!distroData.rawDistribution.rss) {
|
||||
loggerLanding.debug('No RSS feed provided.')
|
||||
return null
|
||||
}
|
||||
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
|
||||
|
@ -1354,7 +1354,6 @@ function populateJavaReqDesc(server) {
|
||||
settingsJavaReqDesc.innerHTML = `Requires Java ${server.effectiveJavaOptions.suggestedMajor} x64.`
|
||||
}
|
||||
|
||||
// TODO Update to use semver range
|
||||
function populateJvmOptsLink(server) {
|
||||
const major = server.effectiveJavaOptions.suggestedMajor
|
||||
settingsJvmOptsLink.innerHTML = `Available Options for Java ${major} (HotSpot VM)`
|
||||
|
Loading…
Reference in New Issue
Block a user