mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 23:16:30 +03:00
fix time smearing
if two messages have the same time, this results i all kinds of sorting failures, esp. in non-delta-muas and on forwarding messages. so, no two messages sent out from delta have the same timestamp. normally, this is no problem, but when things are sent too fast, eg. on forwarding, we lend us some time from the future. however, all this did not work because we forgot to write back the modified time, this is fixed by this commit, as well as some cleanup.
This commit is contained in:
@@ -57,7 +57,7 @@ pub struct Context {
|
||||
pub os_name: Option<String>,
|
||||
pub cmdline_sel_chat_id: Arc<RwLock<u32>>,
|
||||
pub bob: Arc<RwLock<BobStatus>>,
|
||||
pub last_smeared_timestamp: Arc<RwLock<i64>>,
|
||||
pub last_smeared_timestamp: RwLock<i64>,
|
||||
pub running_state: Arc<RwLock<RunningState>>,
|
||||
/// Mutex to avoid generating the key for the user more than once.
|
||||
pub generating_key_mutex: Mutex<()>,
|
||||
@@ -130,7 +130,7 @@ impl Context {
|
||||
smtp_state: Arc::new((Mutex::new(Default::default()), Condvar::new())),
|
||||
oauth2_critical: Arc::new(Mutex::new(())),
|
||||
bob: Arc::new(RwLock::new(Default::default())),
|
||||
last_smeared_timestamp: Arc::new(RwLock::new(0)),
|
||||
last_smeared_timestamp: RwLock::new(0),
|
||||
cmdline_sel_chat_id: Arc::new(RwLock::new(0)),
|
||||
sentbox_thread: Arc::new(RwLock::new(JobThread::new(
|
||||
"SENTBOX",
|
||||
|
||||
Reference in New Issue
Block a user