Example #1
0
    @Override
    public void safeCallback(final PostContainer data) {
      mDialog.dismiss();

      final Fragment fragment =
          FragmentUtils.switchToPostList(mMention.getThread(), new ArrayList<String>(), data);

      final FragmentTransaction transaction =
          FragmentUtils.getDefaultTransaction(getParentFragment().getFragmentManager(), true);
      transaction.addToBackStack(mMention.getThread().getTitle());
      transaction.replace(R.id.content_frame, fragment).commit();
    }
Example #2
0
    @Override
    public void onClick(final View v) {
      final int position = mRecyclerView.getChildPosition(v);
      if (position == RecyclerView.NO_POSITION) {
        return;
      }

      final AugmentedMention mention = mAdapter.getMention(position);
      final AlertDialog dialog =
          ProgressDialog.show(
              getActivity(), "Finding post position", "Finding post position", true, true);

      final MentionCallback mentionCallback = new MentionCallback(dialog, mention);

      final PostClient client = RetrofitPostClient.getClient(getActivity());
      client.getPostsById(mention.getPostId(), mentionCallback, mentionCallback);
    }