mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Allow cancelling events whilst they are encrypting (#7483)
This commit is contained in:
parent
59f57e15fe
commit
f620cf9d0e
@ -48,8 +48,8 @@ import EndPollDialog from '../dialogs/EndPollDialog';
|
||||
import { isPollEnded } from '../messages/MPollBody';
|
||||
import { createMapSiteLink } from "../messages/MLocationBody";
|
||||
|
||||
export function canCancel(eventStatus: EventStatus): boolean {
|
||||
return eventStatus === EventStatus.QUEUED || eventStatus === EventStatus.NOT_SENT;
|
||||
export function canCancel(status: EventStatus): boolean {
|
||||
return status === EventStatus.QUEUED || status === EventStatus.NOT_SENT || status === EventStatus.ENCRYPTING;
|
||||
}
|
||||
|
||||
export interface IEventTileOps {
|
||||
@ -258,10 +258,6 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
|
||||
});
|
||||
}
|
||||
|
||||
private getPendingReactions(): MatrixEvent[] {
|
||||
return this.getReactions(e => canCancel(e.status));
|
||||
}
|
||||
|
||||
private getUnsentReactions(): MatrixEvent[] {
|
||||
return this.getReactions(e => e.status === EventStatus.NOT_SENT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user