feat: add --no-media flag to disable media display

- Introduced a new "no_media" boolean in ColumnsArgs to capture the
  --no-media flag.

- Updated NoteOptions to include a setting for hiding media, configured
  from parsed arguments.

- Refactored Damus to consolidate note options (textmode, scramble, and
  no-media) into a single NoteOptions field.

- Modified navigation UI rendering to pass the unified note_options.

This change allows users to disable media display via the --no-media flag.

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-02-22 14:39:04 -08:00
parent bd352f76d4
commit 660b7cc8b7
3 changed files with 17 additions and 21 deletions

View File

@@ -9,6 +9,7 @@ pub struct ColumnsArgs {
pub since_optimize: bool,
pub textmode: bool,
pub scramble: bool,
pub no_media: bool,
}
impl ColumnsArgs {
@@ -19,6 +20,7 @@ impl ColumnsArgs {
since_optimize: true,
textmode: false,
scramble: false,
no_media: false,
};
let mut i = 0;
@@ -32,6 +34,8 @@ impl ColumnsArgs {
res.since_optimize = false;
} else if arg == "--scramble" {
res.scramble = true;
} else if arg == "--no-media" {
res.no_media = true;
} else if arg == "--filter" {
i += 1;
let filter = if let Some(next_arg) = args.get(i) {