mirror of https://github.com/M66B/FairEmail.git
Debug correlation ID
This commit is contained in:
parent
0c9450953c
commit
e78602db93
|
@ -2908,9 +2908,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
private void bindExtras(TupleMessageEx message) {
|
||||
int resid = 0;
|
||||
if (infra && message.infrastructure != null) {
|
||||
String resname = "infra_" + message.infrastructure;
|
||||
resid = context.getResources()
|
||||
.getIdentifier(resname, "drawable", context.getPackageName());
|
||||
if ("fairemail".equals(message.infrastructure))
|
||||
resid = R.mipmap.ic_launcher_round;
|
||||
else {
|
||||
String resname = "infra_" + message.infrastructure;
|
||||
resid = context.getResources()
|
||||
.getIdentifier(resname, "drawable", context.getPackageName());
|
||||
}
|
||||
}
|
||||
if (resid != 0)
|
||||
ibInfrastructure.setImageResource(resid);
|
||||
|
@ -4970,9 +4974,14 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
}
|
||||
|
||||
private void onActionShowInfra(TupleMessageEx message) {
|
||||
String resname = "infra_" + message.infrastructure;
|
||||
int resid = context.getResources()
|
||||
.getIdentifier(resname, "string", context.getPackageName());
|
||||
int resid;
|
||||
if ("fairemail".equals(message.infrastructure))
|
||||
resid = R.string.app_name;
|
||||
else {
|
||||
String resname = "infra_" + message.infrastructure;
|
||||
resid = context.getResources()
|
||||
.getIdentifier(resname, "string", context.getPackageName());
|
||||
}
|
||||
String infra = (resid < 0 ? message.infrastructure : context.getString(resid));
|
||||
ToastEx.makeText(context, infra, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
|
|
@ -2024,6 +2024,12 @@ public class MessageHelper {
|
|||
return "flowmailer";
|
||||
}
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
String fairemail = imessage.getHeader(HEADER_CORRELATION_ID, null);
|
||||
if (!TextUtils.isEmpty(fairemail))
|
||||
return "fairemail";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -626,6 +626,7 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
|
|||
message.ui_hide = true;
|
||||
message.ui_busy = Long.MAX_VALUE; // Needed to keep messages in user folders
|
||||
message.error = null;
|
||||
message.infrastructure = "fairemail";
|
||||
message.id = db.message().insertMessage(message);
|
||||
|
||||
File file = EntityMessage.getFile(this, message.id);
|
||||
|
|
Loading…
Reference in New Issue