Allow cancelling events whilst they are encrypting (#7483)
This commit is contained in:
parent
59f57e15fe
commit
f620cf9d0e
1 changed files with 2 additions and 6 deletions
|
@ -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 a new issue