Skip to content

Commit

Permalink
fix: default hide file names to true (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xazin authored Nov 1, 2024
1 parent e7a63ba commit c1b107e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions collab-database/src/fields/type_option/media_type_option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ use std::path::Path;
use std::sync::Arc;
use yrs::Any;

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MediaTypeOption {
#[serde(default)]
pub hide_file_names: bool,
}

impl Default for MediaTypeOption {
fn default() -> Self {
Self {
hide_file_names: true,
}
}
}

impl StringifyTypeOption for MediaTypeOption {
fn stringify_cell(&self, cell: &Cell) -> String {
match cell.get_as::<MediaCellData>(CELL_DATA) {
Expand Down

0 comments on commit c1b107e

Please sign in to comment.