mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-08 01:42:58 +02:00
Fix loading
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user