refactor: cleanup config values and move to their own file

This commit is contained in:
dignifiedquire
2019-07-14 23:57:05 +02:00
parent 6e73b3728d
commit 668c647fdd
10 changed files with 230 additions and 174 deletions

View File

@@ -17,6 +17,7 @@ use std::borrow::Cow::{self, Borrowed, Owned};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Mutex, RwLock};
use deltachat::config;
use deltachat::constants::*;
use deltachat::context::*;
use deltachat::dc_configure::*;
@@ -514,7 +515,7 @@ unsafe fn handle_cmd(line: &str, ctx: Arc<RwLock<Context>>) -> Result<ExitResult
dc_configure(&ctx.read().unwrap());
}
"oauth2" => {
let addr = dc_get_config(&ctx.read().unwrap(), "addr");
let addr = config::get(&ctx.read().unwrap(), "addr");
if addr.is_empty() {
println!("oauth2: set addr first.");
} else {