Skip to content

Commit

Permalink
feat: Long click to open channel in send as select
Browse files Browse the repository at this point in the history
Co-authored-by: tehcneko <chsqwyx@gmail.com>
  • Loading branch information
omg-xtao and tehcneko committed Sep 29, 2023
1 parent 92a8e8f commit c273879
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
Expand Down Expand Up @@ -323,6 +324,15 @@ public void onHide(@NonNull Bulletin.Layout layout) {
clicked = true;
selectCallback.onPeerSelected(recyclerView, (SenderView) view, peerObj.peer);
});
recyclerView.setOnItemLongClickListener((view, position) -> {
TLRPC.TL_sendAsPeer peerObj = peers.get(position);
if (peerObj.peer.channel_id != 0) {
Bundle args = new Bundle();
args.putLong("chat_id", peerObj.peer.channel_id);
parentFragment.presentFragment(new ChatActivity(args));
}
return true;
});
recyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER);

recyclerFrameLayout.addView(recyclerView);
Expand Down

0 comments on commit c273879

Please sign in to comment.