If we queue N UUIDs [1, 2, ..., N], we’ll send a request to fetch all of
them. If we queue those same N UUIDs again, we’ll stop processing after
the first one, without sending any fetch request.
We’ll start processing again the next time `process()` is called. This
could happen in response to network availability changing, or it could
happen in response to scheduling the N+1’th UUID. (Though, we won’t
necessarily fetch the N+1’th UUID in this case -- we’ll fetch the 2nd.)
These cached results also expire after a few minutes or a few hours,
depending on the most recent result. Therefore, this fetcher may behave
somewhat erratically, where it fetches profiles, stops for a few
minutes, then starts fetching profiles again.
As far back as 823927685d, the profile
updates were asynchronous. At that point it time, it didn’t matter
because there wasn’t a completion block; callers couldn’t know when the
updates *should* be complete, so it didn’t matter when they finished.
However, in 856fef7664 a Promise result
was added, presumably to allow callers to know when it was safe to check
GV2 capabilities. Now, a cursory reading of the API would suggest that
all changes were persisted once the Promise was resolved.
This can result in bugs, such as [this example][0], where we fetch the
profile and then check a capability in the database. Even though it’ll
*probably* be the case, there’s no guarantee that the updated profile
will be persisted when we try to fetch the latest capability.
[0]: 465d00664b/Signal/src/ViewControllers/AppSettings/Donations/BadgeGiftingConfirmationViewController.swift (L69-L88)
This change should have no user impact.
We commonly pair a currency, like USD, and an amount, like 1.23. This
adds the `FiatMoney` struct. It's a simple struct with two fields.
After adding it, I tried to use it everywhere. (It's possible I missed a
spot.)
I think this is a useful change on its own, but it'll be nice for an
upcoming change, too.
See also: [Android's equivalent class][0].
[0]: cb65347bb3/core-util/src/main/java/org/signal/core/util/money/FiatMoney.java (L1)
This change should have no user impact.
`DonationViewController` is now `DonationSettingsViewController`.
I think this is a better name on its own, but it'll seem even better
after upcoming change.
* fix story views + replies sheet header update when swiping
* fix my story privacy show more off-by-one
* Disable story sends when hiding a group story. Unhide when enabling story sends to a group story.
* More consistent story tab bar badge offset
* Observe story viewed ring changes in ConversationAvatarView itself
* Manage ConversationAvatarView's story observation based on the context
* remove story state from thread view model, now unused
* pr feedback renames
* Preserve selection in text story composer after changing font size.
Fixes an issue where input cursor would jump to the end when adding/deleting
text in the beginning or middle of the text and those edits caused font size
to increase / decrease.
That unwanted behavior was caused by replacing the entire `UITextView.attributedText`.
* Ensure entire text story draft has same font after undo / redo operation.
UITextView's undo manager preserves attributes of text being cut / pasted, which
might cause text view to contain fragments with different font.
The solution is to detect when there's more than one font used in UITextView
and re-apply attributes to the entire text if when that happens.