Add functionality to some Overview Catrgories (#1090)

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
This commit is contained in:
Niklas Wojtkowiak 2023-07-12 09:01:30 +03:00 committed by GitHub
parent 07c00a8b7f
commit c877c03b63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -51,6 +51,9 @@ impl Category {
Category::Music => ObjectKind::Audio,
Category::Books => ObjectKind::Book,
Category::Encrypted => ObjectKind::Encrypted,
Category::Databases => ObjectKind::Database,
Category::Archives => ObjectKind::Archive,
Category::Applications => ObjectKind::Executable,
_ => unimplemented!("Category::to_object_kind() for {:?}", self),
}
}
@ -63,6 +66,9 @@ impl Category {
| Category::Videos
| Category::Music
| Category::Encrypted
| Category::Databases
| Category::Archives
| Category::Applications
| Category::Books => object::kind::equals(Some(self.to_object_kind() as i32)),
_ => object::id::equals(-1),
}

View file

@ -27,7 +27,7 @@ pub enum ObjectKind {
Alias = 10,
/// Raw bytes encrypted by Spacedrive with self contained metadata
Encrypted = 11,
/// A link can open web pages, apps or Spaces
/// A key or certificate file
Key = 12,
/// A link can open web pages, apps or Spaces
Link = 13,