mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-06 08:08:10 +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'
|
Actions = require '../actions'
|
||||||
Immutable = require 'immutable'
|
Immutable = require 'immutable'
|
||||||
|
|
||||||
|
MAIN_TAB_ITEM_ID = 'General'
|
||||||
|
|
||||||
class TabItem
|
class TabItem
|
||||||
constructor: (opts={}) ->
|
constructor: (opts={}) ->
|
||||||
opts.order ?= Infinity
|
opts.order ?= Infinity
|
||||||
|
@ -52,7 +54,7 @@ class PreferencesUIStore extends NylasStore
|
||||||
registerPreferencesTab: (tabItem) ->
|
registerPreferencesTab: (tabItem) ->
|
||||||
@_tabs = @_tabs.push(tabItem).sort (a, b) =>
|
@_tabs = @_tabs.push(tabItem).sort (a, b) =>
|
||||||
a.order > b.order
|
a.order > b.order
|
||||||
if @_tabs.size is 1
|
if tabItem.tabId is MAIN_TAB_ITEM_ID
|
||||||
@_selection = @_selection.set('tabId', tabItem.tabId)
|
@_selection = @_selection.set('tabId', tabItem.tabId)
|
||||||
@_triggerDebounced()
|
@_triggerDebounced()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue