@@ -12,6 +12,7 @@ import {
1212 t ,
1313 useStore ,
1414} from 'helper' ;
15+ import { createEffect } from 'solid-js' ;
1516
1617import { type CoreContext , type CoreStore , type SiteOptions } from '.' ;
1718import { useFab } from './useFab' ;
@@ -67,6 +68,7 @@ export const useInit = async <T extends Record<string, unknown>>(
6768 flag : {
6869 isStored : saveOptions !== undefined ,
6970 needAutoShow : true ,
71+ hasPageHandler : false ,
7072 } ,
7173 } ) ;
7274 setDefaultHotkeys ( ( _hotkeys ) => ( {
@@ -131,7 +133,6 @@ export const useInit = async <T extends Record<string, unknown>>(
131133
132134 setState ( 'fab' , {
133135 onClick : ( ) => void showComic ( ) ,
134- show : ! options . hiddenFab && undefined ,
135136 } ) ;
136137
137138 if ( autoShow && store . flag . needAutoShow && options . autoShow )
@@ -219,6 +220,18 @@ export const useInit = async <T extends Record<string, unknown>>(
219220 return comic . imgList . filter ( ( _ , i ) => ! comic . adList ?. has ( i ) ) ;
220221 } ) ;
221222
223+ createEffect ( ( ) => {
224+ // 多选模式下悬浮按钮持续显示
225+ if ( store . fab . multiSelectCount !== undefined )
226+ return setState ( 'fab' , 'show' , true ) ;
227+
228+ setState (
229+ 'fab' ,
230+ 'show' ,
231+ store . flag . hasPageHandler && ! options . hiddenFab ? undefined : false ,
232+ ) ;
233+ } ) ;
234+
222235 createEffectOn (
223236 nowImgList ,
224237 ( list ) => list && setState ( 'manga' , 'imgList' , list ) ,
@@ -235,7 +248,6 @@ export const useInit = async <T extends Record<string, unknown>>(
235248 options . hiddenFab ? t ( 'other.fab_show' ) : t ( 'other.fab_hidden' ) ,
236249 ( ) => {
237250 setOptions ( { hiddenFab : ! options . hiddenFab } ) ;
238- setState ( 'fab' , 'show' , ! options . hiddenFab && undefined ) ;
239251 return updateHideFabMenu ( ) ;
240252 } ,
241253 ) ;
0 commit comments