mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
Share stock strings across accounts
All contexts created by the same account manager share stock string translations. Setting translation on a single context automatically sets translations for all other accounts, so it is enough to set translations on the active account.
This commit is contained in:
@@ -29,6 +29,7 @@ use crate::key::{self, DcKey, KeyPair, KeyPairUse};
|
||||
use crate::message::{update_msg_state, Message, MessageState, MsgId, Viewtype};
|
||||
use crate::mimeparser::MimeMessage;
|
||||
use crate::receive_imf::receive_imf;
|
||||
use crate::stock_str::StockStrings;
|
||||
use crate::tools::EmailAddress;
|
||||
|
||||
#[allow(non_upper_case_globals)]
|
||||
@@ -277,7 +278,7 @@ impl TestContext {
|
||||
let mut context_names = CONTEXT_NAMES.write().unwrap();
|
||||
context_names.insert(id, name);
|
||||
}
|
||||
let ctx = Context::new(&dbfile, id, Events::new())
|
||||
let ctx = Context::new(&dbfile, id, Events::new(), StockStrings::new())
|
||||
.await
|
||||
.expect("failed to create context");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user