diff options
| author | Hank <hank@mullvad.net> | 2022-09-29 13:39:30 +0200 |
|---|---|---|
| committer | Hank <hank@mullvad.net> | 2022-10-03 16:19:12 +0200 |
| commit | ba301ee212152e5bc37dc0b8ce326324c689bdd7 (patch) | |
| tree | dd6872d1b6f37fd9053fd401d0b7521d95e0fd0c /gui/src/renderer/components | |
| parent | f9e66ad43aa4c1d175f811d62b45dc05cdcbfb6a (diff) | |
| download | mullvadvpn-ba301ee212152e5bc37dc0b8ce326324c689bdd7.tar.xz mullvadvpn-ba301ee212152e5bc37dc0b8ce326324c689bdd7.zip | |
Remove unused code
Diffstat (limited to 'gui/src/renderer/components')
| -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 ( |
