mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 15:06:30 +03:00
fix: Only emit TransportsModified if transports are really modified
Otherwise it's not possible to write tests reliably because sync messages may be executed multiple times if they arrive from different transports. This should fix flaky `test_transport_synchronization`. Also always emit `TransportsModified` if the primary transport is changed by a sync message, even if it doesn't contain `SyncData::Transports`. Also don't decrease `add_timestamp` in `save_transport()` if nothing else changes, this doesn't make sense.
This commit is contained in:
@@ -417,12 +417,12 @@ pub enum EventType {
|
||||
chat_id: ChatId,
|
||||
},
|
||||
|
||||
/// One or more transports has changed.
|
||||
/// One or more transports has changed or another transport is primary now.
|
||||
///
|
||||
/// UI should update the list.
|
||||
///
|
||||
/// This event is emitted when transport
|
||||
/// synchronization messages arrives,
|
||||
/// This event is emitted when a transport
|
||||
/// synchronization message modifies transports,
|
||||
/// but not when the UI modifies the transport list by itself.
|
||||
TransportsModified,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user