1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2021-02-10 00:40:44 +01:00
parent c46888acab
commit a40a645337
31 changed files with 593 additions and 558 deletions

View File

@ -75,7 +75,12 @@ const ScreenCompose: React.FC<ScreenComposeProp> = ({
setHasKeyboard(false)
}
// const draft = useSelector(getLocalDraft, () => true)
const localAccount = useSelector(getLocalAccount, (prev, next) =>
prev?.preferences && next?.preferences
? prev?.preferences['posting:default:visibility'] ===
next?.preferences['posting:default:visibility']
: true
)
const initialReducerState = useMemo(() => {
if (params) {
return composeParseState(params)
@ -92,7 +97,6 @@ const ScreenCompose: React.FC<ScreenComposeProp> = ({
}
}, [])
const localAccount = useSelector(getLocalAccount)
const [composeState, composeDispatch] = useReducer(
composeReducer,
initialReducerState