Remove isNewFile

This commit is contained in:
Andras Schmelczer 2026-05-10 18:36:57 +01:00
commit ce995cdc33
8 changed files with 18 additions and 61 deletions

View file

@ -46,14 +46,10 @@ pub struct DocumentVersionWithoutContent {
#[ts(type = "number")]
pub content_size: u64,
/// True iff this is the first version of the document
pub is_new_file: bool,
}
impl From<StoredDocumentVersion> for DocumentVersionWithoutContent {
fn from(value: StoredDocumentVersion) -> Self {
let is_new_file = value.creation_vault_update_id == value.vault_update_id;
Self {
vault_update_id: value.vault_update_id,
document_id: value.document_id,
@ -63,7 +59,6 @@ impl From<StoredDocumentVersion> for DocumentVersionWithoutContent {
user_id: value.user_id,
device_id: value.device_id,
content_size: value.content.len() as u64,
is_new_file,
}
}
}