diff --git a/app/assets/js/configmanager.js b/app/assets/js/configmanager.js index 106d6aa..6b750a5 100644 --- a/app/assets/js/configmanager.js +++ b/app/assets/js/configmanager.js @@ -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. diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index d013798..c8709e1 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -540,8 +540,8 @@ async function dlAsync(login = true) { toggleLaunchArea(false) if(hasRPC){ DiscordWrapper.updateDetails('Loading game..') + proc.stdout.on('data', gameStateChange) } - 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) => { diff --git a/app/assets/js/scripts/settings.js b/app/assets/js/scripts/settings.js index 1b8b09b..8c13c02 100644 --- a/app/assets/js/scripts/settings.js +++ b/app/assets/js/scripts/settings.js @@ -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)`