@@ -157,24 +157,27 @@ const DrawerStore = T.model('DrawerStore', {
157157 return self . visible && Global . innerWidth <= css . mediaBreakPoints . desktopL
158158 } ,
159159 } ) )
160- . actions ( ( self : TStore ) => ( {
161- open ( { type, data, thread, options = { } } : any ) : void {
160+ . actions ( ( self ) => ( {
161+ open ( { type, data, thread, options = { } } ) : void {
162+ const slf = self as TStore
163+
162164 if ( type === TYPE . DRAWER . MODELINE_MENU ) {
163- self . mmType = data
165+ slf . mmType = data
164166 } else if ( data ) {
165- self . attachment = merge ( data , { type } )
167+ // @ts -ignore TODO: fix later
168+ slf . attachment = merge ( data , { type } )
166169 }
167170 if ( contains ( thread , PREVIEWABLE_THREADS ) ) {
168- self . setViewing ( { [ thread ] : data , viewingThread : thread } )
171+ slf . setViewing ( { [ thread ] : data , viewingThread : thread } )
169172 }
170173
171- self . visible = true
172- self . type = type
173- self . options = merge ( defaultOptions , options )
174+ slf . visible = true
175+ slf . type = type
176+ slf . options = merge ( defaultOptions , options )
174177 lockPage ( )
175- if ( self . isMobile ) {
178+ if ( slf . isMobile ) {
176179 toggleGlobalBlur ( true )
177- self . canBeClose = false
180+ slf . canBeClose = false
178181 }
179182 } ,
180183 setViewing ( sobj : Record < string , unknown > ) : void {
@@ -198,7 +201,6 @@ const DrawerStore = T.model('DrawerStore', {
198201 } ,
199202 } ) )
200203
201- // @ts -ignore
202204export type TStore = Instance < typeof DrawerStore >
203205
204206export default DrawerStore
0 commit comments