Small fix

This commit is contained in:
M66B 2020-09-07 09:53:12 +02:00
parent aaa528434a
commit 46d15e9f79
2 changed files with 10 additions and 2 deletions

View File

@ -1600,12 +1600,16 @@ public class FragmentCompose extends FragmentBase {
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem target) {
Intent intent = target.getIntent();
if (intent == null)
return false;
if (!ActivityBilling.isPro(getContext())) {
startActivity(new Intent(getContext(), ActivityBilling.class));
return true;
}
long id = target.getIntent().getLongExtra("id", -1);
long id = intent.getLongExtra("id", -1);
for (EntityAnswer answer : answers)
if (answer.id.equals(id)) {
if (etSubject.getText().length() == 0)

View File

@ -2450,6 +2450,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem target) {
Intent intent = target.getIntent();
if (intent == null)
return false;
if (!ActivityBilling.isPro(getContext())) {
startActivity(new Intent(getContext(), ActivityBilling.class));
return true;
@ -2458,7 +2462,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
startActivity(new Intent(getContext(), ActivityCompose.class)
.putExtra("action", "reply")
.putExtra("reference", message.id)
.putExtra("answer", target.getIntent().getLongExtra("id", -1)));
.putExtra("answer", intent.getLongExtra("id", -1)));
return true;
}
});