diff options
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/renderer/components/NavigationBar.tsx | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/gui/src/renderer/components/NavigationBar.tsx b/gui/src/renderer/components/NavigationBar.tsx index 0b119efe30..4c27665b65 100644 --- a/gui/src/renderer/components/NavigationBar.tsx +++ b/gui/src/renderer/components/NavigationBar.tsx @@ -45,8 +45,6 @@ export class NavigationContainer extends React.Component< showsBarSeparator: false, }; - private scrollEventListeners: Array<(event: IScrollEvent) => void> = []; - public componentDidMount() { this.updateBarAppearance({ scrollLeft: 0, scrollTop: 0 }); } @@ -64,28 +62,9 @@ export class NavigationContainer extends React.Component< } public onScroll = (event: IScrollEvent) => { - this.notifyScrollEventListeners(event); this.updateBarAppearance(event); }; - public addScrollEventListener(fn: (event: IScrollEvent) => void) { - const index = this.scrollEventListeners.indexOf(fn); - if (index === -1) { - this.scrollEventListeners.push(fn); - } - } - - public removeScrollEventListener(fn: (event: IScrollEvent) => void) { - const index = this.scrollEventListeners.indexOf(fn); - if (index !== -1) { - this.scrollEventListeners.splice(index, 1); - } - } - - private notifyScrollEventListeners(event: IScrollEvent) { - this.scrollEventListeners.forEach((listener) => listener(event)); - } - private updateBarAppearance(event: IScrollEvent) { // that's where SettingsHeader.HeaderTitle intersects the navigation bar const showsBarSeparator = event.scrollTop > 11; @@ -103,7 +82,6 @@ export class NavigationContainer extends React.Component< } interface INavigationScrollbarsProps { - onScroll?: (value: IScrollEvent) => void; className?: string; fillContainer?: boolean; children?: React.ReactNode; @@ -155,7 +133,6 @@ export const NavigationScrollbars = React.forwardRef(function NavigationScrollba const handleScroll = useCallback((event: IScrollEvent) => { onScroll(event); - props.onScroll?.(event); }, []); return ( |
