Skip to content

Commit ca9390c

Browse files
committed
fix: in non upgradable locations, remind me later button opens up phcode.io
1 parent 8f2533b commit ca9390c

File tree

1 file changed

+6
-1
lines changed
  • src/extensionsIntegrated/appUpdater

1 file changed

+6
-1
lines changed

src/extensionsIntegrated/appUpdater/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,17 +230,22 @@ define(function (require, exports, module) {
230230
Dialogs.showModalDialog(DefaultDialogs.DIALOG_ID_INFO, Strings.UPDATE_AVAILABLE_TITLE, markdownHtml, buttons)
231231
.done(option=>{
232232
isUpgradableLocation().then(isUpgradableLoc=>{
233+
if(option === Dialogs.DIALOG_BTN_CANCEL){
234+
Metrics.countEvent(Metrics.EVENT_TYPE.UPDATES, 'dialog', "cancel"+Phoenix.platform);
235+
return;
236+
}
233237
if(!isUpgradableLoc) {
234238
// user installed linux as binary without installer, we just open phcode.io
235239
const downloadPage = brackets.config.homepage_url || "https://phcode.io";
236240
NativeApp.openURLInDefaultBrowser(downloadPage);
241+
Metrics.countEvent(Metrics.EVENT_TYPE.UPDATES, 'dialog', "nonUpgradable"+Phoenix.platform);
237242
return;
238243
}
239244
if(option === Dialogs.DIALOG_BTN_OK && !updaterWindow){
245+
Metrics.countEvent(Metrics.EVENT_TYPE.UPDATES, 'dialog', "okUpdate"+Phoenix.platform);
240246
doUpdate(updateDetails.downloadURL);
241247
return;
242248
}
243-
Metrics.countEvent(Metrics.EVENT_TYPE.UPDATES, 'dialog', "cancel"+Phoenix.platform);
244249
});
245250
});
246251
}

0 commit comments

Comments
 (0)