Shared:Selectors:Files: fix opening isUserOnly
This commit is contained in:
parent
30fe69271b
commit
5e64d624d8
@ -107,6 +107,7 @@ export type UseFilesHelpersProps = {
|
||||
value: number | string | undefined | TBreadCrumb[],
|
||||
) => void;
|
||||
isRoomsOnly: boolean;
|
||||
isUserOnly?: boolean;
|
||||
rootThirdPartyId?: string;
|
||||
getRoomList?: (
|
||||
startIndex: number,
|
||||
|
@ -65,6 +65,7 @@ const useFilesHelper = ({
|
||||
getRootData,
|
||||
onSetBaseFolderPath,
|
||||
isRoomsOnly,
|
||||
isUserOnly,
|
||||
rootThirdPartyId,
|
||||
getRoomList,
|
||||
getIcon,
|
||||
@ -141,7 +142,7 @@ const useFilesHelper = ({
|
||||
}
|
||||
}
|
||||
|
||||
const id = selectedItemId || "";
|
||||
const id = isUserOnly ? "@my" : selectedItemId || "";
|
||||
|
||||
filter.folder = id.toString();
|
||||
|
||||
@ -149,7 +150,7 @@ const useFilesHelper = ({
|
||||
folderId: string | number,
|
||||
isErrorPath = false,
|
||||
) => {
|
||||
if (initRef.current && getRootData) {
|
||||
if (initRef.current && getRootData && folderId !== "@my") {
|
||||
const folder = await getFolderInfo(folderId, true);
|
||||
|
||||
const isArchive = folder.rootFolderType === FolderType.Archive;
|
||||
@ -247,7 +248,7 @@ const useFilesHelper = ({
|
||||
// if (item.roomType) breadCrumbs[idx].isRoom = true;
|
||||
// });
|
||||
|
||||
if (!isThirdParty && !isRoomsOnly)
|
||||
if (!isThirdParty && !isRoomsOnly && !isUserOnly)
|
||||
breadCrumbs.unshift({ ...DEFAULT_BREAD_CRUMB });
|
||||
|
||||
onSetBaseFolderPath?.(isErrorPath ? [] : breadCrumbs);
|
||||
@ -308,6 +309,7 @@ const useFilesHelper = ({
|
||||
setIsNextPageLoading,
|
||||
searchValue,
|
||||
filterParam,
|
||||
isUserOnly,
|
||||
selectedItemId,
|
||||
getRootData,
|
||||
setSelectedItemSecurity,
|
||||
|
@ -186,6 +186,7 @@ const FilesSelector = ({
|
||||
setIsRoot,
|
||||
searchValue,
|
||||
isRoomsOnly,
|
||||
|
||||
onSetBaseFolderPath,
|
||||
isInit,
|
||||
setIsInit,
|
||||
@ -211,6 +212,7 @@ const FilesSelector = ({
|
||||
getRootData,
|
||||
onSetBaseFolderPath,
|
||||
isRoomsOnly,
|
||||
isUserOnly,
|
||||
rootThirdPartyId,
|
||||
getRoomList,
|
||||
getIcon,
|
||||
@ -289,7 +291,7 @@ const FilesSelector = ({
|
||||
return;
|
||||
}
|
||||
|
||||
if (!currentFolderId) {
|
||||
if (!currentFolderId && !isUserOnly) {
|
||||
setSelectedItemType("rooms");
|
||||
return;
|
||||
}
|
||||
@ -311,6 +313,7 @@ const FilesSelector = ({
|
||||
currentFolderId,
|
||||
isRoomsOnly,
|
||||
isThirdParty,
|
||||
isUserOnly,
|
||||
parentId,
|
||||
roomsFolderId,
|
||||
rootFolderType,
|
||||
|
Loading…
Reference in New Issue
Block a user