@@ -16,7 +16,6 @@ import {
1616 getOurPrimaryConversation ,
1717 useGlobalUnreadMessageCount ,
1818} from '../../state/selectors/conversations' ;
19- import { getFocusedSection } from '../../state/selectors/section' ;
2019import { getOurNumber } from '../../state/selectors/user' ;
2120
2221import { DecryptedAttachmentsManager } from '../../session/crypto/DecryptedAttachmentsManager' ;
@@ -46,7 +45,6 @@ import { useHotkey } from '../../hooks/useHotkey';
4645import { useIsDarkTheme } from '../../state/theme/selectors/theme' ;
4746import { switchThemeTo } from '../../themes/switchTheme' ;
4847import { getOppositeTheme } from '../../util/theme' ;
49- import { SessionNotificationCount } from '../icon/SessionNotificationCount' ;
5048import { getIsModalVisible } from '../../state/selectors/modal' ;
5149
5250import { MessageQueue } from '../../session/sending' ;
@@ -89,14 +87,11 @@ function handleThemeSwitch() {
8987
9088const Section = ( props : { type : SectionType } ) => {
9189 const ourNumber = useSelector ( getOurNumber ) ;
92- const globalUnreadMessageCount = useGlobalUnreadMessageCount ( ) ;
9390 const dispatch = useDispatch ( ) ;
9491 const { type } = props ;
9592
9693 const isModalVisible = useSelector ( getIsModalVisible ) ;
9794 const isDarkTheme = useIsDarkTheme ( ) ;
98- const focusedSection = useSelector ( getFocusedSection ) ;
99- const isSelected = focusedSection === type ;
10095
10196 const handleClick = ( ) => {
10297 if ( type === SectionType . DebugMenu ) {
@@ -114,14 +109,12 @@ const Section = (props: { type: SectionType }) => {
114109 }
115110 // message section
116111 dispatch ( searchActions . clearSearch ( ) ) ;
117- dispatch ( sectionActions . showLeftPaneSection ( type ) ) ;
118112 dispatch ( sectionActions . resetLeftOverlayMode ( ) ) ;
119113 } ;
120114
121115 useHotkey ( 'Escape' , ( ) => {
122116 if ( ! isModalVisible ) {
123117 dispatch ( searchActions . clearSearch ( ) ) ;
124- dispatch ( sectionActions . showLeftPaneSection ( SectionType . Message ) ) ;
125118 dispatch ( sectionActions . resetLeftOverlayMode ( ) ) ;
126119 }
127120 } ) ;
@@ -140,29 +133,14 @@ const Section = (props: { type: SectionType }) => {
140133 ) ;
141134 }
142135
143- const unreadToShow = type === SectionType . Message ? globalUnreadMessageCount : undefined ;
144-
145136 const buttonProps = {
146137 iconSize : 'medium' ,
147138 padding : 'var(--margins-lg)' ,
148139 onClick : handleClick ,
149- isSelected,
140+ isSelected : false ,
150141 } satisfies Omit < SessionLucideIconButtonProps , 'unicode' | 'dataTestId' > ;
151142
152143 switch ( type ) {
153- case SectionType . Message :
154- return (
155- < SessionLucideIconButton
156- { ...buttonProps }
157- dataTestId = "message-section"
158- unicode = { LUCIDE_ICONS_UNICODE . MESSAGE_SQUARE }
159- style = { {
160- position : 'relative' ,
161- } }
162- >
163- { Boolean ( unreadToShow ) && < SessionNotificationCount count = { unreadToShow } /> }
164- </ SessionLucideIconButton >
165- ) ;
166144 case SectionType . DebugMenu :
167145 return (
168146 < SessionLucideIconButton
@@ -176,6 +154,7 @@ const Section = (props: { type: SectionType }) => {
176154 return (
177155 < SessionLucideIconButton
178156 { ...buttonProps }
157+ margin = "auto 0 0 0"
179158 unicode = { isDarkTheme ? LUCIDE_ICONS_UNICODE . MOON : LUCIDE_ICONS_UNICODE . SUN_MEDIUM }
180159 dataTestId = "theme-section"
181160 />
@@ -362,7 +341,6 @@ export const ActionsPanel = () => {
362341 < >
363342 < LeftPaneSectionContainer data-testid = "leftpane-section-container" >
364343 < Section type = { SectionType . Profile } />
365- < Section type = { SectionType . Message } />
366344 { showDebugMenu && < Section type = { SectionType . DebugMenu } /> }
367345 < Section type = { SectionType . ThemeSwitch } />
368346 </ LeftPaneSectionContainer >
0 commit comments