Fix loading

This commit is contained in:
Elio Struyf
2024-02-05 16:25:37 +01:00
parent e54907daaf
commit d869d15694
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ export default function useMedia() {
const messageListener = useCallback((message: MessageEvent<EventData<MediaPaths | { key: string; value: any }>>) => {
if (message.data.command === DashboardCommand.media) {
const payload: MediaPaths = message.data.payload as MediaPaths;
setLoading("loading");
setLoading(undefined);
setMedia(payload.media);
setTotal(payload.total);
setFolders(payload.folders);
+1 -1
View File
@@ -67,7 +67,7 @@ export class MediaHelpers {
)
: sort;
// If the static folder is not set, retreive the last opened location
// If the static folder is not set, retrieve the last opened location
if (!selectedFolder) {
const stateValue = await ext.getState<string | undefined>(
ExtensionState.SelectedFolder,