commit c8799822604d610140c74d8d32f65f420c35e1b8
parent 7fa18fa5f79ad739c4fcea077dafd5304c0a395a
Author: William Casarin <jb55@jb55.com>
Date: Fri, 6 Sep 2024 08:59:49 -0700
args: add --textmode
An option to enable textmode on startup
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/app.rs b/src/app.rs
@@ -666,7 +666,7 @@ impl Damus {
note_cache: NoteCache::default(),
selected_timeline: 0,
timelines,
- textmode: false,
+ textmode: parsed_args.textmode,
ndb,
account_manager,
frame_history: FrameHistory::default(),
diff --git a/src/args.rs b/src/args.rs
@@ -13,6 +13,7 @@ pub struct Args {
pub since_optimize: bool,
pub light: bool,
pub debug: bool,
+ pub textmode: bool,
pub dbpath: Option<String>,
}
@@ -26,6 +27,7 @@ impl Args {
light: false,
since_optimize: true,
debug: false,
+ textmode: false,
dbpath: None,
};
@@ -42,6 +44,8 @@ impl Args {
res.light = false;
} else if arg == "--debug" {
res.debug = true;
+ } else if arg == "--textmode" {
+ res.textmode = true;
} else if arg == "--pub" || arg == "--npub" {
i += 1;
let pubstr = if let Some(next_arg) = args.get(i) {