mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-04 07:10:06 +08:00
fix(prefs): Make General preferences tab be the initially selected one
This commit is contained in:
parent
aa57ab3990
commit
f153d4befc
1 changed files with 3 additions and 1 deletions
|
@ -4,6 +4,8 @@ AccountStore = require './account-store'
|
|||
Actions = require '../actions'
|
||||
Immutable = require 'immutable'
|
||||
|
||||
MAIN_TAB_ITEM_ID = 'General'
|
||||
|
||||
class TabItem
|
||||
constructor: (opts={}) ->
|
||||
opts.order ?= Infinity
|
||||
|
@ -52,7 +54,7 @@ class PreferencesUIStore extends NylasStore
|
|||
registerPreferencesTab: (tabItem) ->
|
||||
@_tabs = @_tabs.push(tabItem).sort (a, b) =>
|
||||
a.order > b.order
|
||||
if @_tabs.size is 1
|
||||
if tabItem.tabId is MAIN_TAB_ITEM_ID
|
||||
@_selection = @_selection.set('tabId', tabItem.tabId)
|
||||
@_triggerDebounced()
|
||||
|
||||
|
|
Loading…
Reference in a new issue