diff --git a/internal_packages/account-sidebar/lib/account-sidebar-category-item.cjsx b/internal_packages/account-sidebar/lib/account-sidebar-category-item.cjsx index bd2b78fad..755e795fc 100644 --- a/internal_packages/account-sidebar/lib/account-sidebar-category-item.cjsx +++ b/internal_packages/account-sidebar/lib/account-sidebar-category-item.cjsx @@ -47,10 +47,20 @@ class AccountSidebarCategoryItem extends React.Component onDragStateChange={ ({isDropping}) => @setState({isDropping}) } onDrop={@_onDrop}> {unread} - + + {@_renderIcon()} {@props.item.displayName} + _renderIcon: -> + if @props.sectionType is "category" and NamespaceStore.current() + if NamespaceStore.current().usesLabels() + + else + + else if @props.sectionType is "mailboxes" + + _shouldAcceptDrop: (e) => return false if @props.item.name in CategoryStore.LockedCategoryNames return false if @props.item.name is FocusedCategoryStore.categoryName() diff --git a/internal_packages/account-sidebar/lib/account-sidebar-store.coffee b/internal_packages/account-sidebar/lib/account-sidebar-store.coffee index a02ffbfe7..6ab244019 100644 --- a/internal_packages/account-sidebar/lib/account-sidebar-store.coffee +++ b/internal_packages/account-sidebar/lib/account-sidebar-store.coffee @@ -60,7 +60,7 @@ class AccountSidebarStore extends NylasStore @_sections = [] if featureSheets.length > 0 @_sections.push { label: '', items: featureSheets, type: 'sheet' } - @_sections.push { label: 'Mailboxes', items: standardCategories, type: 'category' } + @_sections.push { label: 'Mailboxes', items: standardCategories, type: 'mailboxes' } @_sections.push { label: 'Views', items: extraSheets, type: 'sheet' } @_sections.push { label: CategoryStore.categoryLabel(), items: userCategories, type: 'category' } diff --git a/internal_packages/account-sidebar/lib/account-sidebar.cjsx b/internal_packages/account-sidebar/lib/account-sidebar.cjsx index fc1fe484f..562b5d285 100644 --- a/internal_packages/account-sidebar/lib/account-sidebar.cjsx +++ b/internal_packages/account-sidebar/lib/account-sidebar.cjsx @@ -42,7 +42,7 @@ class AccountSidebar extends React.Component _itemComponents: (section) => section.items?.map (item) => - if section.type is 'category' + if section.type is 'mailboxes' or section.type is 'category' itemClass = AccountSidebarCategoryItem else if section.type is 'sheet' itemClass = item.sidebarComponent ? SidebarSheetItem @@ -52,6 +52,7 @@ class AccountSidebar extends React.Component _onStoreChange: =>