From 4d2215a442d8c83b8cc9416bb0b5088e92a02138 Mon Sep 17 00:00:00 2001 From: Torsten Grote <t@grobox.de> Date: Mon, 14 Dec 2015 17:32:52 -0200 Subject: [PATCH] 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 --- .../android/groups/ShareGroupActivity.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/briar-android/src/org/briarproject/android/groups/ShareGroupActivity.java b/briar-android/src/org/briarproject/android/groups/ShareGroupActivity.java index e926614a28..1169c69e1a 100644 --- a/briar-android/src/org/briarproject/android/groups/ShareGroupActivity.java +++ b/briar-android/src/org/briarproject/android/groups/ShareGroupActivity.java @@ -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() { -- GitLab