omg3
This commit is contained in:
parent
bb1202a38d
commit
73a2d20712
4
.env
4
.env
@ -1,5 +1,5 @@
|
|||||||
API_ID=1025907
|
API_ID=1025907
|
||||||
API_HASH=452b0359b988148995f22ff0f4229750
|
API_HASH=452b0359b988148995f22ff0f4229750
|
||||||
VERSION=1.5.0
|
VERSION=1.5.0
|
||||||
VERSION_FULL=1.5.0 (213)
|
VERSION_FULL=1.5.0 (214)
|
||||||
BUILD=213
|
BUILD=214
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
import MEDIA_MIME_TYPES_SUPPORTED from "../environment/mediaMimeTypesSupport";
|
import MEDIA_MIME_TYPES_SUPPORTED from "../environment/mediaMimeTypesSupport";
|
||||||
import cancelEvent from "../helpers/dom/cancelEvent";
|
import cancelEvent from "../helpers/dom/cancelEvent";
|
||||||
import { attachClickEvent, detachClickEvent } from "../helpers/dom/clickEvent";
|
import { attachClickEvent, detachClickEvent } from "../helpers/dom/clickEvent";
|
||||||
|
import findUpTag from "../helpers/dom/findUpTag";
|
||||||
import setInnerHTML from "../helpers/dom/setInnerHTML";
|
import setInnerHTML from "../helpers/dom/setInnerHTML";
|
||||||
import mediaSizes from "../helpers/mediaSizes";
|
import mediaSizes from "../helpers/mediaSizes";
|
||||||
import SearchListLoader from "../helpers/searchListLoader";
|
import SearchListLoader from "../helpers/searchListLoader";
|
||||||
@ -129,8 +130,9 @@ export default class AppMediaViewer extends AppMediaViewerBase<'caption', 'delet
|
|||||||
attachClickEvent(this.author.container, this.onAuthorClick);
|
attachClickEvent(this.author.container, this.onAuthorClick);
|
||||||
|
|
||||||
const onCaptionClick = (e: MouseEvent) => {
|
const onCaptionClick = (e: MouseEvent) => {
|
||||||
if(e.target instanceof HTMLAnchorElement) { // close viewer if it's t.me/ redirect
|
const a = findUpTag(e.target, 'A');
|
||||||
const onclick = (e.target as HTMLElement).getAttribute('onclick');
|
if(a instanceof HTMLAnchorElement) { // close viewer if it's t.me/ redirect
|
||||||
|
const onclick = a.getAttribute('onclick');
|
||||||
if(!onclick || onclick.includes('showMaskedAlert')) {
|
if(!onclick || onclick.includes('showMaskedAlert')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -138,15 +140,15 @@ export default class AppMediaViewer extends AppMediaViewerBase<'caption', 'delet
|
|||||||
cancelEvent(e);
|
cancelEvent(e);
|
||||||
|
|
||||||
this.close().then(() => {
|
this.close().then(() => {
|
||||||
detachClickEvent(this.content.caption, onCaptionClick, {capture: true});
|
this.content.caption.removeEventListener('click', onCaptionClick, {capture: true});
|
||||||
(e.target as HTMLAnchorElement).click();
|
a.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
attachClickEvent(this.content.caption, onCaptionClick, {capture: true});
|
this.content.caption.addEventListener('click', onCaptionClick, {capture: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* public close(e?: MouseEvent) {
|
/* public close(e?: MouseEvent) {
|
||||||
|
@ -21,7 +21,7 @@ import debounce from "../helpers/schedulers/debounce";
|
|||||||
import windowSize from "../helpers/windowSize";
|
import windowSize from "../helpers/windowSize";
|
||||||
import type { IsPeerType } from "../lib/appManagers/appPeersManager";
|
import type { IsPeerType } from "../lib/appManagers/appPeersManager";
|
||||||
import { generateDelimiter, SettingSection } from "./sidebarLeft";
|
import { generateDelimiter, SettingSection } from "./sidebarLeft";
|
||||||
import { attachClickEvent } from "../helpers/dom/clickEvent";
|
import { attachClickEvent, simulateClickEvent } from "../helpers/dom/clickEvent";
|
||||||
import filterUnique from "../helpers/array/filterUnique";
|
import filterUnique from "../helpers/array/filterUnique";
|
||||||
import indexOfAndSplice from "../helpers/array/indexOfAndSplice";
|
import indexOfAndSplice from "../helpers/array/indexOfAndSplice";
|
||||||
import safeAssign from "../helpers/object/safeAssign";
|
import safeAssign from "../helpers/object/safeAssign";
|
||||||
@ -187,7 +187,7 @@ export default class AppSelectPeers {
|
|||||||
if(!li) {
|
if(!li) {
|
||||||
this.remove(peerId.toPeerId());
|
this.remove(peerId.toPeerId());
|
||||||
} else {
|
} else {
|
||||||
li.click();
|
simulateClickEvent(li);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import copy from "../../../helpers/object/copy";
|
|||||||
import forEachReverse from "../../../helpers/array/forEachReverse";
|
import forEachReverse from "../../../helpers/array/forEachReverse";
|
||||||
import setInnerHTML from "../../../helpers/dom/setInnerHTML";
|
import setInnerHTML from "../../../helpers/dom/setInnerHTML";
|
||||||
import wrapEmojiText from "../../../lib/richTextProcessor/wrapEmojiText";
|
import wrapEmojiText from "../../../lib/richTextProcessor/wrapEmojiText";
|
||||||
import { attachClickEvent } from "../../../helpers/dom/clickEvent";
|
import { attachClickEvent, simulateClickEvent } from "../../../helpers/dom/clickEvent";
|
||||||
|
|
||||||
export default class AppIncludedChatsTab extends SliderSuperTab {
|
export default class AppIncludedChatsTab extends SliderSuperTab {
|
||||||
private editFolderTab: AppEditFolderTab;
|
private editFolderTab: AppEditFolderTab;
|
||||||
@ -251,7 +251,7 @@ export default class AppIncludedChatsTab extends SliderSuperTab {
|
|||||||
for(const flag in filter.pFlags) {
|
for(const flag in filter.pFlags) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if(details.hasOwnProperty(flag) && !!filter.pFlags[flag]) {
|
if(details.hasOwnProperty(flag) && !!filter.pFlags[flag]) {
|
||||||
(categoriesSection.content.querySelector(`[data-peer-id="${flag}"]`) as HTMLElement).click();
|
simulateClickEvent(categoriesSection.content.querySelector(`[data-peer-id="${flag}"]`) as HTMLElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user