Exemple #1
0
  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    doIfAuthorizedHelper.onActivityResult(requestCode, resultCode);

    if (requestCode == RequestCodes.WRITE_COMMENT && resultCode == Activity.RESULT_OK) {
      onNewComments(WriteMessageActivity.getNewComment(data));
    }
  }
Exemple #2
0
  @SuppressWarnings("CodeBlock2Expr")
  @Override
  public void onAnswerClicked(Comment comment) {
    Runnable retry = () -> onAnswerClicked(comment);

    doIfAuthorizedHelper.run(
        () -> {
          startActivityForResult(
              WriteMessageActivity.answerToComment(getActivity(), feedItem, comment),
              RequestCodes.WRITE_COMMENT);
        },
        retry);
  }