mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 08:16:09 +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
|
@ -138,10 +138,14 @@ class ThreadListStore extends NylasStore
|
|||
|
||||
_onToggleStarFocused: ->
|
||||
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)
|
||||
Actions.queueTask(task)
|
||||
if task
|
||||
Actions.queueTask(task)
|
||||
|
||||
_onArchive: ->
|
||||
@_archiveAndShiftBy('auto')
|
||||
|
|
Loading…
Reference in a new issue