mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
check if push is sufficient before adding device message
the check before was too implicit and relied on DOZE_ASKED_DIRECTLY only. but if the user was asked one time and went for chatmail again, it did not work and the user was getting the message "please enable 'ignore battery optimisations'" even though they were using chatmail-only.
This commit is contained in:
@@ -61,6 +61,10 @@ public class DozeReminder {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (isPushAvailableAndSufficient()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true; // yip, asking for disabling battery optimisations makes sense
|
||||
}
|
||||
|
||||
@@ -123,7 +127,6 @@ public class DozeReminder {
|
||||
public static void maybeAskDirectly(Context context) {
|
||||
try {
|
||||
if (isPushAvailableAndSufficient()) {
|
||||
// do not set DOZE_ASKED_DIRECTLY, this will happen once FCM is disabled or a non-chatmail is added
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user