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); dis.register(_onAction);
} }
getHumanReadableName() {
return 'Electron Platform';
}
setNotificationCount(count: number) { setNotificationCount(count: number) {
if (this.notificationCount === count) return; if (this.notificationCount === count) return;
super.setNotificationCount(count); super.setNotificationCount(count);

View file

@ -35,6 +35,10 @@ export default class VectorBasePlatform extends BasePlatform {
this._updateFavicon(); this._updateFavicon();
} }
getHumanReadableName() {
return 'Vector Base Platform';
}
_updateFavicon() { _updateFavicon() {
try { try {
// This needs to be in in a try block as it will throw // 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; this.runningVersion = null;
} }
getHumanReadableName() {
return 'Web Platform';
}
/** /**
* Returns true if the platform supports displaying * Returns true if the platform supports displaying
* notifications, otherwise false. * notifications, otherwise false.