File tree Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,8 @@ import {MyStarGift} from '../lib/appManagers/appGiftsManager';
109109import wrapSticker from './wrappers/sticker' ;
110110import { unwrap } from 'solid-js/store' ;
111111import { AutonomousSavedDialogList } from './autonomousDialogList/savedDialogs' ;
112+ import SetTransition from './singleTransition' ;
113+ import liteMode from '../helpers/liteMode' ;
112114
113115// const testScroll = false;
114116
@@ -1120,6 +1122,21 @@ export default class AppSearchSuper {
11201122 searchGroup = this . searchGroups . messages ;
11211123 }
11221124
1125+ if ( liteMode . isAvailable ( 'animations' ) ) {
1126+ searchGroup . container . classList . add ( 'is-hidden' ) ;
1127+
1128+ setTimeout ( ( ) => SetTransition ( {
1129+ element : searchGroup . container ,
1130+ className : 'is-visible' ,
1131+ forwards : true ,
1132+ duration : 250 ,
1133+ onTransitionEnd : ( ) => {
1134+ searchGroup . container . classList . remove ( 'is-hidden' ) ;
1135+ searchGroup . container . classList . remove ( 'is-visible' ) ;
1136+ }
1137+ } ) , 100 ) ; // doesn't properly animate without it, even useRafs don't really help
1138+ }
1139+
11231140 const options : ProcessSearchSuperResult = {
11241141 elemsToAppend,
11251142 inputFilter,
Original file line number Diff line number Diff line change 11import IS_TOUCH_SUPPORTED from '../../environment/touchSupport' ;
22import { attachClickEvent } from '../../helpers/dom/clickEvent' ;
33import handleTabSwipe from '../../helpers/dom/handleTabSwipe' ;
4+ import liteMode from '../../helpers/liteMode' ;
45import safeAssign from '../../helpers/object/safeAssign' ;
6+ import pause from '../../helpers/schedulers/pause' ;
57import appDialogsManager from '../../lib/appManagers/appDialogsManager' ;
68import { AppManagers } from '../../lib/appManagers/managers' ;
79import { logger } from '../../lib/logger' ;
@@ -99,8 +101,9 @@ export class ForumTab extends SliderSuperTabEventable {
99101 }
100102
101103 const searchButton = ButtonIcon ( 'search' ) ;
102- attachClickEvent ( searchButton , ( ) => {
104+ attachClickEvent ( searchButton , async ( ) => {
103105 appSidebarLeft . closeEverythingInside ( ) ;
106+ if ( liteMode . isAvailable ( 'animations' ) ) await pause ( 400 ) ;
104107 appSidebarLeft . initSearch ( ) . openWithPeerId ( this . peerId ) ;
105108 } ) ;
106109
Original file line number Diff line number Diff line change 8888 margin-bottom : 0 ;
8989 }
9090
91+ & .is-hidden {
92+ opacity : 0 ;
93+ }
94+
95+ & .is-visible {
96+ & :not (.backwards ) {
97+ opacity : 1 ;
98+ }
99+
100+ & .animating {
101+ transition : opacity var (--transition-standard-in );
102+
103+ & .backwards {
104+ transition : opacity var (--transition-standard-out );
105+ }
106+ }
107+ }
108+
91109 & __name {
92110 color : var (--secondary-text-color );
93111 padding : 0 23px ;
You can’t perform that action at this time.
0 commit comments