mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 09:34:19 +01:00
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:
@@ -16,7 +16,7 @@ use crate::{
|
||||
column::NavTitle,
|
||||
configure_deck::ConfigureDeckView,
|
||||
edit_deck::{EditDeckResponse, EditDeckView},
|
||||
note::{NoteOptions, PostAction, PostType},
|
||||
note::{PostAction, PostType},
|
||||
profile::EditProfileView,
|
||||
support::SupportView,
|
||||
RelayView, View,
|
||||
@@ -243,13 +243,6 @@ fn render_nav_body(
|
||||
col: usize,
|
||||
inner_rect: egui::Rect,
|
||||
) -> Option<RenderNavAction> {
|
||||
let note_options = {
|
||||
let mut options = NoteOptions::default();
|
||||
options.set_textmode(app.textmode);
|
||||
options.set_scramble_text(app.scramble);
|
||||
options
|
||||
};
|
||||
|
||||
match top {
|
||||
Route::Timeline(kind) => render_timeline_route(
|
||||
ctx.ndb,
|
||||
@@ -260,7 +253,7 @@ fn render_nav_body(
|
||||
ctx.accounts,
|
||||
kind,
|
||||
col,
|
||||
note_options,
|
||||
app.note_options,
|
||||
depth,
|
||||
ui,
|
||||
),
|
||||
@@ -317,7 +310,7 @@ fn render_nav_body(
|
||||
ctx.img_cache,
|
||||
¬e,
|
||||
inner_rect,
|
||||
note_options,
|
||||
app.note_options,
|
||||
)
|
||||
.id_source(id)
|
||||
.show(ui)
|
||||
@@ -353,7 +346,7 @@ fn render_nav_body(
|
||||
draft,
|
||||
¬e,
|
||||
inner_rect,
|
||||
note_options,
|
||||
app.note_options,
|
||||
)
|
||||
.id_source(id)
|
||||
.show(ui)
|
||||
@@ -375,7 +368,7 @@ fn render_nav_body(
|
||||
ctx.note_cache,
|
||||
kp,
|
||||
inner_rect,
|
||||
note_options,
|
||||
app.note_options,
|
||||
)
|
||||
.ui(&txn, ui);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user