mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-05-18 13:26:00 -04:00
@@ -122,6 +122,8 @@ struct FilePathFilterArgs {
|
||||
path: Option<String>,
|
||||
#[specta(optional)]
|
||||
object: Option<ObjectFilterArgs>,
|
||||
#[specta(optional)]
|
||||
hidden: Option<bool>,
|
||||
}
|
||||
|
||||
impl FilePathFilterArgs {
|
||||
@@ -172,6 +174,7 @@ impl FilePathFilterArgs {
|
||||
self.extension.map(Some).map(extension::equals),
|
||||
self.created_at.from.map(|v| date_created::gte(v.into())),
|
||||
self.created_at.to.map(|v| date_created::lte(v.into())),
|
||||
self.hidden.map(Some).map(hidden::equals),
|
||||
directory_materialized_path_str
|
||||
.map(Some)
|
||||
.map(materialized_path::equals),
|
||||
|
||||
@@ -150,7 +150,10 @@ const useItems = ({
|
||||
: { path: path ?? '' })
|
||||
};
|
||||
|
||||
const count = useLibraryQuery(['search.pathsCount', { filter }]);
|
||||
const count = useLibraryQuery([
|
||||
'search.pathsCount',
|
||||
{ filter: { ...filter, hidden: explorerSettings.showHiddenFiles ? undefined : false } }
|
||||
]);
|
||||
|
||||
const query = usePathsInfiniteQuery({
|
||||
arg: { filter, take },
|
||||
|
||||
@@ -173,7 +173,7 @@ export type FilePathCursor = { isDir: boolean; variant: FilePathCursorVariant }
|
||||
|
||||
export type FilePathCursorVariant = "none" | { name: CursorOrderItem<string> } | { sizeInBytes: SortOrder } | { dateCreated: CursorOrderItem<string> } | { dateModified: CursorOrderItem<string> } | { dateIndexed: CursorOrderItem<string> } | { object: FilePathObjectCursor }
|
||||
|
||||
export type FilePathFilterArgs = { locationId?: number | null; search?: string | null; extension?: string | null; createdAt?: OptionalRange<string>; path?: string | null; object?: ObjectFilterArgs | null }
|
||||
export type FilePathFilterArgs = { locationId?: number | null; search?: string | null; extension?: string | null; createdAt?: OptionalRange<string>; path?: string | null; object?: ObjectFilterArgs | null; hidden?: boolean | null }
|
||||
|
||||
export type FilePathObjectCursor = { dateAccessed: CursorOrderItem<string> } | { kind: CursorOrderItem<number> }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user