From e991461e8dcb379613606afc167322bbc01527cb Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 29 May 2017 19:51:28 +0100 Subject: [PATCH] add new BasePlatform method, Analytics fun on the Webpack train Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/platform/ElectronPlatform.js | 4 ++++ src/vector/platform/VectorBasePlatform.js | 4 ++++ src/vector/platform/WebPlatform.js | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index bf930a67..a12de530 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -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); diff --git a/src/vector/platform/VectorBasePlatform.js b/src/vector/platform/VectorBasePlatform.js index 00c9c47c..4ff3c222 100644 --- a/src/vector/platform/VectorBasePlatform.js +++ b/src/vector/platform/VectorBasePlatform.js @@ -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 diff --git a/src/vector/platform/WebPlatform.js b/src/vector/platform/WebPlatform.js index cdff7344..1db024ed 100644 --- a/src/vector/platform/WebPlatform.js +++ b/src/vector/platform/WebPlatform.js @@ -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.