File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import {MAX_SIDEBAR_WIDTH} from '@components/sidebarLeft/constants';
1515import SetTransition from '@components/singleTransition' ;
1616import { SliderSuperTabEventable } from '@components/sliderTab' ;
1717import { Register } from '@components/forumTab/register' ;
18+ import rootScope from '@lib/rootScope' ;
19+ import { isDialog } from '@lib/appManagers/utils/dialogs/isDialog' ;
1820
1921
2022export class ForumTab extends SliderSuperTabEventable {
@@ -57,6 +59,11 @@ export class ForumTab extends SliderSuperTabEventable {
5759 } ;
5860
5961 protected syncInit ( ) : void {
62+ this . listenerSetter . add ( rootScope ) ( 'dialog_drop' , ( dialog ) => {
63+ if ( isDialog ( dialog ) && this . peerId === dialog . peerId ) {
64+ this . _close ( ) ;
65+ }
66+ } ) ;
6067 }
6168
6269 protected async asyncInit ( ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -43,12 +43,6 @@ export class MonoforumTab extends ForumTab {
4343 autonomousList . bindScrollable ( ) ;
4444
4545
46- this . listenerSetter . add ( rootScope ) ( 'dialog_drop' , ( dialog ) => {
47- if ( dialog . peerId === this . peerId ) {
48- this . _close ( ) ;
49- }
50- } ) ;
51-
5246 this . listenerSetter . add ( rootScope ) ( 'monoforum_dialogs_update' , ( { dialogs} ) => {
5347 if ( ! dialogs . find ( dialog => dialog . parentPeerId === this . peerId ) ) return ;
5448 this . updateDialogsCount ( ) ;
You can’t perform that action at this time.
0 commit comments