mirror of
https://github.com/cloudreve/frontend.git
synced 2025-12-25 19:52:48 +00:00
fix(explorer): error snackbar not shown while opening expired single file share shortcut
This commit is contained in:
parent
28591ae5b4
commit
5d4ea27505
|
|
@ -231,7 +231,7 @@ export function sendRefreshToken(req: RefreshTokenRequest): ThunkResponse<Token>
|
|||
};
|
||||
}
|
||||
|
||||
export function getFileList(req: ListFileService): ThunkResponse<ListResponse> {
|
||||
export function getFileList(req: ListFileService, skipSnackbar = true): ThunkResponse<ListResponse> {
|
||||
return async (dispatch, _getState) => {
|
||||
return await dispatch(
|
||||
send(
|
||||
|
|
@ -282,7 +282,7 @@ export function getUserInfo(uid: string): ThunkResponse<User> {
|
|||
},
|
||||
{
|
||||
...defaultOpts,
|
||||
bypassSnackbar: (_e) => true,
|
||||
bypassSnackbar: (_e) => skipSnackbar,
|
||||
},
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1163,10 +1163,13 @@ export function refreshSingleFileSymbolicLinks(file: FileResponse): AppThunk<Pro
|
|||
}
|
||||
const currentUrl = new CrUri(getFileLinkedUri(file));
|
||||
const latestList = await dispatch(
|
||||
getFileList({
|
||||
uri: currentUrl.setPath("").toString(),
|
||||
page_size: 50,
|
||||
}),
|
||||
getFileList(
|
||||
{
|
||||
uri: currentUrl.setPath("").toString(),
|
||||
page_size: 50,
|
||||
},
|
||||
false,
|
||||
),
|
||||
);
|
||||
if (latestList.files.length != 1) {
|
||||
return file;
|
||||
|
|
|
|||
Loading…
Reference in New Issue