Attachment Modal: Add Send When Online (#5219)
This commit is contained in:
parent
20732fac61
commit
c91287635e
@ -1654,6 +1654,8 @@ const Composer: FC<OwnProps & StateProps> = ({
|
||||
onRemoveSymbol={removeSymbolAttachmentModal}
|
||||
onEmojiSelect={insertTextAndUpdateCursorAttachmentModal}
|
||||
editingMessage={editingMessage}
|
||||
onSendWhenOnline={handleSendWhenOnline}
|
||||
canScheduleUntilOnline={canScheduleUntilOnline && !isViewOnceEnabled}
|
||||
/>
|
||||
<PollModal
|
||||
isOpen={pollModal.isOpen}
|
||||
|
||||
@ -85,6 +85,8 @@ export type OwnProps = {
|
||||
onCustomEmojiSelect: (emoji: ApiSticker) => void;
|
||||
onRemoveSymbol: VoidFunction;
|
||||
onEmojiSelect: (emoji: string) => void;
|
||||
canScheduleUntilOnline?: boolean;
|
||||
onSendWhenOnline?: NoneToVoidFunction;
|
||||
};
|
||||
|
||||
type StateProps = {
|
||||
@ -140,6 +142,8 @@ const AttachmentModal: FC<OwnProps & StateProps> = ({
|
||||
onCustomEmojiSelect,
|
||||
onRemoveSymbol,
|
||||
onEmojiSelect,
|
||||
canScheduleUntilOnline,
|
||||
onSendWhenOnline,
|
||||
}) => {
|
||||
// eslint-disable-next-line no-null/no-null
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
@ -706,6 +710,8 @@ const AttachmentModal: FC<OwnProps & StateProps> = ({
|
||||
onClose={handleContextMenuClose}
|
||||
onCloseAnimationEnd={handleContextMenuHide}
|
||||
isSavedMessages={isChatWithSelf}
|
||||
onSendWhenOnline={onSendWhenOnline}
|
||||
canScheduleUntilOnline={canScheduleUntilOnline}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user