Skip to content

Commit

Permalink
Make mobile chat inbox unavailable message unsticky (#3434)
Browse files Browse the repository at this point in the history
  • Loading branch information
dharit-tan authored May 25, 2023
1 parent f11f266 commit 536d3c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/mobile/src/screens/chat-screen/ChatScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@ export const ChatScreen = () => {
maintainVisibleContentPosition={
maintainVisibleContentPosition
}
ListHeaderComponent={
canSendMessage ? null : <ChatUnavailable chatId={chatId} />
}
/>
</View>
)}
Expand All @@ -521,9 +524,7 @@ export const ChatScreen = () => {
<View style={styles.whiteBackground} />
<ChatTextInput chatId={chatId} />
</View>
) : (
<ChatUnavailable chatId={chatId} />
)}
) : null}
</KeyboardAvoidingView>
</View>
</ScreenContent>
Expand Down
2 changes: 2 additions & 0 deletions packages/mobile/src/screens/chat-screen/ChatUnavailable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ export const ChatUnavailable = ({ chatId }: ChatUnavailableProps) => {
handleUnblockPress
])

if (!callToAction) return null

return (
<View style={styles.root}>
{mapChatPermissionActionToContent[callToAction]()}
Expand Down

0 comments on commit 536d3c6

Please sign in to comment.