Check the timestamp before setting the value. We need to use a different update type so that we can update also the timestamps.
https://linear.app/comm/issue/ENG-9120/update-thread-unread-status-spec
Depends on D13241
Differential D13240
[lib] Check the timestamps when updating read status tomek on Sep 4 2024, 7:28 AM. Authored by Tags None Referenced Files
Subscribers
Details Check the timestamp before setting the value. We need to use a different update type so that we can update also the timestamps. https://linear.app/comm/issue/ENG-9120/update-thread-unread-status-spec Depends on D13241 Process a couple of operations setting to read / unread.
Diff Detail
Event Timeline
|
We definitely should return something from this lambda since otherwise it is useless to assign it to variable.
If we find that we don't have permissions then just calling await this.requestAndroidNotificationsPermission(); would result in a prompt asking for notifications permissions. However if the user grants those permissions then hasPermissions is still falsy (since promise returned nothing), so deviceToken will be set to null. Nevertheless permissions are actually granted byt the OS, so the state on the device and keyserver would heal itself on next render.
This differential fixes this case so that if user grants permissions correct state is achieved immediately without need for additional re-render to heal the state.