[🐴] Mod disabled (#4089)
* Handle send failures * Add chat disabled state
This commit is contained in:
parent
8b3bfb3cf7
commit
49314e2d1f
6 changed files with 109 additions and 10 deletions
|
|
@ -16,11 +16,12 @@ import {AppBskyRichtextFacet, RichText} from '@atproto/api'
|
|||
import {shortenLinks} from '#/lib/strings/rich-text-manip'
|
||||
import {isIOS, isNative} from '#/platform/detection'
|
||||
import {useConvoActive} from '#/state/messages/convo'
|
||||
import {ConvoItem} from '#/state/messages/convo/types'
|
||||
import {ConvoItem, ConvoStatus} from '#/state/messages/convo/types'
|
||||
import {useAgent} from '#/state/session'
|
||||
import {ScrollProvider} from 'lib/ScrollContext'
|
||||
import {isWeb} from 'platform/detection'
|
||||
import {List} from 'view/com/util/List'
|
||||
import {ChatDisabled} from '#/screens/Messages/Conversation/ChatDisabled'
|
||||
import {MessageInput} from '#/screens/Messages/Conversation/MessageInput'
|
||||
import {MessageListError} from '#/screens/Messages/Conversation/MessageListError'
|
||||
import {atoms as a} from '#/alf'
|
||||
|
|
@ -296,10 +297,16 @@ export function MessagesList({
|
|||
/>
|
||||
</ScrollProvider>
|
||||
{!blocked ? (
|
||||
<MessageInput
|
||||
onSendMessage={onSendMessage}
|
||||
scrollToEnd={scrollToEndNow}
|
||||
/>
|
||||
<>
|
||||
{convoState.status === ConvoStatus.Disabled ? (
|
||||
<ChatDisabled />
|
||||
) : (
|
||||
<MessageInput
|
||||
onSendMessage={onSendMessage}
|
||||
scrollToEnd={scrollToEndNow}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
footer
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue