use enum for show_emails

This commit is contained in:
B. Petersen
2019-11-11 22:21:35 +01:00
committed by holger krekel
parent 9506f8c38e
commit 84c6113271
2 changed files with 6 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ use std::time::Duration;
use rusqlite::{Connection, OpenFlags, Statement, NO_PARAMS};
use thread_local_object::ThreadLocal;
use crate::constants::ShowEmails;
use crate::context::Context;
use crate::dc_tools::*;
use crate::error::{Error, Result};
@@ -736,7 +737,7 @@ fn open(
if dbversion < 50 {
info!(context, "[migration] v50");
if exists_before_update {
sql.set_raw_config_int(context, "show_emails", 2)?;
sql.set_raw_config_int(context, "show_emails", ShowEmails::All as i32)?;
}
dbversion = 50;
sql.set_raw_config_int(context, "dbversion", 50)?;