mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-04 10:28:46 +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
3a1c74acf0
commit
2c011c703f
1 changed files with 7 additions and 3 deletions
|
@ -138,9 +138,13 @@ 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)
|
task = new ChangeStarredTask(thread: focused, starred: !focused.starred)
|
||||||
|
else if cursor
|
||||||
|
task = new ChangeStarredTask(thread: cursor, starred: !cursor.starred)
|
||||||
|
|
||||||
|
if task
|
||||||
Actions.queueTask(task)
|
Actions.queueTask(task)
|
||||||
|
|
||||||
_onArchive: ->
|
_onArchive: ->
|
||||||
|
|
Loading…
Add table
Reference in a new issue