Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Do not add the release channel on stable versions of Atom
Browse files Browse the repository at this point in the history
This is done to avoid changing the application user model id on Atom
stable, which prevents pins from currently installed Atom stable
versions to stop working.
  • Loading branch information
rafeca committed Jul 15, 2019
1 parent 3711c52 commit 603800f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/main-process/start.js
Expand Up @@ -73,10 +73,17 @@ module.exports = function start(resourcePath, devResourcePath, startTime) {
return;
}

// NB: This prevents Win10 from showing dupe items in the taskbar
app.setAppUserModelId(
'com.squirrel.atom.' + process.arch + getReleaseChannel(app.getVersion())
);
const releaseChannel = getReleaseChannel(app.getVersion());
let appUserModelId = 'com.squirrel.atom.' + process.arch;

// If the release channel is not stable, we append it to the app user model id.
// This allows having the different release channels as separate items in the taskbar.
if (releaseChannel !== 'stable') {
appUserModelId += `-${releaseChannel}`;
}

// NB: This prevents Win10 from showing dupe items in the taskbar.
app.setAppUserModelId(appUserModelId);

function addPathToOpen(event, pathToOpen) {
event.preventDefault();
Expand All @@ -93,7 +100,7 @@ module.exports = function start(resourcePath, devResourcePath, startTime) {
app.on('will-finish-launching', () =>
startCrashReporter({
uploadToServer: config.get('core.telemetryConsent') === 'limited',
releaseChannel: getReleaseChannel(app.getVersion())
releaseChannel
})
);

Expand Down

0 comments on commit 603800f

Please sign in to comment.