Skip to content

Commit

Permalink
filter is working
Browse files Browse the repository at this point in the history
  • Loading branch information
chinonso098 committed Sep 18, 2024
1 parent 1ced8f3 commit c1585f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/system-apps/fileexplorer/fileexplorer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -678,17 +678,19 @@ export class FileExplorerComponent implements BaseComponent, OnInit, AfterViewIn
private async loadFilesInfoAsync(path?:string, showUrl=true):Promise<void>{
this.files = [];
this._fileService.resetDirectoryFiles();
const directoryEntries = await this._fileService.getEntriesFromDirectoryAsync(this.directory);
let directoryEntries = await this._fileService.getEntriesFromDirectoryAsync(this.directory);

console.log('directoryEntries:',directoryEntries);

if(this.directory === '/'){
if(!showUrl){
const filteredDirectoryEntries = directoryEntries.filter(x => !x.includes('.url'));
directoryEntries = filteredDirectoryEntries;
this._directoryFilesEntires = this._fileService.getFileEntriesFromDirectory(filteredDirectoryEntries,this.directory);
}
else{
const filteredDirectoryEntries = directoryEntries.filter(x => x.includes('.url'));
directoryEntries = filteredDirectoryEntries;
this._directoryFilesEntires = this._fileService.getFileEntriesFromDirectory(filteredDirectoryEntries,this.directory);
}
}else{
Expand Down

0 comments on commit c1585f9

Please sign in to comment.