Mailspring/internal_packages/mode-switch/lib/main.coffee
dillon b61cdc6f32 fix(mode-toggle): mode toggler now toggles the sidebar rather than the list/split view. fixes T3462.
Summary:
add functioning toggling

add correct hide/show behavior for toggler

remove old hide/show button

add padding to make buttons prettier

Test Plan: tested manually. all tests remain green.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T3462

Differential Revision: https://phab.nylas.com/D1980
2015-09-04 12:32:19 -07:00

20 lines
639 B
CoffeeScript

{ComponentRegistry, WorkspaceStore} = require 'nylas-exports'
ModeToggle = require './mode-toggle'
# NOTE: this is a hack to allow ComponentRegistry
# to register the same component multiple times in
# different areas. if we do this more than once, let's
# dry this out.
class ModeToggleList extends ModeToggle
@displayName: 'ModeToggleList'
module.exports =
activate: (state) ->
ComponentRegistry.register ModeToggleList,
location: WorkspaceStore.Sheet.Thread.Toolbar.Right
modes: ['list']
ComponentRegistry.register ModeToggle,
location: WorkspaceStore.Sheet.Threads.Toolbar.Right
modes: ['split']