mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
08184d10d0
commit
d96fd810cf
|
@ -202,6 +202,10 @@ public class Log {
|
||||||
config.beforeSend(new BeforeSend() {
|
config.beforeSend(new BeforeSend() {
|
||||||
@Override
|
@Override
|
||||||
public boolean run(@NonNull Report report) {
|
public boolean run(@NonNull Report report) {
|
||||||
|
boolean crash_reports = prefs.getBoolean("crash_reports", false); // opt-in
|
||||||
|
if (!crash_reports)
|
||||||
|
return false;
|
||||||
|
|
||||||
int count = prefs.getInt("crash_report_count", 0);
|
int count = prefs.getInt("crash_report_count", 0);
|
||||||
count++;
|
count++;
|
||||||
prefs.edit().putInt("crash_report_count", count).apply();
|
prefs.edit().putInt("crash_report_count", count).apply();
|
||||||
|
@ -237,7 +241,7 @@ public class Log {
|
||||||
ex.getMessage().startsWith("https://autoconfig.thunderbird.net/")))
|
ex.getMessage().startsWith("https://autoconfig.thunderbird.net/")))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return prefs.getBoolean("crash_reports", false); // opt-in
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue