diff --git a/src/components/call/description.ts b/src/components/call/description.ts index ce489da9..217e801d 100644 --- a/src/components/call/description.ts +++ b/src/components/call/description.ts @@ -5,7 +5,6 @@ */ import replaceContent from "../../helpers/dom/replaceContent"; -import type CallInstance from "../../lib/calls/callInstance"; import CALL_STATE from "../../lib/calls/callState"; import { i18n, LangPackKey } from "../../lib/langPack"; @@ -29,7 +28,7 @@ export default class CallDescriptionElement { this.state = undefined; } - public update(instance: CallInstance) { + public update(instance: any) { const {connectionState} = instance; if(this.state === connectionState) { diff --git a/src/components/chat/bubbles.ts b/src/components/chat/bubbles.ts index 8ada50e0..6a737c34 100644 --- a/src/components/chat/bubbles.ts +++ b/src/components/chat/bubbles.ts @@ -1665,11 +1665,12 @@ export default class ChatBubbles { let fallbackToElementStartWhenCentering: HTMLElement; // * if it's a start, then scroll to start of the group - if(bubble && position !== 'end' && whichChild(bubble) === (this.stickyIntersector ? 2 : 1) && this.chat.setPeerPromise) { + if(bubble && position !== 'end' && whichChild(bubble) === (this.stickyIntersector ? 2 : 1)/* && this.chat.setPeerPromise */) { const dateGroup = bubble.parentElement; // if(whichChild(dateGroup) === 0) { - // fallbackToElementStartWhenCentering = dateGroup; - element = dateGroup; + fallbackToElementStartWhenCentering = dateGroup; + // position = 'start'; + // element = dateGroup; // } } diff --git a/src/components/sidebarLeft/index.ts b/src/components/sidebarLeft/index.ts index 781fc9cb..2d25a9dd 100644 --- a/src/components/sidebarLeft/index.ts +++ b/src/components/sidebarLeft/index.ts @@ -595,6 +595,7 @@ export class AppSidebarLeft extends SidebarSlider { appStateManager.releaseSinglePeer(peerId, 'recentSearch'); } + recentSearch.length = 0; appStateManager.pushToState('recentSearch', recentSearch); }); }); diff --git a/src/helpers/fastSmoothScroll.ts b/src/helpers/fastSmoothScroll.ts index 293b6d24..3a16263f 100644 --- a/src/helpers/fastSmoothScroll.ts +++ b/src/helpers/fastSmoothScroll.ts @@ -100,7 +100,7 @@ function scrollWithJs(options: ScrollOptions): Promise { const containerSize = getNormalSize ? getNormalSize({rect: containerRect}) : containerRect[sizeKey]; - const scrollPosition = container[scrollPositionKey]; + let scrollPosition = container[scrollPositionKey]; const scrollSize = container[scrollSizeKey]; /* const elementPosition = element.offsetTop; const elementSize = element.offsetHeight; @@ -154,10 +154,10 @@ function scrollWithJs(options: ScrollOptions): Promise { if(axis === 'y') { if(forceDirection === undefined) { if(path > maxDistance) { - container.scrollTop += path - maxDistance; + scrollPosition = container.scrollTop += path - maxDistance; path = maxDistance; } else if(path < -maxDistance) { - container.scrollTop += path + maxDistance; + scrollPosition = container.scrollTop += path + maxDistance; path = -maxDistance; } }/* else if(forceDirection === FocusDirection.Up) { // * not tested yet