From 9949bb42adb97fad3af629039bcd0fc82b28cf53 Mon Sep 17 00:00:00 2001 From: Ismael Martinez Ramos Date: Fri, 5 Apr 2024 15:31:38 +0100 Subject: [PATCH] adding the changes into the appdata file for flathub: --- app/browser/notifications/activityManager.js | 31 ------------------- app/browser/tools/mutationTitle.js | 2 +- app/config/README.md | 2 +- app/config/index.js | 6 ++-- app/menus/tray.js | 1 - ...IsmaelMartinez.teams_for_linux.appdata.xml | 10 ++++++ 6 files changed, 15 insertions(+), 37 deletions(-) diff --git a/app/browser/notifications/activityManager.js b/app/browser/notifications/activityManager.js index 8f829580..10d42690 100644 --- a/app/browser/notifications/activityManager.js +++ b/app/browser/notifications/activityManager.js @@ -39,11 +39,7 @@ class ActivityManager { } } -/** - * @param {ActivityManager} self - */ function setActivityHandlers(self) { - console.log('setActivityHandlers'); activityHub.on('activities-count-updated', updateActivityCountHandler(self)); activityHub.on('incoming-call-created', incomingCallCreatedHandler(self)); activityHub.on('incoming-call-connecting', incomingCallConnectingHandler(self)); @@ -54,17 +50,11 @@ function setActivityHandlers(self) { activityHub.on('my-status-changed', myStatusChangedHandler(self)); } -/** - * @param {ActivityManager} self - */ function setEventHandlers(self) { self.ipcRenderer.on('enable-wakelock', () => wakeLock.enable()); self.ipcRenderer.on('disable-wakelock', () => wakeLock.disable()); } -/** - * @param {ActivityManager} self - */ function updateActivityCountHandler() { return async (data) => { const event = new CustomEvent('unread-count', { detail: { number: data.count } }); @@ -72,54 +62,36 @@ function updateActivityCountHandler() { }; } -/** - * @param {ActivityManager} self - */ function incomingCallCreatedHandler(self) { return async (data) => { self.ipcRenderer.invoke('incoming-call-created', data); }; } -/** - * @param {ActivityManager} self - */ function incomingCallConnectingHandler(self) { return async () => { self.ipcRenderer.invoke('incoming-call-connecting'); }; } -/** - * @param {ActivityManager} self - */ function incomingCallDisconnectingHandler(self) { return async () => { self.ipcRenderer.invoke('incoming-call-disconnecting'); }; } -/** - * @param {ActivityManager} self - */ function callConnectedHandler(self) { return async () => { self.ipcRenderer.invoke('call-connected'); }; } -/** - * @param {ActivityManager} self - */ function callDisconnectedHandler(self) { return async () => { self.ipcRenderer.invoke('call-disconnected'); }; } -/** - * @param {ActivityManager} self - */ // eslint-disable-next-line no-unused-vars function meetingStartNotifyHandler(self) { if (!self.config.disableMeetingNotifications) { @@ -132,9 +104,6 @@ function meetingStartNotifyHandler(self) { return null; } -/** - * @param {ActivityManager} self - */ // eslint-disable-next-line no-unused-vars function myStatusChangedHandler(self) { // eslint-disable-next-line no-unused-vars diff --git a/app/browser/tools/mutationTitle.js b/app/browser/tools/mutationTitle.js index 9579ee85..e36c580e 100644 --- a/app/browser/tools/mutationTitle.js +++ b/app/browser/tools/mutationTitle.js @@ -1,7 +1,7 @@ class MutationObserverTitle { init(config) { - if (config.useMutationToTitleLogic) { + if (config.useMutationTitleLogic) { console.log('MutationObserverTitle enabled'); window.addEventListener('DOMContentLoaded', this._applyMutationToTitleLogic); } diff --git a/app/config/README.md b/app/config/README.md index 1726635c..2364479c 100644 --- a/app/config/README.md +++ b/app/config/README.md @@ -52,7 +52,7 @@ Here is the list of available arguments and its usage: | screenLockInhibitionMethod | Screen lock inhibition method to be used (Electron/WakeLockSentinel) | string | | spellCheckerLanguages | Array of languages to use with Electron's spell checker (experimental) | array | | url | Microsoft Teams URL | string | -| useMutationToTitleLogic | Use MutationObserver to update counter from title | false | +| useMutationTitleLogic | Use MutationObserver to update counter from title | false | | version | Show the version number | false | | webDebug | Enable web debugging | false | diff --git a/app/config/index.js b/app/config/index.js index 5127d7c4..967f34bf 100644 --- a/app/config/index.js +++ b/app/config/index.js @@ -103,7 +103,7 @@ function argv(configPath, appVersion) { type: 'string' }, followSystemTheme: { - default: true, + default: false, describe: 'Follow system theme', type: 'boolean' }, @@ -233,8 +233,8 @@ function argv(configPath, appVersion) { describe: 'Microsoft Teams URL', type: 'string' }, - useMutationToTitleLogic: { - default: true, + useMutationTitleLogic: { + default: false, describe: 'Use MutationObserver to update counter from title', type: 'boolean' }, diff --git a/app/menus/tray.js b/app/menus/tray.js index 3a24c3c0..d0ccb277 100644 --- a/app/menus/tray.js +++ b/app/menus/tray.js @@ -24,7 +24,6 @@ class ApplicationTray { } updateTrayImage(iconUrl, flash) { - console.log('updateTrayImage'); const image = nativeImage.createFromDataURL(iconUrl); this.tray.setImage(image); diff --git a/com.github.IsmaelMartinez.teams_for_linux.appdata.xml b/com.github.IsmaelMartinez.teams_for_linux.appdata.xml index 1bf38f32..8a140d7e 100644 --- a/com.github.IsmaelMartinez.teams_for_linux.appdata.xml +++ b/com.github.IsmaelMartinez.teams_for_linux.appdata.xml @@ -14,6 +14,16 @@ https://github.com/IsmaelMartinez/teams-for-linux/issues com.github.IsmaelMartinez.teams_for_linux.desktop + + +
    +
  • updating tray icon with the number in the document.title. This is hidden behind a feature flag/config option called useMutationTitleLogic
  • +
  • moved trayIconRenderer out of the activityHub, and to react to events instead.
  • +
  • re-order config readme to show in the right order.
  • +
  • removing the 'removal' of the opt in for teamsv2. Now if you use that feature flag and want to revert you will need to do it manually.
  • +
+
+