@@ -16,7 +16,6 @@ import {
16
16
getOurPrimaryConversation ,
17
17
useGlobalUnreadMessageCount ,
18
18
} from '../../state/selectors/conversations' ;
19
- import { getFocusedSection } from '../../state/selectors/section' ;
20
19
import { getOurNumber } from '../../state/selectors/user' ;
21
20
22
21
import { DecryptedAttachmentsManager } from '../../session/crypto/DecryptedAttachmentsManager' ;
@@ -46,7 +45,6 @@ import { useHotkey } from '../../hooks/useHotkey';
46
45
import { useIsDarkTheme } from '../../state/theme/selectors/theme' ;
47
46
import { switchThemeTo } from '../../themes/switchTheme' ;
48
47
import { getOppositeTheme } from '../../util/theme' ;
49
- import { SessionNotificationCount } from '../icon/SessionNotificationCount' ;
50
48
import { getIsModalVisible } from '../../state/selectors/modal' ;
51
49
52
50
import { MessageQueue } from '../../session/sending' ;
@@ -89,14 +87,11 @@ function handleThemeSwitch() {
89
87
90
88
const Section = ( props : { type : SectionType } ) => {
91
89
const ourNumber = useSelector ( getOurNumber ) ;
92
- const globalUnreadMessageCount = useGlobalUnreadMessageCount ( ) ;
93
90
const dispatch = useDispatch ( ) ;
94
91
const { type } = props ;
95
92
96
93
const isModalVisible = useSelector ( getIsModalVisible ) ;
97
94
const isDarkTheme = useIsDarkTheme ( ) ;
98
- const focusedSection = useSelector ( getFocusedSection ) ;
99
- const isSelected = focusedSection === type ;
100
95
101
96
const handleClick = ( ) => {
102
97
if ( type === SectionType . DebugMenu ) {
@@ -114,14 +109,12 @@ const Section = (props: { type: SectionType }) => {
114
109
}
115
110
// message section
116
111
dispatch ( searchActions . clearSearch ( ) ) ;
117
- dispatch ( sectionActions . showLeftPaneSection ( type ) ) ;
118
112
dispatch ( sectionActions . resetLeftOverlayMode ( ) ) ;
119
113
} ;
120
114
121
115
useHotkey ( 'Escape' , ( ) => {
122
116
if ( ! isModalVisible ) {
123
117
dispatch ( searchActions . clearSearch ( ) ) ;
124
- dispatch ( sectionActions . showLeftPaneSection ( SectionType . Message ) ) ;
125
118
dispatch ( sectionActions . resetLeftOverlayMode ( ) ) ;
126
119
}
127
120
} ) ;
@@ -140,29 +133,14 @@ const Section = (props: { type: SectionType }) => {
140
133
) ;
141
134
}
142
135
143
- const unreadToShow = type === SectionType . Message ? globalUnreadMessageCount : undefined ;
144
-
145
136
const buttonProps = {
146
137
iconSize : 'medium' ,
147
138
padding : 'var(--margins-lg)' ,
148
139
onClick : handleClick ,
149
- isSelected,
140
+ isSelected : false ,
150
141
} satisfies Omit < SessionLucideIconButtonProps , 'unicode' | 'dataTestId' > ;
151
142
152
143
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
- ) ;
166
144
case SectionType . DebugMenu :
167
145
return (
168
146
< SessionLucideIconButton
@@ -176,6 +154,7 @@ const Section = (props: { type: SectionType }) => {
176
154
return (
177
155
< SessionLucideIconButton
178
156
{ ...buttonProps }
157
+ margin = "auto 0 0 0"
179
158
unicode = { isDarkTheme ? LUCIDE_ICONS_UNICODE . MOON : LUCIDE_ICONS_UNICODE . SUN_MEDIUM }
180
159
dataTestId = "theme-section"
181
160
/>
@@ -362,7 +341,6 @@ export const ActionsPanel = () => {
362
341
< >
363
342
< LeftPaneSectionContainer data-testid = "leftpane-section-container" >
364
343
< Section type = { SectionType . Profile } />
365
- < Section type = { SectionType . Message } />
366
344
{ showDebugMenu && < Section type = { SectionType . DebugMenu } /> }
367
345
< Section type = { SectionType . ThemeSwitch } />
368
346
</ LeftPaneSectionContainer >
0 commit comments