Commit Graph

147 Commits

Author SHA1 Message Date
Nora Trapp
5be184dc21 Add the ability to view all your signal connections 2022-10-18 13:39:00 -07:00
Nora Trapp
88eafd3458 Don't allow creating a group story for a group we can't message in 2022-10-18 11:09:10 -07:00
Nora Trapp
5f048550e1 Add always dark support to blocking announcement only view 2022-10-18 11:09:10 -07:00
Nora Trapp
d5f4c92018 Update new story button 2022-10-17 23:45:00 -07:00
Nora Trapp
2c59b2f7b3 Fix localization in safety number sheet 2022-10-17 23:43:56 -07:00
Harry
150fb036cb
Fix scaleAspectFill 2: electric boogaloo 2022-10-14 18:11:13 -07:00
Harry Sanabria
da147d9676 Fix MediaMessageView scale fill constraints for portrait images with smaller aspect ratios 2022-10-14 10:09:39 -07:00
Evan Hahn
370ff654e7
Change license to AGPL
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
2022-10-13 08:25:37 -05:00
Harry
9d4fb97dfd
Add story media previews to conversation picker in story send flow
* 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
2022-10-12 09:59:49 -07:00
Harry
e4316d3a39
A bunch of story fixes
* 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
2022-10-12 09:54:50 -07:00
Max Radermacher
3ffa2dca2c
Fix nullability for countryNameFromCountryCode 2022-10-11 17:30:58 -07:00
Harry
3f0fe34089
Disable view once media in stories send flow
* 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
2022-10-11 13:11:48 -07:00
Max Radermacher
ef91c13909 Remove unused RecipientPickerDelegate method
It appears unused since 8e4fd443cc.
2022-10-11 10:13:56 -07:00
Max Radermacher
db2677b0a7 Fix typo in shouldUseAsyncSelection 2022-10-11 10:13:56 -07:00
Evan Hahn
3318cbbb86
Add method to add multiple table sections at once
This should have no user impact.

I think this change is useful on its own, but may also make an upcoming
change easier.
2022-10-11 09:11:25 -07:00
Evan Hahn
2084c90715 Fix genstrings warning for stories string
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).
2022-10-07 17:10:53 -05:00
Evan Hahn
1b00741b6d
Fix remaining SwiftLint failures, lint more strictly
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.
2022-10-07 12:00:26 -05:00
Max Radermacher
61fd33fa07 Remove redundant property assignments 2022-10-06 17:10:46 -07:00
Nora Trapp
3e9f51e512
Fix some stories strings 2022-10-06 13:06:48 -07:00
Harry
88ed7a0376
Fix group call member sheet header blur effect
* Fix group call member sheet header blur effect

* pr feedback
2022-10-05 12:23:43 -07:00
Harry
29fbb192d5
Add my story privacy settings learn more
* Add my story privacy settings learn more

* light fixes for boost sheet

* PR feedback

* audit usages of InteractiveSheetViewController
2022-10-04 15:11:16 -07:00
Nora Trapp
b9842b5eb2 Allow forwarding to stories 2022-10-03 21:35:32 -07:00
Nora Trapp
ba90b3989d Fix the number of stories rendered on conversation picker 2022-10-03 21:35:32 -07:00
Nora Trapp
8f8ec0c249 Show red X when picking contacts to exclude 2022-10-03 21:35:32 -07:00
Nora Trapp
1b243581db Update '+ New Story' Button 2022-10-03 21:35:32 -07:00
Harry
74228f424e
Add StoryContextAssociatedData to compute story tab badge count without hidden stories
* 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
2022-10-03 21:16:01 -07:00
Nora Trapp
6930ffe2fa Remove old group capabilities 2022-09-29 09:35:00 -07:00
Harry
da06c1357c
Show my story privacy settings the first time you send to my story
* 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
2022-09-27 10:06:01 -07:00
Harry
c544e46ee1
Story fix bargain bin
* 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
2022-09-26 17:10:10 -07:00
Harry
f65493ae7c
Fix InteractiveBottomSheetController on old devices/iOS versions
* fix InteractiveBottomSheet controller

* Remove outside styled bottom sheet handle as per design request

* allow shrinking the bottom sheet after maximizing, as per design request

* tweak animation values per design request

* nits
2022-09-26 12:20:51 -07:00
Nora Trapp
96d8abac67 PR Feedback 2022-09-22 14:53:29 -07:00
Nora Trapp
c8dc629351 Show active group stories in the conversation picker 2022-09-22 14:53:29 -07:00
Igor Solomennikov
094fa0f30d
Allow attaching links to text stories with "Generate Link Previews" setting being OFF. 2022-09-21 14:55:49 -07:00
Harry
1710bf98d1
Fix iOS 16 UITextView sizing issue in OWSTableViewController2
* Fix iOS 16 UITextView sizing issue in OWSTableViewController2

* remove iOS 16 check, add iOS 17 canary check
2022-09-21 13:28:11 -07:00
Evan Hahn
02494b048a
Hide left groups from various pickers
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>
2022-09-20 14:36:36 +00:00
Harry
ae4837e600
Segment story videos longer than 30s
* 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
2022-09-16 15:29:44 -07:00
Evan Hahn
4d55d95869 Autofix SwiftLint whitespace issues
I recommend reviewing this with whitespace changes disabled.
2022-09-15 16:37:44 +00:00
Nora Trapp
ae6b55b1bf Hide some extraneous back button labels 2022-09-12 15:35:02 -07:00
Nora Trapp
ad34089ffe Sync group stories with storage service 2022-09-12 12:00:14 -07:00
Nora Trapp
da9f52c67d Update conversation split view styling 2022-09-12 10:48:28 -07:00
Nora Trapp
6dc57c6eb0 Don't allow sending stories to groups you are no longer a member of 2022-09-12 10:38:47 -07:00
Nora Trapp
86be80dbd7 Add story info sheet 2022-09-12 10:36:15 -07:00
Nora Trapp
9bd91f66b6 Allow turning off stories 2022-09-12 10:14:09 -07:00
Nora Trapp
95ddec00b5 Redesigned story privacy settings 2022-09-12 10:14:09 -07:00
Nora Trapp
de0ef9444b Fix some usage of NSLocalizedString 2022-09-11 10:36:23 -07:00
Nora Trapp
66c25a4afd Batch update identity keys and present safety number sheet on camera first and sharing flows 2022-09-08 09:42:43 -07:00
Nora Trapp
92d5207158 Batch lookup safety number changes when selecting conversations from conversation picker 2022-09-08 09:42:43 -07:00
Jordan Rose
3d312796e6
The in-app calling PiP should dodge the keyboard
- Dismissing the keyboard resets the PiP window to its original
  location, unless it's been moved since

- Tested against all of iPad's various keyboard modes (undocked /
  floating keyboards are ignored)
2022-09-07 15:41:23 -07:00
Evan Hahn
1fb1bb297a
Swiftify showUIForLaunchFailure
A pretty mechanical conversion.

There were a few weirder things that I called out in comments.
2022-09-07 14:42:01 -05:00
Nora Trapp
09598d2e7a Add remote flag for stories 2022-08-31 13:34:24 -07:00