Compare commits

..

1 Commits

Author SHA1 Message Date
Hocuri
20bb3235dc refactor: Remove unneeded deprecated attr
Not sure why it was marked as deprecated, but it's definitely used, and
not discuraged to use (??).
2025-12-18 17:19:24 +01:00
3 changed files with 3 additions and 27 deletions

View File

@@ -416,7 +416,6 @@ impl Context {
///
/// Returns true if passphrase is correct, false is passphrase is not correct. Fails on other
/// errors.
#[deprecated(since = "TBD")]
pub async fn open(&self, passphrase: String) -> Result<bool> {
if self.sql.check_passphrase(passphrase.clone()).await? {
self.sql.open(self, passphrase).await?;

View File

@@ -214,7 +214,7 @@ impl Sql {
// this should be done before updates that use high-level objects that
// rely themselves on the low-level structure.
let (recode_avatar, update_email_configs) = migrations::run(context, self)
let recode_avatar = migrations::run(context, self)
.await
.context("failed to run migrations")?;
@@ -242,22 +242,6 @@ impl Sql {
}
}
// Reset some options if IsChatmail is true,
// because there were reports from users who had these options set to something else,
// and then couldn't change them because they are hidden in the UI for chatmail profiles
if update_email_configs && context.get_config_bool(Config::IsChatmail).await? {
// The default for MvboxMove is actually "1", and it's usually set to "0" in `configure.rs`.
context
.set_config_internal(Config::MvboxMove, Some("0"))
.await?;
context
.set_config_internal(Config::OnlyFetchMvbox, None)
.await?;
context
.set_config_internal(Config::ShowEmails, None)
.await?;
}
Ok(())
}

View File

@@ -31,7 +31,7 @@ tokio::task_local! {
static STOP_MIGRATIONS_AT: i32;
}
pub async fn run(context: &Context, sql: &Sql) -> Result<(bool, bool)> {
pub async fn run(context: &Context, sql: &Sql) -> Result<bool> {
let mut exists_before_update = false;
let mut dbversion_before_update = DBVERSION;
@@ -69,7 +69,6 @@ pub async fn run(context: &Context, sql: &Sql) -> Result<(bool, bool)> {
let dbversion = dbversion_before_update;
let mut recode_avatar = false;
let mut update_email_configs = false;
if dbversion < 1 {
sql.execute_migration(
@@ -1467,12 +1466,6 @@ ALTER TABLE contacts ADD COLUMN name_normalized TEXT;
.await?;
}
inc_and_check(&mut migration_version, 144)?;
if dbversion < migration_version {
update_email_configs = true;
sql.set_db_version(migration_version).await?;
}
let new_version = sql
.get_raw_config_int(VERSION_CFG)
.await?
@@ -1487,7 +1480,7 @@ ALTER TABLE contacts ADD COLUMN name_normalized TEXT;
}
info!(context, "Database version: v{new_version}.");
Ok((recode_avatar, update_email_configs))
Ok(recode_avatar)
}
fn migrate_key_contacts(