Browse Source

Fix cancel selection in album

master
Eduard Kuzmenko 4 years ago
parent
commit
cf8e2aacc6
  1. 9
      src/components/chat/selection.ts

9
src/components/chat/selection.ts

@ -8,6 +8,7 @@ import CheckboxField from "../checkbox"; @@ -8,6 +8,7 @@ import CheckboxField from "../checkbox";
import PopupDeleteMessages from "../popupDeleteMessages";
import PopupForward from "../popupForward";
import { toast } from "../toast";
import BubbleGroups from "../bubbleGroups";
const SetTransition = (element: HTMLElement, className: string, forwards: boolean, duration: number, onTransitionEnd?: () => void) => {
const timeout = element.dataset.timeout;
@ -293,10 +294,14 @@ export default class ChatSelection { @@ -293,10 +294,14 @@ export default class ChatSelection {
public cancelSelection = () => {
for(const mid of this.selectedMids) {
const bubble = this.appImManager.bubbles[mid];
const mounted = this.appImManager.getMountedBubble(mid);
if(mounted) {
this.toggleByBubble(mounted.message.grouped_id ? mounted.bubble.querySelector(`.album-item[data-mid="${mid}"]`) : mounted.bubble);
}
/* const bubble = this.appImManager.bubbles[mid];
if(bubble) {
this.toggleByBubble(bubble);
}
} */
}
this.selectedMids.clear();

Loading…
Cancel
Save