@@ -29,13 +29,13 @@ import { file_options } from "@cocalc/frontend/editor-tmp";
2929import { FileUploadWrapper } from "@cocalc/frontend/file-upload" ;
3030import { should_open_in_foreground } from "@cocalc/frontend/lib/should-open-in-foreground" ;
3131import { useProjectContext } from "@cocalc/frontend/project/context" ;
32- import { compute_file_masks } from "@cocalc/frontend/project/explorer/compute-file-masks" ;
3332import {
3433 DirectoryListing ,
3534 DirectoryListingEntry ,
3635 FileMap ,
3736} from "@cocalc/frontend/project/explorer/types" ;
3837import { WATCH_THROTTLE_MS } from "@cocalc/frontend/conat/listings" ;
38+ import { compute_file_masks } from "@cocalc/frontend/project/explorer/compute-file-masks" ;
3939import { mutate_data_to_compute_public_files } from "@cocalc/frontend/project_store" ;
4040import track from "@cocalc/frontend/user-tracking" ;
4141import {
@@ -126,6 +126,8 @@ export function FilesFlyout({
126126 const hidden = useTypedRedux ( { project_id } , "show_hidden" ) ;
127127 const checked_files = useTypedRedux ( { project_id } , "checked_files" ) ;
128128 const openFiles = useTypedRedux ( { project_id } , "open_files_order" ) ;
129+ const otherSettings = useTypedRedux ( "account" , "other_settings" ) ;
130+ const maskFiles = otherSettings ?. get ( "mask_files" ) ;
129131 // mainly controls what a single click does, plus additional UI elements
130132 const [ mode , setMode ] = useState < "open" | "select" > ( "open" ) ;
131133 const [ prevSelected , setPrevSelected ] = useState < number | null > ( null ) ;
@@ -190,7 +192,9 @@ export function FilesFlyout({
190192 const files : DirectoryListing | null = filesStore . toJS ?.( ) ;
191193 if ( files == null ) return EMPTY_LISTING ;
192194 let activeFile : DirectoryListingEntry | null = null ;
193- compute_file_masks ( files ) ;
195+ if ( maskFiles ) {
196+ compute_file_masks ( files ) ;
197+ }
194198 const searchWords = search_split ( file_search . trim ( ) . toLowerCase ( ) ) ;
195199
196200 const procFiles = files
@@ -295,6 +299,7 @@ export function FilesFlyout({
295299 openFiles ,
296300 current_path ,
297301 strippedPublicPaths ,
302+ maskFiles ,
298303 ] ) ;
299304
300305 const prev_current_path = usePrevious ( current_path ) ;
0 commit comments