add new BasePlatform method, Analytics fun on the Webpack train

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-05-29 19:51:28 +01:00
parent 8a59acb5c3
commit e991461e8d
3 changed files with 12 additions and 0 deletions

View File

@ -67,6 +67,10 @@ export default class ElectronPlatform extends VectorBasePlatform {
dis.register(_onAction);
}
getHumanReadableName() {
return 'Electron Platform';
}
setNotificationCount(count: number) {
if (this.notificationCount === count) return;
super.setNotificationCount(count);

View File

@ -35,6 +35,10 @@ export default class VectorBasePlatform extends BasePlatform {
this._updateFavicon();
}
getHumanReadableName() {
return 'Vector Base Platform';
}
_updateFavicon() {
try {
// This needs to be in in a try block as it will throw

View File

@ -31,6 +31,10 @@ export default class WebPlatform extends VectorBasePlatform {
this.runningVersion = null;
}
getHumanReadableName() {
return 'Web Platform';
}
/**
* Returns true if the platform supports displaying
* notifications, otherwise false.