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:
Torsten Grote
2015-12-14 17:32:52 -02:00
parent 3f58af3b04
commit 4d2215a442

View File

@@ -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() {