mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-20 07:16:08 +08:00
Select Unread and Mark as Read > Mark All as Read #2164
This commit is contained in:
parent
99f56a50e6
commit
3b07b0767f
|
@ -27,6 +27,7 @@ export default [
|
|||
['core:mark-as-unread', localized('Mark as %@', localized('Unread'))],
|
||||
['core:mark-important', localized('Mark as %@', localized('Important')) + ' (Gmail)'],
|
||||
['core:mark-unimportant', localized('Mark as %@', localized('Not Important')) + ' (Gmail)'],
|
||||
['thread-list:mark-all-as-read', localized('Mark All as %@', localized('Read'))],
|
||||
['core:remove-and-previous', localized('Remove and show previous')],
|
||||
['core:remove-and-next', localized('Remove and show next')],
|
||||
],
|
||||
|
@ -41,7 +42,6 @@ export default [
|
|||
['thread-list:select-unread', localized('Select all unread conversations')],
|
||||
['thread-list:select-starred', localized('Select all starred conversations')],
|
||||
['thread-list:select-unstarred', localized('Select all unstarred conversations')],
|
||||
['thread-list:select-unread-mark-as-read', localized('Select Unread and Mark as Read')],
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -118,7 +118,7 @@ class ThreadList extends React.Component<{}, { style: string; syncing: boolean }
|
|||
'thread-list:select-unread': this._onSelectUnread,
|
||||
'thread-list:select-starred': this._onSelectStarred,
|
||||
'thread-list:select-unstarred': this._onSelectUnstarred,
|
||||
'thread-list:select-unread-mark-as-read': this._onSelectUnreadMarkAsRead,
|
||||
'thread-list:mark-all-as-read': this._onMarkAllAsRead,
|
||||
}}
|
||||
onDoubleClick={thread => Actions.popoutThread(thread)}
|
||||
onDragItems={this._onDragItems}
|
||||
|
@ -238,10 +238,15 @@ class ThreadList extends React.Component<{}, { style: string; syncing: boolean }
|
|||
_onDragEnd = event => {};
|
||||
|
||||
_onResize = (event?: any) => {
|
||||
const narrowStyleWidth = DOMUtils.getWorkspaceCssNumberProperty('thread-list-narrow-style-width', 540);
|
||||
const narrowStyleWidth = DOMUtils.getWorkspaceCssNumberProperty(
|
||||
'thread-list-narrow-style-width',
|
||||
540
|
||||
);
|
||||
const current = this.state.style;
|
||||
const desired =
|
||||
(ReactDOM.findDOMNode(this) as HTMLElement).offsetWidth < narrowStyleWidth ? 'narrow' : 'wide';
|
||||
(ReactDOM.findDOMNode(this) as HTMLElement).offsetWidth < narrowStyleWidth
|
||||
? 'narrow'
|
||||
: 'wide';
|
||||
if (current !== desired) {
|
||||
this.setState({ style: desired });
|
||||
}
|
||||
|
@ -285,7 +290,7 @@ class ThreadList extends React.Component<{}, { style: string; syncing: boolean }
|
|||
this.refs.list.handler().onSelect(items);
|
||||
};
|
||||
|
||||
_onSelectUnreadMarkAsRead = () => {
|
||||
_onMarkAllAsRead = () => {
|
||||
const dataSource = ThreadListStore.dataSource();
|
||||
const items = dataSource.itemsCurrentlyInViewMatching(item => item.unread) as Thread[];
|
||||
|
||||
|
|
|
@ -73,7 +73,10 @@ module.exports = {
|
|||
{ label: localized('Select All Starred'), command: 'thread-list:select-starred' },
|
||||
{ label: localized('Select All Unstarred'), command: 'thread-list:select-unstarred' },
|
||||
{ type: 'separator' },
|
||||
{ label: localized('Select Unread and Mark as Read'), command: 'thread-list:select-unread-mark-as-read' },
|
||||
{
|
||||
label: localized('Mark All as %@', localized('Read')),
|
||||
command: 'thread-list:mark-all-as-read',
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: localized('Find'),
|
||||
|
|
|
@ -41,7 +41,10 @@ module.exports = {
|
|||
{ label: localized('Select All Starred'), command: 'thread-list:select-starred' },
|
||||
{ label: localized('Select All Unstarred'), command: 'thread-list:select-unstarred' },
|
||||
{ type: 'separator' },
|
||||
{ label: localized('Select Unread and Mark as Read'), command: 'thread-list:select-unread-mark-as-read' },
|
||||
{
|
||||
label: localized('Mark All as %@', localized('Read')),
|
||||
command: 'thread-list:mark-all-as-read',
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: localized('Find'),
|
||||
|
|
|
@ -20,7 +20,10 @@ module.exports = {
|
|||
{ label: localized('Select All Starred'), command: 'thread-list:select-starred' },
|
||||
{ label: localized('Select All Unstarred'), command: 'thread-list:select-unstarred' },
|
||||
{ type: 'separator' },
|
||||
{ label: localized('Select Unread and Mark as Read'), command: 'thread-list:select-unread-mark-as-read' },
|
||||
{
|
||||
label: localized('Mark All as %@', localized('Read')),
|
||||
command: 'thread-list:mark-all-as-read',
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: localized('Find'),
|
||||
|
|
Loading…
Reference in a new issue