mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 22:59:54 +01:00
Use commit action to add contacts on UI thread.
This commit is contained in:
@@ -205,18 +205,13 @@ class ForumViewModel extends ThreadListViewModel<ForumPostItem> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void loadSharingContacts() {
|
public void loadSharingContacts() {
|
||||||
runOnDbThread(() -> {
|
runOnDbThread(true, txn -> {
|
||||||
try {
|
Collection<Contact> contacts =
|
||||||
Collection<Contact> contacts =
|
forumSharingManager.getSharedWith(txn, groupId);
|
||||||
forumSharingManager.getSharedWith(groupId);
|
Collection<ContactId> contactIds = new ArrayList<>(contacts.size());
|
||||||
Collection<ContactId> contactIds =
|
for (Contact c : contacts) contactIds.add(c.getId());
|
||||||
new ArrayList<>(contacts.size());
|
txn.attach(() -> sharingController.addAll(contactIds));
|
||||||
for (Contact c : contacts) contactIds.add(c.getId());
|
}, e -> logException(LOG, WARNING, e));
|
||||||
sharingController.addAll(contactIds);
|
|
||||||
} catch (DbException e) {
|
|
||||||
logException(LOG, WARNING, e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void deleteForum() {
|
void deleteForum() {
|
||||||
|
|||||||
Reference in New Issue
Block a user