@@ -15,6 +15,7 @@ Release date: TBD
|
||||
#### All Platforms
|
||||
- Suppress white screen which is displayed for a moment on startup
|
||||
- Support unread indications in team sidebar of Mattermost server 3.6
|
||||
- Remove confusing `Ctrl(CMD)+S` shortcut for searching within a team
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
@@ -146,30 +146,3 @@ notification.override({
|
||||
ipc.sendToHost('onNotificationClick');
|
||||
}
|
||||
});
|
||||
|
||||
// get the last of href for the current channel in the sidebar.
|
||||
function getCurrentChannelString() {
|
||||
const activeChannelLink = document.querySelector('.active a.sidebar-channel');
|
||||
const urlElements = activeChannelLink.href.split('/');
|
||||
return urlElements[urlElements.length - 1];
|
||||
}
|
||||
|
||||
ipc.on('activate-search-box', () => {
|
||||
const searchBoxes = document.getElementsByClassName('search-bar'); // should use id
|
||||
if (searchBoxes.length === 0) {
|
||||
return;
|
||||
}
|
||||
const searchBox = searchBoxes[0];
|
||||
searchBox.focus();
|
||||
searchBox.value = ''; //Clear the input box
|
||||
});
|
||||
|
||||
ipc.on('activate-search-box-in-channel', () => {
|
||||
const searchBoxes = document.getElementsByClassName('search-bar'); // should use id
|
||||
if (searchBoxes.length === 0) {
|
||||
return;
|
||||
}
|
||||
const searchBox = searchBoxes[0];
|
||||
searchBox.focus();
|
||||
searchBox.value = `in:${getCurrentChannelString()} `;
|
||||
});
|
||||
|
@@ -69,14 +69,6 @@ function createTemplate(mainWindow, config) {
|
||||
role: 'paste'
|
||||
}, {
|
||||
role: 'selectall'
|
||||
}, separatorItem, {
|
||||
label: 'Search in Team',
|
||||
accelerator: 'CmdOrCtrl+S',
|
||||
click: (item, focusedWindow) => {
|
||||
if (focusedWindow) {
|
||||
focusedWindow.webContents.send('activate-search-box');
|
||||
}
|
||||
}
|
||||
}]
|
||||
});
|
||||
template.push({
|
||||
|
Reference in New Issue
Block a user