Skip to content

Commit

Permalink
Merge pull request #351
Browse files Browse the repository at this point in the history
feat: show reply sheet on reply button
  • Loading branch information
LucasGGamerM authored Mar 17, 2024
2 parents 47473a6 + 14a36d2 commit 307f886
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,37 +205,37 @@ private void onReplyClick(View v){
item.status, item.accountID, null,
status -> {
UiUtils.opacityIn(v);
Bundle args=new Bundle();
args.putString("account", item.accountID);
args.putParcelable("replyTo", Parcels.wrap(status));
Nav.go(item.parentFragment.getActivity(), ComposeFragment.class, args);
openComposeView(status, item.accountID);
}
);
return;
}
UiUtils.opacityIn(v);
Bundle args=new Bundle();
args.putString("account", item.accountID);
args.putParcelable("replyTo", Parcels.wrap(item.status));
Nav.go(item.parentFragment.getActivity(), ComposeFragment.class, args);
openComposeView(item.status, item.accountID);
}

private boolean onReplyLongClick(View v) {
if(item.status.preview) return false;
if (AccountSessionManager.getInstance().getLoggedInAccounts().size() < 2) return false;
UiUtils.pickAccount(v.getContext(), item.accountID, R.string.sk_reply_as, R.drawable.ic_fluent_arrow_reply_28_regular, session -> {
Bundle args=new Bundle();
String accountID = session.getID();
args.putString("account", accountID);
UiUtils.lookupStatus(v.getContext(), item.status, accountID, item.accountID, status -> {
if (status == null) return;
args.putParcelable("replyTo", Parcels.wrap(status));
Nav.go(item.parentFragment.getActivity(), ComposeFragment.class, args);
openComposeView(status, accountID);
});
}, null);
return true;
}

private void openComposeView(Status status, String accountID) {
item.parentFragment.maybeShowPreReplySheet(status, () ->{
Bundle args=new Bundle();
args.putString("account", accountID);
args.putParcelable("replyTo", Parcels.wrap(status));
Nav.go(item.parentFragment.getActivity(), ComposeFragment.class, args);
});
}

private void onBoostClick(View v){
if(item.status.preview) return;
if (GlobalUserPreferences.confirmBoost) {
Expand Down

0 comments on commit 307f886

Please sign in to comment.