args: add --textmode
An option to enable textmode on startup Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -666,7 +666,7 @@ impl Damus {
|
|||||||
note_cache: NoteCache::default(),
|
note_cache: NoteCache::default(),
|
||||||
selected_timeline: 0,
|
selected_timeline: 0,
|
||||||
timelines,
|
timelines,
|
||||||
textmode: false,
|
textmode: parsed_args.textmode,
|
||||||
ndb,
|
ndb,
|
||||||
account_manager,
|
account_manager,
|
||||||
frame_history: FrameHistory::default(),
|
frame_history: FrameHistory::default(),
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ pub struct Args {
|
|||||||
pub since_optimize: bool,
|
pub since_optimize: bool,
|
||||||
pub light: bool,
|
pub light: bool,
|
||||||
pub debug: bool,
|
pub debug: bool,
|
||||||
|
pub textmode: bool,
|
||||||
pub dbpath: Option<String>,
|
pub dbpath: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,6 +27,7 @@ impl Args {
|
|||||||
light: false,
|
light: false,
|
||||||
since_optimize: true,
|
since_optimize: true,
|
||||||
debug: false,
|
debug: false,
|
||||||
|
textmode: false,
|
||||||
dbpath: None,
|
dbpath: None,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -42,6 +44,8 @@ impl Args {
|
|||||||
res.light = false;
|
res.light = false;
|
||||||
} else if arg == "--debug" {
|
} else if arg == "--debug" {
|
||||||
res.debug = true;
|
res.debug = true;
|
||||||
|
} else if arg == "--textmode" {
|
||||||
|
res.textmode = true;
|
||||||
} else if arg == "--pub" || arg == "--npub" {
|
} else if arg == "--pub" || arg == "--npub" {
|
||||||
i += 1;
|
i += 1;
|
||||||
let pubstr = if let Some(next_arg) = args.get(i) {
|
let pubstr = if let Some(next_arg) = args.get(i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user