Skip to content

Commit

Permalink
adding the changes into the appdata file for flathub:
Browse files Browse the repository at this point in the history
  • Loading branch information
IsmaelMartinez committed Apr 5, 2024
1 parent cee84ef commit 9949bb4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 37 deletions.
31 changes: 0 additions & 31 deletions app/browser/notifications/activityManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -54,72 +50,48 @@ 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 } });
window.dispatchEvent(event);
};
}

/**
* @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) {
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/browser/tools/mutationTitle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class MutationObserverTitle {

init(config) {
if (config.useMutationToTitleLogic) {
if (config.useMutationTitleLogic) {
console.log('MutationObserverTitle enabled');
window.addEventListener('DOMContentLoaded', this._applyMutationToTitleLogic);
}
Expand Down
2 changes: 1 addition & 1 deletion app/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

Expand Down
6 changes: 3 additions & 3 deletions app/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function argv(configPath, appVersion) {
type: 'string'
},
followSystemTheme: {
default: true,
default: false,
describe: 'Follow system theme',
type: 'boolean'
},
Expand Down Expand Up @@ -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'
},
Expand Down
1 change: 0 additions & 1 deletion app/menus/tray.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class ApplicationTray {
}

updateTrayImage(iconUrl, flash) {
console.log('updateTrayImage');
const image = nativeImage.createFromDataURL(iconUrl);

this.tray.setImage(image);
Expand Down
10 changes: 10 additions & 0 deletions com.github.IsmaelMartinez.teams_for_linux.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
<url type="bugtracker">https://github.com/IsmaelMartinez/teams-for-linux/issues</url>
<launchable type="desktop-id">com.github.IsmaelMartinez.teams_for_linux.desktop</launchable>
<releases>
<release version="1.4.19" date="2024-04-05">
<description>
<ul>
<li>updating tray icon with the number in the document.title. This is hidden behind a feature flag/config option called useMutationTitleLogic</li>
<li>moved trayIconRenderer out of the activityHub, and to react to events instead.</li>
<li>re-order config readme to show in the right order.</li>
<li>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.</li>
</ul>
</description>
</release>
<release version="1.4.18" date="2024-04-04">
<description>
<ul>
Expand Down

0 comments on commit 9949bb4

Please sign in to comment.