mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Improve Forum Sharing UI when sharing with selected contacts
When sharing only with chosen contacts, checking the contact's checkbox and pressing Done nothing happens and the forum is not shared. An additional click on "Share Forum" is necessary to actually share. This behavior is fixed with this change. Now, clicking 'Done' immediately shares the forum. Closes #153
This commit is contained in:
@@ -117,17 +117,21 @@ SelectContactsDialog.Listener {
|
||||
else displayVisibility();
|
||||
} else if (view == shareButton) {
|
||||
if (changed) {
|
||||
// Replace the button with a progress bar
|
||||
shareButton.setVisibility(GONE);
|
||||
progress.setVisibility(VISIBLE);
|
||||
// Update the group in a background thread
|
||||
storeVisibility(shareWithAll.isChecked());
|
||||
share();
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void share() {
|
||||
// Replace the button with a progress bar
|
||||
shareButton.setVisibility(GONE);
|
||||
progress.setVisibility(VISIBLE);
|
||||
// Update the group in a background thread
|
||||
storeVisibility(shareWithAll.isChecked());
|
||||
}
|
||||
|
||||
private void loadVisibility() {
|
||||
runOnDbThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -194,6 +198,7 @@ SelectContactsDialog.Listener {
|
||||
|
||||
public void contactsSelected(Collection<ContactId> selected) {
|
||||
this.selected = Collections.unmodifiableCollection(selected);
|
||||
share();
|
||||
}
|
||||
|
||||
public void contactSelectionCancelled() {
|
||||
|
||||
Reference in New Issue
Block a user