deltachat / deltachat-android

Email-based instant messaging for Android.
GNU General Public License v3.0
1.07k stars 145 forks source link

on second chatmail account, question about "disable battery optimisations" appears #3114

Closed r10s closed 1 month ago

r10s commented 1 month ago

when using only chatmail accounts, the question about "disable battery optimisations" is not needed.

however, sometimes it pops up even then.

one way to reproduce:

-> question about "disable battery optimisations" is shown.

it is important to have a fresh install so that the system/deltachat does not block the question by other reasons.

r10s commented 1 month ago

did some investigations:

  1. we need to know if all profiles are chatmail profiles or not

  2. that information seems not to be available after configure() - but only a moment later after connecting to IMAP

  3. for the first account, things usually work asking the user if they want to use notifications or not delay things long enough, so that isChatmail() becomes valid - but this seems random, may still fail when tapping quick

  4. for the second account, the question is not triggered, so the isChatmail() check is done too quickly and not correct yet

@link2xt is that correct? or did android sth wrong? could core easily provide the information after configure()? if that is too complicated or would delay things otherwise, we should look for alternative approaches, eg:

r10s commented 1 month ago

closed by https://github.com/deltachat/deltachat-core-rust/pull/5671