mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Move saving out of synchronized block
This commit is contained in:
parent
f7b2916618
commit
3b81ba3596
1 changed files with 5 additions and 1 deletions
|
@ -189,6 +189,7 @@ public class GroupStore {
|
|||
}
|
||||
|
||||
public void mergeRecipients(final RecipientId recipientId, final RecipientId toBeMergedRecipientId) {
|
||||
Storage storage = null;
|
||||
synchronized (groups) {
|
||||
var modified = false;
|
||||
for (var group : this.groups.values()) {
|
||||
|
@ -201,9 +202,12 @@ public class GroupStore {
|
|||
}
|
||||
}
|
||||
if (modified) {
|
||||
saver.save(toStorageLocked());
|
||||
storage = toStorageLocked();
|
||||
}
|
||||
}
|
||||
if (storage != null) {
|
||||
saver.save(storage);
|
||||
}
|
||||
}
|
||||
|
||||
private GroupInfo getGroupLocked(final GroupId groupId) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue