|
|
@ -55,6 +55,7 @@ import safeAssign from "../helpers/object/safeAssign"; |
|
|
|
import escapeRegExp from "../helpers/string/escapeRegExp"; |
|
|
|
import escapeRegExp from "../helpers/string/escapeRegExp"; |
|
|
|
import limitSymbols from "../helpers/string/limitSymbols"; |
|
|
|
import limitSymbols from "../helpers/string/limitSymbols"; |
|
|
|
import findAndSplice from "../helpers/array/findAndSplice"; |
|
|
|
import findAndSplice from "../helpers/array/findAndSplice"; |
|
|
|
|
|
|
|
import { ScrollStartCallbackDimensions } from "../helpers/fastSmoothScroll"; |
|
|
|
|
|
|
|
|
|
|
|
//const testScroll = false;
|
|
|
|
//const testScroll = false;
|
|
|
|
|
|
|
|
|
|
|
@ -297,6 +298,8 @@ export default class AppSearchSuper { |
|
|
|
private searchContextMenu: SearchContextMenu; |
|
|
|
private searchContextMenu: SearchContextMenu; |
|
|
|
public selection: SearchSelection; |
|
|
|
public selection: SearchSelection; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public scrollStartCallback: (dimensions: ScrollStartCallbackDimensions) => void; |
|
|
|
|
|
|
|
|
|
|
|
constructor(options: Pick<AppSearchSuper, 'mediaTabs' | 'scrollable' | 'searchGroups' | 'asChatList' | 'groupByMonth' | 'hideEmptyTabs' | 'onChangeTab' | 'showSender'>) { |
|
|
|
constructor(options: Pick<AppSearchSuper, 'mediaTabs' | 'scrollable' | 'searchGroups' | 'asChatList' | 'groupByMonth' | 'hideEmptyTabs' | 'onChangeTab' | 'showSender'>) { |
|
|
|
safeAssign(this, options); |
|
|
|
safeAssign(this, options); |
|
|
|
|
|
|
|
|
|
|
@ -407,7 +410,8 @@ export default class AppSearchSuper { |
|
|
|
if(this.prevTabId === id && !this.skipScroll) { |
|
|
|
if(this.prevTabId === id && !this.skipScroll) { |
|
|
|
this.scrollable.scrollIntoViewNew({ |
|
|
|
this.scrollable.scrollIntoViewNew({ |
|
|
|
element: this.container, |
|
|
|
element: this.container, |
|
|
|
position: 'start' |
|
|
|
position: 'start', |
|
|
|
|
|
|
|
startCallback: this.scrollStartCallback |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -432,7 +436,8 @@ export default class AppSearchSuper { |
|
|
|
if(scrollTop < offsetTop) { |
|
|
|
if(scrollTop < offsetTop) { |
|
|
|
this.scrollable.scrollIntoViewNew({ |
|
|
|
this.scrollable.scrollIntoViewNew({ |
|
|
|
element: this.container, |
|
|
|
element: this.container, |
|
|
|
position: 'start' |
|
|
|
position: 'start', |
|
|
|
|
|
|
|
startCallback: this.scrollStartCallback |
|
|
|
}); |
|
|
|
}); |
|
|
|
scrollTop = offsetTop; |
|
|
|
scrollTop = offsetTop; |
|
|
|
} |
|
|
|
} |
|
|
|