Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit f620cf9

Browse files
authored
Allow cancelling events whilst they are encrypting (#7483)
1 parent 59f57e1 commit f620cf9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/components/views/context_menus/MessageContextMenu.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ import EndPollDialog from '../dialogs/EndPollDialog';
4848
import { isPollEnded } from '../messages/MPollBody';
4949
import { createMapSiteLink } from "../messages/MLocationBody";
5050

51-
export function canCancel(eventStatus: EventStatus): boolean {
52-
return eventStatus === EventStatus.QUEUED || eventStatus === EventStatus.NOT_SENT;
51+
export function canCancel(status: EventStatus): boolean {
52+
return status === EventStatus.QUEUED || status === EventStatus.NOT_SENT || status === EventStatus.ENCRYPTING;
5353
}
5454

5555
export interface IEventTileOps {
@@ -258,10 +258,6 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
258258
});
259259
}
260260

261-
private getPendingReactions(): MatrixEvent[] {
262-
return this.getReactions(e => canCancel(e.status));
263-
}
264-
265261
private getUnsentReactions(): MatrixEvent[] {
266262
return this.getReactions(e => e.status === EventStatus.NOT_SENT);
267263
}

0 commit comments

Comments
 (0)