Repository navigation
feat(share): add a share extension to send images and text into chats - #1041
Merged
Merged
Conversation
Accepts images, text and web links from the share sheet, lets the user pick a chat, and sends from the extension with the shared upload/seal code. Images decode one at a time and are capped at 2560px so the extension stays under its memory limit. Also moves the plaintext/sealed photo send switch into FlipClient.sendMediaMessage(photo:) so the app and extension share it.
feat/scan-from-shared-image already claims com.flipcash.app.ios.FlipcashShare for its share extension. Both branches use one ID so it only gets registered once and the two extensions can merge into one target.
The picker listed every non-hidden conversation, which included contact DMs, unjoined groups and archived chats. Extract the Chats tab's selection into ChatListSelection and use it from both ConversationController and the extension, which now also reads group memberships and the archive file.
Render ContactAvatarView with the same picture, cached bytes and blurhash the Chats tab row uses, instead of initials. Links FlipcashUI into the extension.
…et suggestions Donate an INSendMessageIntent after a successful text or photo send, with the chat's link-form id as conversationIdentifier, the format the Share Extension preselects on.
Color.success resolves a colour asset from the main app's catalog, which the extension bundle doesn't have, so the selected checkmark drew clear.
The app drew row selection two ways: CheckView (a white ring that fills with a checkmark) on the Select Region, currency, featured groups, account and Share to Chats screens, and an inline largecircle.fill.circle symbol in the report flow. Rename CheckView to RadioButton, use it in all of them and in the share picker, and drop the report flow's one-off symbol.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a share extension, so images, text and web links can be sent into a Flipcash chat from the iOS share sheet. Builds on the FlipcashCore move in #1039, which has merged; this replaces #1040.
The extension shows one "Send to" screen: search, a Recent chats list, and up to 5 selected chats. Selecting a chat raises a compose bar with the image thumbnails, a message field prefilled with the shared text or link, and Send. Sends go to each chat in turn; if some fail, Retry resends only to those.
ChatListSelectionand used by bothConversationControllerand the extension, so the picker excludes contact DMs, unjoined groups and archived chats the same way the tab does.ContactAvatarViewwith the cached picture bytes and blurhash the Chats tab row uses. The extension never fetches, so an avatar the app hasn't cached shows its blurhash. This links FlipcashUI and its dependencies (Kingfisher, PhoneNumberKit) into the extension.INSendMessageIntentafter a successful text or photo send, with the chat's link-form id asconversationIdentifier. The extension preselects a chat when opened from that suggestion.CheckViewis renamedRadioButtonand the report flow's inlinelargecircle.fill.circleis replaced with it, so every selectable row draws the same control.The bundle ID is
com.flipcash.app.ios.FlipcashShare, the onefeat/scan-from-shared-imagealso uses, so only one extension target ships. Whichever branch lands second folds its extension into the first.Color.successresolves from the main app's asset catalog and draws clear inside the extension, which is why the picker doesn't use it.Android counterpart: code-payments/code-android-app#1757