[Glitch] Fix incorrect locked account warning in composer

Port 04a9252a93 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Claire
2025-03-29 19:06:46 +01:00
parent 8efc381063
commit 20fc2e558c

View File

@@ -11,7 +11,7 @@ import { HASHTAG_PATTERN_REGEX } from 'flavours/glitch/utils/hashtags';
const selector = createSelector(
(state: RootState) => state.compose.get('privacy') as string,
(state: RootState) => !!state.compose.getIn(['accounts', me, 'locked']),
(state: RootState) => !!state.accounts.getIn([me, 'locked']),
(state: RootState) => state.compose.get('text') as string,
(privacy, locked, text) => ({
needsLockWarning: privacy === 'private' && !locked,