Pause story while attempting to DOE
This commit is contained in:
parent
169d89aa0b
commit
7b9807d464
2 changed files with 7 additions and 2 deletions
|
@ -300,10 +300,11 @@ export const StoryViewer = ({
|
||||||
const [pauseStory, setPauseStory] = useState(false);
|
const [pauseStory, setPauseStory] = useState(false);
|
||||||
|
|
||||||
const shouldPauseViewing =
|
const shouldPauseViewing =
|
||||||
|
Boolean(confirmDeleteStory) ||
|
||||||
|
currentViewTarget != null ||
|
||||||
hasActiveCall ||
|
hasActiveCall ||
|
||||||
hasConfirmHideStory ||
|
hasConfirmHideStory ||
|
||||||
hasExpandedCaption ||
|
hasExpandedCaption ||
|
||||||
currentViewTarget != null ||
|
|
||||||
isShowingContextMenu ||
|
isShowingContextMenu ||
|
||||||
pauseStory ||
|
pauseStory ||
|
||||||
Boolean(reactionEmoji);
|
Boolean(reactionEmoji);
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
import type { MessageAttributesType } from '../model-types.d';
|
import type { MessageAttributesType } from '../model-types.d';
|
||||||
import { deletePackReference } from '../types/Stickers';
|
import { deletePackReference } from '../types/Stickers';
|
||||||
import { isStory } from '../messages/helpers';
|
import { isStory } from '../messages/helpers';
|
||||||
|
import { isDirectConversation } from './whatTypeOfConversation';
|
||||||
|
|
||||||
export async function cleanupMessage(
|
export async function cleanupMessage(
|
||||||
message: MessageAttributesType
|
message: MessageAttributesType
|
||||||
|
@ -19,7 +20,10 @@ export async function cleanupMessage(
|
||||||
|
|
||||||
await deleteMessageData(message);
|
await deleteMessageData(message);
|
||||||
|
|
||||||
if (isStory(message)) {
|
if (
|
||||||
|
isStory(message) &&
|
||||||
|
isDirectConversation(parentConversation?.attributes)
|
||||||
|
) {
|
||||||
await fixupStoryReplies(conversationId, id);
|
await fixupStoryReplies(conversationId, id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue