emit local_files_updated event for hidden files update too
This commit is contained in:
parent
3902007fc7
commit
7bcd43a9e1
|
@ -45,12 +45,10 @@ const setLocalFiles = async (type: 'normal' | 'hidden', files: EnteFile[]) => {
|
|||
try {
|
||||
const tableName = type === 'normal' ? FILES_TABLE : HIDDEN_FILES_TABLE;
|
||||
await localForage.setItem(tableName, files);
|
||||
if (type === 'normal') {
|
||||
try {
|
||||
eventBus.emit(Events.LOCAL_FILES_UPDATED);
|
||||
} catch (e) {
|
||||
logError(e, 'Error in localFileUpdated handlers');
|
||||
}
|
||||
try {
|
||||
eventBus.emit(Events.LOCAL_FILES_UPDATED);
|
||||
} catch (e) {
|
||||
logError(e, 'Error in localFileUpdated handlers');
|
||||
}
|
||||
} catch (e1) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue