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}
|
onRemoveSymbol={removeSymbolAttachmentModal}
|
||||||
onEmojiSelect={insertTextAndUpdateCursorAttachmentModal}
|
onEmojiSelect={insertTextAndUpdateCursorAttachmentModal}
|
||||||
editingMessage={editingMessage}
|
editingMessage={editingMessage}
|
||||||
|
onSendWhenOnline={handleSendWhenOnline}
|
||||||
|
canScheduleUntilOnline={canScheduleUntilOnline && !isViewOnceEnabled}
|
||||||
/>
|
/>
|
||||||
<PollModal
|
<PollModal
|
||||||
isOpen={pollModal.isOpen}
|
isOpen={pollModal.isOpen}
|
||||||
|
|||||||
@ -85,6 +85,8 @@ export type OwnProps = {
|
|||||||
onCustomEmojiSelect: (emoji: ApiSticker) => void;
|
onCustomEmojiSelect: (emoji: ApiSticker) => void;
|
||||||
onRemoveSymbol: VoidFunction;
|
onRemoveSymbol: VoidFunction;
|
||||||
onEmojiSelect: (emoji: string) => void;
|
onEmojiSelect: (emoji: string) => void;
|
||||||
|
canScheduleUntilOnline?: boolean;
|
||||||
|
onSendWhenOnline?: NoneToVoidFunction;
|
||||||
};
|
};
|
||||||
|
|
||||||
type StateProps = {
|
type StateProps = {
|
||||||
@ -140,6 +142,8 @@ const AttachmentModal: FC<OwnProps & StateProps> = ({
|
|||||||
onCustomEmojiSelect,
|
onCustomEmojiSelect,
|
||||||
onRemoveSymbol,
|
onRemoveSymbol,
|
||||||
onEmojiSelect,
|
onEmojiSelect,
|
||||||
|
canScheduleUntilOnline,
|
||||||
|
onSendWhenOnline,
|
||||||
}) => {
|
}) => {
|
||||||
// eslint-disable-next-line no-null/no-null
|
// eslint-disable-next-line no-null/no-null
|
||||||
const ref = useRef<HTMLDivElement>(null);
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
@ -706,6 +710,8 @@ const AttachmentModal: FC<OwnProps & StateProps> = ({
|
|||||||
onClose={handleContextMenuClose}
|
onClose={handleContextMenuClose}
|
||||||
onCloseAnimationEnd={handleContextMenuHide}
|
onCloseAnimationEnd={handleContextMenuHide}
|
||||||
isSavedMessages={isChatWithSelf}
|
isSavedMessages={isChatWithSelf}
|
||||||
|
onSendWhenOnline={onSendWhenOnline}
|
||||||
|
canScheduleUntilOnline={canScheduleUntilOnline}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user