diff options
| -rw-r--r-- | gui/packages/desktop/src/renderer/components/NavigationBar.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gui/packages/desktop/src/renderer/components/NavigationBar.js b/gui/packages/desktop/src/renderer/components/NavigationBar.js index f8cd5e9d99..e3108cc8ac 100644 --- a/gui/packages/desktop/src/renderer/components/NavigationBar.js +++ b/gui/packages/desktop/src/renderer/components/NavigationBar.js @@ -139,6 +139,14 @@ type NavigationBarTitleProps = { }; class NavigationBarTitle extends Component<NavigationBarTitleProps> { + shouldComponentUpdate(nextProps: NavigationBarTitleProps) { + return ( + this.props.visible !== nextProps.visible || + this.props.titleAdjustment !== nextProps.titleAdjustment || + this.props.children !== nextProps.children + ); + } + render() { const titleAdjustment = this.props.titleAdjustment; const titleAdjustmentStyle = Styles.createViewStyle( @@ -178,7 +186,7 @@ class NavigationBarAnimatedTitle extends Component<NavigationBarAnimatedTitlePro }); } - shouldComponentUpdate(nextProps) { + shouldComponentUpdate(nextProps: NavigationBarAnimatedTitleProps) { return this.props.visible !== nextProps.visible || this.props.children !== nextProps.children; } |
