Skip to content

Commit

Permalink
Fixing more codacy issues (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
IsmaelMartinez committed Sep 29, 2020
1 parent 52b1718 commit 6959de4
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ The original idea was to let the project die when Microsoft would implement a de
However, the development of this project continued, as it is suprior on some aspects (screen share able to share single windows, normal window border [#281](https://github.com/IsmaelMartinez/teams-for-linux/issues/281#issuecomment-601578412), command-line interface, and, of course, open-source).

Currently, the project is in a stable condition, and should continue as long as needed. Non stable versions are released as pre-release.
IsmaelMartinez is not "implementing new features, only fixing issues, but happy to help and [] accept new PRs" ([351](https://github.com/IsmaelMartinez/teams-for-linux/issues/351#issuecomment-626590582)).
IsmaelMartinez is not "implementing new features, only fixing issues, but happy to help and accept new PRs" ([351](https://github.com/IsmaelMartinez/teams-for-linux/issues/351#issuecomment-626590582)).
10 changes: 5 additions & 5 deletions KNOWN_ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ Some users have reported a blank page on login (with the title `Microsoft Teams

The following workarounds tend to solve the issue:

* Right click on the Microsoft Teams icon tray and click on Refresh. (Ctrl+R)
* Right click on the Microsoft Teams icon tray and click on Refresh. (Ctrl+R)

If the above doesn't work:

* Close the application and delete the application cache folder
* Close the application and delete the application cache folder

* `.config/teams-for-linux/Partitions/teams-4-linux/Application Cache`
* `.config/teams-for-linux/Partitions/teams-4-linux/Application Cache`

* for Snap installation, `snap/teams-for-linux/current/.config/teams-for-linux/Partitions/teams-4-linux/Application Cache`.
* for Snap installation, `snap/teams-for-linux/current/.config/teams-for-linux/Partitions/teams-4-linux/Application Cache`.

* for flatpack, `~/.var/app/com.github.IsmaelMartinez.teams_for_linux/config/teams-for-linux/Partitions/teams-4-linux/Application\ Cache/`
* for flatpack, `~/.var/app/com.github.IsmaelMartinez.teams_for_linux/config/teams-for-linux/Partitions/teams-4-linux/Application\ Cache/`

> Check the config locations to find other installations location
Expand Down
6 changes: 3 additions & 3 deletions app/browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ The [rightClickMenuWithSpellcheck.js](rightClickMenuWithSpellcheck.js) handles t

The notifications folder contains:

* [pageTitleNotifications.js](notifications/pageTitleNotifications.js) file handles the emitting of an event when the page-title changes and indicates that there is an unread message.
* [activityManager.js](notifications/activityManager.js) listens for changes in the chatListService and bellNotificationsService to update the unread count.
* [trayIconRenderer.js](notifications/trayIconRenderer.js) renders a new icon with the number of unread messages.
* [pageTitleNotifications.js](notifications/pageTitleNotifications.js) file handles the emitting of an event when the page-title changes and indicates that there is an unread message.
* [activityManager.js](notifications/activityManager.js) listens for changes in the chatListService and bellNotificationsService to update the unread count.
* [trayIconRenderer.js](notifications/trayIconRenderer.js) renders a new icon with the number of unread messages.

The desktopShare folder contains the logic to add basic destop sharing capabilities to the app.

Expand Down
8 changes: 4 additions & 4 deletions app/browser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
pageTitleNotifications(ipcRenderer);
}

document.addEventListener('DOMContentLoaded',() => {
document.addEventListener('DOMContentLoaded', () => {
modifyAngularSettingsWithTimeot();
});

Expand All @@ -37,7 +37,7 @@

function enableChromeVideoAudioMeetings(injector) {
injector.get('callingSupportService').oneOnOneCallingEnabled = true;
injector.get('callingSupportService').isDesktopApp = true;
injector.get('callingSupportService').isDesktopApp = true;
injector.get('callingSupportService').isChromeMeetingSingleVideoEnabled = true;
injector.get('callingSupportService').isChromeVideoOneOnOneEnabled = true;
injector.get('callingSupportService').isChromeVideoMultipartyEnabled = true;
Expand Down Expand Up @@ -75,7 +75,7 @@
try {
let injector = angular.element(document).injector();

if(injector) {
if (injector) {
enableChromeVideoAudioMeetings(injector);
disablePromoteStuff(injector);

Expand All @@ -91,7 +91,7 @@

Object.defineProperty(navigator.serviceWorker, 'register', {
value: () => {
return Promise.reject()
return Promise.reject();
}
});
}());
Expand Down
14 changes: 7 additions & 7 deletions app/browser/rightClickMenuWithSpellcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,28 @@ webFrame.setSpellCheckProvider(

window.addEventListener('contextmenu', (e) => {
// Only show the context menu in text editors.
let isEditable = e.target.closest('textarea, input, [contenteditable="true"]')
let selection = {}
let template = {}
let isEditable = e.target.closest('textarea, input, [contenteditable="true"]');
let selection = {};
let template = {};
if (isEditable) {
var selectedText = window.getSelection().toString();
var isMisspelled = selectedText && simpleChecker.isMisspelled(selectedText);
var spellingSuggestions = isMisspelled && simpleChecker.getSuggestions(selectedText).slice(0, 5);
selection = {
isMisspelled: isMisspelled,
spellingSuggestions: spellingSuggestions,
}
};
} else {
template = [{
label: 'Copy',
role: 'copy'
},{
}, {
label: 'Copy URL',
click: () => {
clipboard.writeText(e.target.href);
},
visible: (e.target.href ? true: false)
},{
visible: (e.target.href ? true : false)
}, {
type: 'separator'
}, {
label: 'Select All',
Expand Down
6 changes: 3 additions & 3 deletions app/customCSS/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const fs = require('fs');
const path = require('path');

exports.onDidFinishLoad = function onDidFinishLoad(content) {
applyCustomCSSStyleIfPresent(content);
content.insertCSS('#download-mobile-app-button, #download-app-button, #get-app-button { display:none; }');
content.insertCSS('.zoetrope { animation-iteration-count: 1 !important; }');
applyCustomCSSStyleIfPresent(content);
content.insertCSS('#download-mobile-app-button, #download-app-button, #get-app-button { display:none; }');
content.insertCSS('.zoetrope { animation-iteration-count: 1 !important; }');
}

function applyCustomCSSStyleIfPresent(content) {
Expand Down
8 changes: 4 additions & 4 deletions app/menus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To access the main menu, press the 'Alt' key while the application is selected.

[index.js](index.js) is the entry point. That loads the different files in this folder that define each menu and submenu items.

* Application: The [application.js](application.js) file contains the submenu for the application tab. This submenu definition is also in use for the tray menu.
* Help: The help menu is defined in the [help.js](help.js) file.
* Preferences: The preferences submenu gets defined in the [preferences.js](preferences.js) file.
* Tray: [tray.js](tray.js) contains the tray menu and its implementation.
* Application: The [application.js](application.js) file contains the submenu for the application tab. This submenu definition is also in use for the tray menu.
* Help: The help menu is defined in the [help.js](help.js) file.
* Preferences: The preferences submenu gets defined in the [preferences.js](preferences.js) file.
* Tray: [tray.js](tray.js) contains the tray menu and its implementation.

0 comments on commit 6959de4

Please sign in to comment.