Added long press toy button to go to integrations tab page

pull/215/head
M66B 7 months ago
parent 895ab33f21
commit e36ebf979c

@ -1107,6 +1107,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibTranslate.setOnClickListener(this);
ibTranslate.setOnLongClickListener(this);
ibSummarize.setOnClickListener(this);
ibSummarize.setOnLongClickListener(this);
ibFullScreen.setOnClickListener(this);
ibForceLight.setOnClickListener(this);
ibImportance.setOnClickListener(this);
@ -1230,6 +1231,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibTranslate.setOnClickListener(null);
ibTranslate.setOnLongClickListener(null);
ibSummarize.setOnClickListener(null);
ibSummarize.setOnLongClickListener(null);
ibFullScreen.setOnClickListener(null);
ibForceLight.setOnClickListener(null);
ibImportance.setOnClickListener(null);
@ -4771,6 +4773,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
} else if (id == R.id.ibHeaders) {
onMenuShareHtml(message);
return true;
} else if (id == R.id.ibSummarize) {
context.startActivity(new Intent(context, ActivitySetup.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("tab", "integrations"));
return true;
} else if (id == R.id.ibFull) {
boolean full = properties.getValue("full", message.id);
if (!full) {

@ -1887,6 +1887,15 @@ public class FragmentCompose extends FragmentBase {
onAI(view);
}
});
ibAI.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
v.getContext().startActivity(new Intent(v.getContext(), ActivitySetup.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra("tab", "integrations"));
return true;
}
});
menu.findItem(R.id.menu_ai).setActionView(ibAI);
View v = infl.inflate(R.layout.action_button_text, null);

Loading…
Cancel
Save