oxen-io / session-android

A private messenger for Android.
https://getsession.org
GNU General Public License v3.0
1.86k stars 170 forks source link

[SES-1949] Move unapprovedMessageCount to IO #1503

Closed bemusementpark closed 4 months ago

bemusementpark commented 4 months ago

This is a refactor to move calls to threadDb#unapprovedMessageCount off of the main thread which was causing ANRs.

This PR also:

  1. fixes the binding for the messageRequests header which probably wasn't being update correctly when conversations change.
  2. refactors view creating of the message requests header to the Adapter.
KeeJef commented 4 months ago

Out of curiosity, does this address SES-1494 as a side effect?

simophin commented 4 months ago

@KeeJef it may have, it's worth trying out.

bemusementpark commented 4 months ago

Yeah @KeeJef , SES-1494 was probably improved, but I just added a 1-line fix to make sure.