@@ -22,7 +22,6 @@ import AutoHideScrollbar from "./AutoHideScrollbar";
2222import { getKeyBindingsManager } from "../../KeyBindingsManager" ;
2323import ResizeNotifier from "../../utils/ResizeNotifier" ;
2424import { KeyBindingAction } from "../../accessibility/KeyboardShortcuts" ;
25- import UIStore , { UI_EVENTS } from "../../stores/UIStore" ;
2625
2726const DEBUG_SCROLL = false ;
2827
@@ -209,8 +208,6 @@ export default class ScrollPanel extends React.Component<IProps> {
209208
210209 componentDidMount ( ) {
211210 this . checkScroll ( ) ;
212-
213- UIStore . instance . on ( UI_EVENTS . Resize , this . onUiResize ) ;
214211 }
215212
216213 componentDidUpdate ( ) {
@@ -233,8 +230,6 @@ export default class ScrollPanel extends React.Component<IProps> {
233230 if ( this . props . resizeNotifier ) {
234231 this . props . resizeNotifier . removeListener ( "middlePanelResizedNoisy" , this . onResize ) ;
235232 }
236-
237- UIStore . instance . off ( UI_EVENTS . Resize , this . onUiResize ) ;
238233 }
239234
240235 private onScroll = ev => {
@@ -721,17 +716,6 @@ export default class ScrollPanel extends React.Component<IProps> {
721716 }
722717 }
723718
724- private onUiResize = ( ) => {
725- this . setDataScrollbar ( ) ;
726- } ;
727-
728- private setDataScrollbar ( contentHeight = this . getMessagesHeight ( ) ) {
729- const sn = this . getScrollNode ( ) ;
730- const minHeight = sn . clientHeight ;
731- const displayScrollbar = contentHeight > minHeight ;
732- sn . dataset . scrollbar = displayScrollbar . toString ( ) ;
733- }
734-
735719 // need a better name that also indicates this will change scrollTop? Rebalance height? Reveal content?
736720 private async updateHeight ( ) : Promise < void > {
737721 // wait until user has stopped scrolling
@@ -753,7 +737,6 @@ export default class ScrollPanel extends React.Component<IProps> {
753737 const minHeight = sn . clientHeight ;
754738 const height = Math . max ( minHeight , contentHeight ) ;
755739 this . pages = Math . ceil ( height / PAGE_SIZE ) ;
756- this . setDataScrollbar ( contentHeight ) ;
757740 this . bottomGrowth = 0 ;
758741 const newHeight = `${ this . getListHeight ( ) } px` ;
759742
0 commit comments