mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
fix(message-list): allow starring messages by pressing 's'. Fixes T2430.
Summary: Although this code works as desired, I think the code itself could use some work. Also, I didn't know how I should test this. Any ideas? @bengotow Test Plan: I'm all ears Reviewers: bengotow Reviewed By: bengotow Subscribers: bengotow Maniphest Tasks: T2430 Differential Revision: https://phab.nylas.com/D1877
This commit is contained in:
parent
56ad7603b9
commit
50575f1a82
1 changed files with 7 additions and 3 deletions
|
@ -138,10 +138,14 @@ class ThreadListStore extends NylasStore
|
||||||
|
|
||||||
_onToggleStarFocused: ->
|
_onToggleStarFocused: ->
|
||||||
focused = FocusedContentStore.focused('thread')
|
focused = FocusedContentStore.focused('thread')
|
||||||
return unless focused
|
cursor = FocusedContentStore.keyboardCursor('thread')
|
||||||
|
if focused
|
||||||
|
task = new ChangeStarredTask(thread: focused, starred: !focused.starred)
|
||||||
|
else if cursor
|
||||||
|
task = new ChangeStarredTask(thread: cursor, starred: !cursor.starred)
|
||||||
|
|
||||||
task = new ChangeStarredTask(thread: focused, starred: !focused.starred)
|
if task
|
||||||
Actions.queueTask(task)
|
Actions.queueTask(task)
|
||||||
|
|
||||||
_onArchive: ->
|
_onArchive: ->
|
||||||
@_archiveAndShiftBy('auto')
|
@_archiveAndShiftBy('auto')
|
||||||
|
|
Loading…
Reference in a new issue