Page MenuHomePhabricator

[lib] Fix highestTimestamp assignment in useGetLastUpdatedTimes
ClosedPublic

Authored by ashoat on Mon, Mar 24, 8:20 AM.
Tags
None
Referenced Files
F5317040: D14495.id47534.diff
Tue, Apr 8, 6:48 PM
Unknown Object (File)
Sun, Apr 6, 8:30 AM
Unknown Object (File)
Sat, Apr 5, 10:50 AM
Unknown Object (File)
Sat, Apr 5, 12:42 AM
Unknown Object (File)
Thu, Apr 3, 5:23 PM
Unknown Object (File)
Tue, Apr 1, 5:34 PM
Unknown Object (File)
Tue, Apr 1, 12:52 AM
Unknown Object (File)
Mon, Mar 31, 4:20 PM
Subscribers
None

Details

Summary

highestTimestamp is used for setting lastUpdatedAtMostTime. The purpose of lastUpdatedAtMostTime is specifically for use in ChatThreadItemLoaderCache, where it specifies the order in which we test messages to get a final lastUpdatedTime.

We want to test messages in the order of lastUpdatedAtMostTime so that we can conclude when all of the non-resolves messages can be guaranteed to have a lower timestamp than the ones that have already resolved.

The current behavior here is broken because we're only setting highestTimestamp in cases where the time doesn't need to be resolved. We should be setting it to the absolute largest possible value that we could get after resolution, which is going to be the timestamp of the most recent message.

Depends on D14494

Test Plan

I tested this along with the rest of the stack by making sure that everything still worked on my physical device with a release build, and that performance was not degraded

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/robotextnoise
Lint
No Lint Coverage
Unit
No Test Coverage