mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 21:59:54 +01:00
Merge branch 'client-version-update-events' into 'master'
Send ClientVersionUpdatedEvent for each client state change, not only on version updates See merge request briar/briar!1724
This commit is contained in:
@@ -228,15 +228,11 @@ class ClientVersioningManagerImpl implements ClientVersioningManager,
|
|||||||
Contact contact = db.getContact(txn, c);
|
Contact contact = db.getContact(txn, c);
|
||||||
callVisibilityHooks(txn, contact, before, after);
|
callVisibilityHooks(txn, contact, before, after);
|
||||||
}
|
}
|
||||||
// Broadcast events for any new client versions
|
// Broadcast events for any client version update
|
||||||
Set<ClientVersion> oldRemoteVersions = new HashSet<>();
|
|
||||||
for (ClientState cs : oldRemoteStates) {
|
|
||||||
oldRemoteVersions.add(cs.clientVersion);
|
|
||||||
}
|
|
||||||
for (ClientState cs : newRemoteStates) {
|
for (ClientState cs : newRemoteStates) {
|
||||||
if (!oldRemoteVersions.contains(cs.clientVersion)) {
|
if (!oldRemoteStates.contains(cs)) {
|
||||||
txn.attach(new ClientVersionUpdatedEvent(c,
|
txn.attach(
|
||||||
cs.clientVersion));
|
new ClientVersionUpdatedEvent(c, cs.clientVersion));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (FormatException e) {
|
} catch (FormatException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user