...so we can enable and disable the ring button live. And do so
preserving the user's preferences in case they turn off ringing, then
someone joins the group and it goes over the limit, then someone
leaves the group and it's back under.
- On the smallest devices (iPod touch and original iPhone SE) shrink
the spacing between the buttons in addition to shrinking the
buttons, so they all fit on the screen with some margin to spare.
- On other phones, shrink the buttons but keep the full spacing
between them. (This is the current behavior.)
- Never shrink buttons on iPads, which can afford and benefit from
larger tap targets.
While here, let the call control stack views do some of the layout
work for us.
MediaGallery and the conversation settings view were the only clients
of this, and both are better served by explicit notifications for the
state transitions they care about.
Both MediaGallery and the conversation settings view care about added
or deleted media attachment streams (that is, attachments that are
downloaded and accessible), but not other updates to the attachments
table. Listening for just those notifications is more efficient than
listening to all database changes (though we still have to handle
background changes coming from other processes, like the share
extension).
Additionally, while here, don't immediately refresh the conversation
settings view if it's not currently showing (say, because it's covered
by the All Media view).
Follow-up to 678f8cb332. Note that the group members icon in the
top-right (portrait orientation) is *not* rotated, since it's
associated with the count label that follows and the top bar in
general.
Currently, group (v2) updates are just instances of `TSOutgoingMessage`.
This works, but is inconsistent with other outgoing messages, which
subclass it.
This refactor changes that to make things consistent.
I think this is a useful change on its own, but it will also make future
changes easier.
In adfda71472, we added a disappearing
countdown to the message details screen. It would say something like "6d
23h 58m 6s". Now it just says "6 days 23 hours".
I also reverted some stuff from that commit, because it's no longer
necessary.
Our UI now [matches Android][0].
[0]: 4656cf4bef
There's no reason to special-case "three" vs "four or more" in our
current format (rather than using "three or more"), and in fact the
"three" case wasn't using correct English (it was correct in the
PluralAware table, though). Update both the in-call title text and the
conversation item to use the PluralAware "many" version for "three or
more" people in a call.
When the theme changes (which occurs spuriously
when backgrounding and reactivating the app in
dark mode on iOS 15), CVC.applyTheme was called
before CVC.updateThemeIfNecessary. This caused
quoted replies to have the wrong appearance.
This commit changes the order so that the quoted
reply's appearance is always correct.
This change should have no user impact because it only changes
comments.
We had some comments that referenced the Signal server repo. They
referenced a commit that was a little out of date (from March 2022).
This updates the links.
This change should have no user impact.
We effectively had code like this:
#if TESTABLE_BUILD
foo()
#if TESTABLE_BUILD
bar()
#endif
#endif
The inner ones are unnecessary, so I removed them.
When you compose reply to a message but do not
send it, we would persist the text you entered but
would lose the quoted message to which you were
replying.
This commit adds support for persisting that
information.
ThreadReplyInfo is a new class that uses the
key-value store to associate a single optional
reference to a message with each thread.
The following behaviors are nw:
* When you enter the CVC the input toolbar is
updated to have the quoted message.
* When you exit the CVC the quoted message is
saved.
* When a thread is deleted, the quoted message is
deleted.