Commit Graph

29437 Commits

Author SHA1 Message Date
Nora Trapp
6f4eaca204 "Bump build to 5.59.0.1." (nightly-10-14-2022) 2022-10-14 04:00:31 -07:00
Harry
a591654104
Story viewer reliability improvements
* Pause animated image stories like video stories

* calculated YYAnimatedImage duration for story viewer length calculations

* fix play/pause and getting stuck when swiping between story contexts

* Allow pausing story contexts before the media view gets created

* update caption truncation when reusing story media view
2022-10-13 17:23:21 -07:00
Harry
1e066e24da
Update tab bar icon to a centered one 2022-10-13 17:44:30 -05:00
Evan Hahn
864b2d1b3d
Fix file header template (and a violation)
Files are supposed to start with a line like this:

    // Copyright 20XX Signal Messenger, LLC

However, the IDE template macro looked like this:

    // Copyright (c) 20XX Signal Messenger, LLC

That caused our linter at `Scripts/lint/lint-license-headers` to
complain. This fixes that, and a violation of it.

I introduced this recently in 370ff654e7.
2022-10-13 15:28:18 -07:00
Max Radermacher
a78b34e270 Sync push tokens only when fully registered
If you register on another phone, `isRegistered` will remain true, but
`isRegisteredAndReady` won’t. Since we can’t upload push tokens unless
we’re fully registered, use the latter check instead of the former.
2022-10-13 14:36:25 -07:00
sashaweiss-signal
b021881ce8 "Bump build to 5.59.0.0." (nightly-10-13-2022) 2022-10-13 12:33:03 -07:00
sashaweiss-signal
35bc42d159 Update translations 2022-10-13 12:32:27 -07:00
sashaweiss-signal
dd4e45f053 Update release notes 2022-10-13 12:29:09 -07:00
Harry
9038752a33
Quick stories fixes
* Set did appear on story context VCs when transitioning between them so their stories are marked viewed

* always apply tab bar theme update
2022-10-13 11:55:06 -07:00
Evan Hahn
b459e22026 Improve "dim when highlighted" logic for OWSButtons
This dims the button:

    let button = OWSButton()
    button.dimsWhenHighlighted = true
    button.isHighlighted = true

This did not, and I think it should (last 2 lines are switched):

    let button = OWSButton()
    button.isHighlighted = true
    button.dimsWhenHighlighted = true

This also removes an unnecessary `@objc` annotation.

I think this is a useful change on its own but I expect it to make an
upcoming change easier, too.
2022-10-13 12:45:02 -05:00
Evan Hahn
d0d33f6d39
Reorganize donation files
_This change should have no user impact._

- `SubscriptionReadMoreSheet` is now
  `DonationReadMoreSheetViewController`, because it's not just shown on
  subscriber screens
- Moved some files out of `AppSettings/` because you can reach them in
  other ways, not just app settings

I think this is a useful change on its own but I expect it to make an
upcoming change easier, too.
2022-10-13 11:54:22 -05:00
Harry
4a955ade9d
Various fixes related to enabling/disabling stories
* Don't donate share intests for outgoing story group replies

* Properly hide tab bar when using reduced transparency setting
2022-10-13 08:33:13 -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
Nora Trapp
e12f696bea "Bump build to 5.58.0.6." (nightly-10-13-2022) 2022-10-13 04:00:29 -07:00
Igor Solomennikov
bb9d0edabb
Update text color adjustment behavior in photo editor and text story creation.
• text story composer now has three options: colored text with no background,
colored text on white background, white text on colored background.
• text/background color is switched to black if user chooses background/text
color close to white, to avoid white on white look.
• photo editor has three options from above + white text with colored underline.
2022-10-12 23:19:07 -07:00
Harry
d12800be5b
Key my stories sections by thread unique id instead of whole thread object
* Key my stories sections by thread unique id instead of whole thread object

