Show Snackbar after introduction request has been sent

Closes #360
This commit is contained in:
Torsten Grote
2016-07-06 13:56:22 -03:00
parent 3ae3fdab63
commit db2d965006
4 changed files with 27 additions and 8 deletions

View File

@@ -85,11 +85,11 @@ public class IntroductionActivity extends BriarActivity implements
}
}
public int getContactId() {
int getContactId() {
return contactId;
}
public void showMessageScreen(View view, Contact c1, Contact c2) {
void showMessageScreen(View view, Contact c1, Contact c2) {
IntroductionMessageFragment messageFragment =
IntroductionMessageFragment

View File

@@ -29,6 +29,7 @@ import javax.inject.Inject;
import de.hdodenhof.circleimageview.CircleImageView;
import im.delight.android.identicons.IdenticonDrawable;
import static android.app.Activity.RESULT_OK;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static android.widget.Toast.LENGTH_SHORT;
@@ -170,7 +171,7 @@ public class IntroductionMessageFragment extends BaseFragment {
});
}
public void onButtonClick(final Contact c1, final Contact c2) {
private void onButtonClick(final Contact c1, final Contact c2) {
// disable button to prevent accidental double invitations
ui.button.setEnabled(false);
@@ -179,7 +180,8 @@ public class IntroductionMessageFragment extends BaseFragment {
// don't wait for the introduction to be made before finishing activity
introductionActivity.hideSoftKeyboard(ui.message);
introductionActivity.finish();
introductionActivity.setResult(RESULT_OK);
introductionActivity.supportFinishAfterTransition();
}
private void makeIntroduction(final Contact c1, final Contact c2,