If you've left a group, we shouldn't show it in any pickers except the
blocking manager (`AddToBlockListViewController`). Before this commit,
we were showing it in a few places. That might let you sorta-send a
message to a group you'd left.
I enumerated all the places where we have pickers, and what their
behavior should be.
| Description | Code | Show groups? | Show left groups? |
| --------------------------------------------------------------------- | ------------------------------------------- | ------------------------ | ------------------------ |
| Various group member pickers (adding members, group story recipients) | `BaseMemberViewController` | No | N/A |
| Send payment screen | `PaymentsSendRecipientViewController` | No | N/A |
| Gift badging “choose recipient” screen | `BadgeGiftingChooseRecipientViewController` | No | N/A |
| Composer | `ComposeViewController` | Yes, only when searching | No |
| Add to block list (in Settings → Privacy) | `AddToBlockListViewController` | Yes, only when searching | Yes, only when searching |
| Share sheet | `SharingThreadPickerViewController` | Yes | No |
| Message forwarding | `ForwardMessageViewController` | Yes | No |
| In-app camera | `CameraFirstCaptureSendFlow` | Yes | No |
| Share group link via Signal | `GroupLinkViewController` | Yes | No |
| Share sticker pack, from in a chat | `StickerPackViewController` | Yes | No |
| Share sticker pack, from sticker management screen | `ManageStickersViewController` | Yes | No |
| “New Group Story” screen | `NewGroupStoryViewController` | Yes (exclusively) | No |
This doesn't intend to change the behavior of *deleted* groups. Those
will show up when searching if groups are shown at all. For example, a
deleted group will show in the composer if you search for it just like
any other group. A deleted group will *not* show in the "send payment"
screen because groups are never shown there. Again, the behavior around
deleted groups should remain unchanged.
Co-authored-by: Max Radermacher <max@signal.org>
* initial approach commit, needs cleanup
* Keep >30s videos for non-story recipients, but split for stories
* Some cleanup
* fix too many chats toast offset
* show tooltip in the send flow
* pr feedback
Here's a simplified version of the code we currently have:
let sql = """
SELECT COUNT(*) - 1
FROM my_table
WHERE id >= :current_id
"""
return try UInt.fetchOne(db, sql: sql)
This causes GRDB to throw an error when the result of the query is `-1`
because `-1` can't be converted to an unsigned integer. This caused a
crash.
I believe the `- 1` subtraction exists to filter out the current
interaction, so I updated the SQL to effectively be:
SELECT COUNT(*)
FROM my_table
WHERE id > :current_id
This should prevent us from ever selecting `-1`, and therefore prevent
this crash.
* add hasViewedOnboardingStory to account record
* Post notifications for TSAccountManager onboarding state
* fix bug with local addressing when updating profile key data
* sync onboarding story view status with accountRecord
* do the bare minimum to keep tests working
* use asVoid
* Hide camera controls when switching to TEXT.
* Streamline camera capture session state tracking.
Stop camera when switching to TEXT.
* Basic text story composer.
All UI works, but needs fine-tuning and tapping on Next (->) doesn't do anything.
* Run auto-genstrings.
* Adjust text size and alignment as user enters text.
1..49 characters: 34 pt, center-aligned.
50..199 characters: 24 pt, center-aligned.
200.. characters: 18 pt, natural alignment.
* Change default text color in text story composer to white.
* Added support for changing background of text story composer.
Selection is allowed from palette of 5 gradients and 11 solid colors.
* Improve vertical alignment of text in text story composer.
Text (and possible link preview panel in the future) should be vertically
centered in the area above either bottom controls or onscreen keyboard.
* Add UI for attaching a link preview to a text story.
* Add support for posting text stories.
* Lint.
The `uuidString` property calls `uuid?.uuidString`. If we use `if let`,
we can eliminate the first `owsFailDebug` at compile-time.
If the phone number isn’t set, there’s no point in returning
`uuidString` -- this is guaranteed to be `nil` if we reach this code.
* Add story viewer onboarding UX
* fonts and image tweaks
* trigger onboarding UX from everywhere, not just the story list
* remove usages of NSLayoutConstraint. Use ManualLayoutView for button layout