* pr feedback
2022-10-12 21:50:55 -07:00
Harry
4fb843a805
Fix unretained story row cell in share button callback 2022-10-12 21:42:00 -07:00
Jordan Rose
aeecb19d2a Report group calls to CallKit like we do 1:1 calls 2022-10-12 16:54:17 -07:00
Jordan Rose
687779e80f Fold OutboundIndividualCallInitiator into CallService
We don't need a separate dedicated singleton for initiating calls. And
as part of this, there's no reason why only individual calls should be
supported; group calls can be "initiated" by opening their lobbies.
This will be useful when we put group calls in the iOS call log, but
also simplifies existing code in the conversation header.
2022-10-12 16:54:17 -07:00
Jordan Rose
6619771686 Move "reported to system" tracking up to SignalCall
In preparation for reporting group calls to CallKit as well.
2022-10-12 16:54:17 -07:00
Jordan Rose
82c21556f1 CallAudioService: traffic in SignalCall rather than IndividualCall
While most of these helper functions only apply to individual calls,
we don't really need to encode that in the type system, and by
switching to SignalCall we make it easier to share logic for group
calls (see later commits).
2022-10-12 15:22:58 -07:00
Jordan Rose
c0b6d35d23 CallAudioService: don't use 'public' to get the effect of '@objc' 2022-10-12 15:22:58 -07:00
Harry Sanabria
f0cb7bc558 Fix crash from reloading of existing story cell when inserting new cell above it 2022-10-12 13:18:04 -07:00
Harry
62553c9f51
Fix inconsistent table view updates when hiding a story for the first time 2022-10-12 12:41:00 -07:00
Jordan Rose
89bd4e2739 Don't autorotate icons in group calls
We don't rotate the incoming videos, which is expected for 1:1 calls
but starts looking weird in group calls. Best not to support any kind
of rotation (on a phone) until we can do something more complete.
2022-10-12 11:34:28 -07:00
Max Radermacher
9953f99784 Remove unused donation code 2022-10-12 11:30:39 -07:00
Nora Trapp
33f6d47795 Fix dismiss animation on iPhone SE 2022-10-12 11:25:28 -07:00
Nora Trapp
53f6561543 Enable the stories capability for all linked devices 2022-10-12 11:24:51 -07:00
Sasha Weiss
5adae8a0b7
Copy port when constructing a URL 2022-10-12 11:16:35 -07:00
Max Radermacher
56bfcf3d72
Remove redundant fetches during gv2 migration
The `attemptToMigrateByCreatingOnService` method has a single caller,
and that caller also calls `tryToPrepareMembersForMigration` first. The
former is called when `migrationMode`’s `canMigrateToService` is true,
and the latter does a CDS lookup & profile key fetches if
`migrationMode`’s `isOnlyUpdatingIfAlreadyMigrated` is false; these two
conditions are true in the same situations. As a result, these CDS
lookups and profile key fetches aren’t necessary.

(This also removes an extra `firstly` block. I’d recommend ignoring
whitespace while reviewing the change.)
2022-10-12 10:17:26 -07:00
Max Radermacher
38a7c677a1 Remove censorship circumvention from debug ui
In 33d3f35d18, the switch in the real UI
was enabled for internal builds, so there’s no need to use a custom flow
to enable/disable this via the Debug UI.
2022-10-12 10:15:18 -07:00
Igor Solomennikov
e1ed6cae08
Fix incorrect layout of bottom bar when editing text story without on-screen keyboard. 2022-10-12 10:10:45 -07: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
823e41496a
Fix group story unread count lookup
* Fix group story unread count lookup

* Use IS instead of = and IS NOT instead of !=
2022-10-12 09:58:21 -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
Bedir
31f1501dd0 Mention beta feedback forum in bug report info
See [#5447][0].

[5447]: https://github.com/signalapp/Signal-iOS/pull/5447
2022-10-12 09:02:23 -05:00
Igor Solomennikov
d4d68e266a
Fix crash with empty WHERE in SQL query 2022-10-12 08:57:06 -05:00
Nora Trapp
1189b563ca "Bump build to 5.58.0.5." (nightly-10-12-2022) 2022-10-12 04:00:22 -07:00
Igor Solomennikov
f8a0066284
Better layout for text story composer on iPad.
• Constrain text styling toolbar width to the width of the story card.

• Align Add Link and Background buttons with the leading edge of text story card.
2022-10-11 22:32:13 -07:00
Igor Solomennikov
1482799166
Add support for floating keyboard on iPad in text story composer.
Floating keyboard should not reduce amount of space available for text entry
in the story card.
2022-10-11 22:30:50 -07:00
Igor Solomennikov
f858957b23
Use PHAssetCollection.estimatedAssetCount to speed up photo picker.
PhotoLibrary was loading the entire contents of all asset collections just to
check if a collection was empty or not. For some reason that became extremely
slow on iOS 16.

The fix is to use `estimatedAssetCount` property on `PHAssetCollection` instead.
2022-10-11 22:30:02 -07:00
Max Radermacher
d1819186f1
Remove unnecessary tryToEnableGroupsV2 call
The only place we call this in production code ensures that all members
already support gv2. As a result, there’s no reason to try and enable
gv2 -- it’s already enabled by the time we reach this code.

There are a few places in the Debug UI that may be relying on these CDS
lookups. I’ve removed one of them since there are existing “clone as v1”
and “clone as v2” options that do nearly the same thing. In another
case, I’ve dropped a reference to a live, non-test account. The other
places in the Debug UI that use this method either construct invalid
phone numbers that will never pass a CDS lookup, or they explicitly
provide UUIDs, which would exclude them from performing a lookup.
2022-10-11 17:46:52 -07:00
Max Radermacher
3ffa2dca2c
Fix nullability for countryNameFromCountryCode 2022-10-11 17:30:58 -07:00
Max Radermacher
815b3c2e1d Simplify CommonGenerator.e164() 2022-10-11 16:25:19 -07:00
Nora Trapp
4b208cea8d Fix sending of mentions in story replies 2022-10-11 14:42:24 -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
Nora Trapp
0db2f93981 Show story send failures on tab badge 2022-10-11 13:09:51 -07:00
Nora Trapp
966f65343f Allow story name label to wrap to two lines 2022-10-11 13:09:51 -07:00
Nora Trapp
8862d30e37 Fix keyboard dismissal when sending or receiving group story replies 2022-10-11 13:09:51 -07:00
Nora Trapp
6fe58c1714 Fix alignment of story reply send/reaction buttons 2022-10-11 13:09:51 -07:00