mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 23:26:12 +02:00
Added settings button to error page
This commit is contained in:
@@ -42,18 +42,31 @@ public class ActivityError extends ActivityBase {
|
||||
|
||||
TextView tvTitle = view.findViewById(R.id.tvTitle);
|
||||
TextView tvMessage = view.findViewById(R.id.tvMessage);
|
||||
ImageButton ibSetting = view.findViewById(R.id.ibSetting);
|
||||
ImageButton ibInfo = view.findViewById(R.id.ibInfo);
|
||||
|
||||
Intent intent = getIntent();
|
||||
String type = intent.getStringExtra("type");
|
||||
String title = intent.getStringExtra("title");
|
||||
String message = intent.getStringExtra("message");
|
||||
long account = intent.getLongExtra("account", -1L);
|
||||
int faq = intent.getIntExtra("faq", -1);
|
||||
|
||||
tvTitle.setText(title);
|
||||
tvMessage.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
tvMessage.setText(message);
|
||||
|
||||
ibSetting.setVisibility(account < 0 ? View.GONE : View.VISIBLE);
|
||||
ibSetting.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(view.getContext(), ActivitySetup.class)
|
||||
.setAction("target:accounts")
|
||||
.putExtra("target", "accounts");
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
ibInfo.setVisibility(faq > 0 ? View.VISIBLE : View.GONE);
|
||||
ibInfo.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -4902,6 +4902,7 @@ class Core {
|
||||
intent.putExtra("type", channel);
|
||||
intent.putExtra("title", title);
|
||||
intent.putExtra("message", message);
|
||||
intent.putExtra("account", account.id);
|
||||
intent.putExtra("faq", 22);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
PendingIntent pi = PendingIntentCompat.getActivity(
|
||||
|
||||
@@ -1171,6 +1171,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||
intent.putExtra("type", "alert");
|
||||
intent.putExtra("title", title);
|
||||
intent.putExtra("message", message);
|
||||
intent.putExtra("account", account.id);
|
||||
intent.putExtra("faq", 23);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
PendingIntent piAlert = PendingIntentCompat.getActivity(
|
||||
|
||||
Reference in New Issue
Block a user