* Shuffle code around, adding UnsentTextAttachment
* Replace usages of TextAttachment with UnsentTextAttachment where applicable, creating an actual TextAttachment (and associated OWSlinkPreview image TSAttachment, if applicable) only per-recipient
* Only upload one text story link preview image attachment and propagate it to the individual TSAttachments created for each destination
* update comments so I don't lose my mind the next time I read this code
* Dedupe text stories sent to the same person via multiple private threads
* fix non-compiling tests
* pr feedback
On iOS 16, the nav bar itself is transparent, so the container view
controller’s background is visible. The color of that view wasn’t being
updated, which resulted in the nav bar appearing the wrong color.
A few view controllers worked around this by manually updating just the
background color to the same value used by the table view. It seems
cleaner to re-apply the overall styling when the theme changes.
There were some redundant checks as a result of the duplication between
the validation and lookup methods. Shift more of the logic into the
shared method to avoid repeating the same thing multiple times.
Also, return a single item rather than an `Array`. We only expect a
single result, so there’s no need to pass around an `Array.`
* apply theme to cells when conversation picker theme changes
* Retain selection UI when reloading conversation picker cells
* Prioritize newly created story threads for conversation picker sort ordering
* Index private story threads for searching
* Add story search results to conversation picker and fix issues with reloading with stuff pre-selected
* PR feedback 1: efficient thread migration
* PR feedback 2: don't allow expansion of story search results
Change license to AGPL
This commit:
- Updates the `LICENSE` file
- Start every file with something like:
// Copyright YEAR_FIRST_PUBLISHED Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
---
First, I removed existing license headers with this Ruby 3.1.2 script:
require 'set'
EXTENSIONS_TO_CHECK = Set['.h', '.hpp', '.cpp', '.m', '.mm', '.pch', '.swift']
same = 0
different = 0
all_files = `git ls-files`.lines.map { |line| line.strip }
all_files.each do |relative_path|
if relative_path == 'Pods'
next
end
unless EXTENSIONS_TO_CHECK.include? File.extname(relative_path)
next
end
path = File.expand_path(relative_path)
contents = File.read(path)
new_contents = contents.sub(/\/\/\n\/\/ Copyright .*\n\/\/\n\n/, '')
if contents == new_contents
same += 1
else
different += 1
end
File.write(path, new_contents)
end
puts "updated #{different} file(s), left #{same} untouched"
I'm sure this script could be improved, but it worked well enough.
Then, I created `Scripts/lint/lint-license-headers` and ran it to auto-
fix a lot of files. This changed the mode of some files, but I think
that's actually desirable. For example,
`SignalServiceKit/src/Util/AppContext.m` previously had a mode of
`0755/-rwxr-xr-x`, and it's now `0644/-rw-r--r--`.
Then I fixed some stragglers and updated the precommit script.
See [a similar change in the Desktop app][0].
[0]: 8bfaf598af
* Support scale aspect fill in MediaMessageView
* show image/video previews on conversation picker when in stories only send flow
* show text story previews in conversation picker
* fix media preview border color
* update rotation for RTL
* PR feedback
* Hide story video duration tooltip when changing selection
* update story row swipe action title font
* Update tab bar icons
* Fix ghost safe area shown when cancelling an interactive dismiss of a chat view
* Use forced dark theme background color for cell selection in story info sheet
* Exclude hidden story contexts from conversation picker
* remove unused asset
* pr feedback
* Disable view once media in stories send flow
* Remove stories from picker if sending a view once media
* dont show view once button if sending to stories from sharesheet
Quiets this warning:
> genstrings: warning: Key "STORY_SETTINGS_WHO_CAN_VIEW_THIS_FOOTER"
> used with multiple comments "Section footer for the 'viewers' section
> on the 'story settings' view" & "Section footer for the 'viewers'
> section on the 'story settings' view."
Also changes another string for consistency (removes the trailing
period).
This fixes our remaining SwiftLint violations, which were small.
It also updates the precommit script to fail if any violations are
found, even warnings. This will cause CI to fail if you include a file
that isn't SwiftLint-compatible.
* Add StoryContextAssociatedData and db migrations
* Remove hideStory from ThreadAssociatedData
* Remove lastViewedStoryTimestamp and lastReceivedStoryTimestamp from TSThread
* drop deprecated columns in db migration
* add indexes
* dump schema.sql
* Update unviewed stories SQL query
* fix thread fetching for incoming story messages
* reload story tab badge when StoryContextAssociatedData changes
* Add test for TSGroupModel backwards-compatible deserialization
* move db migration
* Only use StoryContextAssociatedData for story badge count
* update StoryContextAssociatedData lastReceivedTime when a story message is deleted
* catch group threads for outgoing story messages too
* clean up sql query
* Only update lastReceievedStoryTimestamp for remote deletions
* add latestUnexpiredTimestamp to StoryContextAssociatedData
* Add first send story privacy field to AccountRecord proto
* Store hasSetMyStoriesPrivacyKey on StoryManager
* sync hasSetMyStoriesPrivacy state
* Reuse MyStorySettingsViewController in a sheet view controller
* Show my story privacy settings from conversation picker if unset when selecting my story destination
* reload my story row to change subtitle
* pr feedback
* fix conflict between story viewer context menu drag and navigational pan gestures
* Fix RTL chevrons on story list
* swipe only between hidden stories OR visible stories, never both
* Add table row swipe actions for hiding/unhiding stories & update icons to sharp corners instead of rounded
* make story viewer context menu always dark theme to match design mocks
* dont fail dev builds when harmlessly double dismissing a context menu, which happens if backgrounding the app while the context menu is open
* update my story row icons to 16pt
* swipe to delete on my story rows
* Use themed icons. Get filled versions of various context menu icons from design
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