Commit Graph

28763 Commits

Author SHA1 Message Date
Sasha Weiss
2cc4502fbf
Revert "Rotate call button icons when the phone is in landscape"
This reverts commit 54701df408.
2022-08-04 14:21:21 -07:00
Sasha Weiss
d1a455b1a2
Collapse join/cancel request events in the chat 2022-08-04 13:07:27 -07:00
Igor Solomennikov
26cfaf610c Fix last minute regression in ee2f39d3d1.
`setMode(animated:)` was calling `mode` setter which was calling `setMode(animated:)`
with `animated` being `false`.
2022-08-04 11:44:22 -07:00
Evan Hahn
adfda71472
Add remaining disappearing message time in detail view
This commit adds something new to the message detail view: the remaining
disappearing message time, if relevant.

For example, "Disappears: 6d 23h 58m 6s" (or something similar) will be
shown.

Builds off of 70eca7b99b and
846e802784.
2022-08-04 11:58:39 -05:00
Max Radermacher
df5437fb77
Remove "Linked Devices" item on linked devices
These aren't currently capable of modifying linked devices.
2022-08-04 08:39:59 -05:00
Nora Trapp
e844e0754a "Bump build to 5.50.0.1." (nightly-08-04-2022) 2022-08-04 04:00:45 -07:00
Igor Solomennikov
ee2f39d3d1
Fix an issue where buttons in text overlay toolbar could be too small.
The cause of this issue was that ImageEditorViewController's view was created
with zero dimensions. Those dimensions were then used to pre-calculate size
of the toolbar which ended up being incorrect.

The fix is to let UIKit create the root view and move everything we did in `loadView`
to `viewDidLoad`.
2022-08-03 17:59:53 -07:00
Igor Solomennikov
2a738fb459
Animate change in visibility of buttons at the top of in-app camera view.
When user starts video recording some buttons in the top part of the screen disappear and recording duration indicator appears. This commit adds simple fade-in/fade-out animation to those changes.
2022-08-03 16:50:56 -07:00
sashaweiss-signal
952df6ab44 "Bump build to 5.50.0.0." (nightly-08-03-2022) 2022-08-03 16:15:19 -07:00
sashaweiss-signal
e256819676 Update translations again 2022-08-03 16:09:51 -07:00
sashaweiss-signal
08705c318b Update translations 2022-08-03 15:52:53 -07:00
sashaweiss-signal
74139e672f Update release notes 2022-08-03 15:52:53 -07:00
Jordan Rose
54701df408 Rotate call button icons when the phone is in landscape 2022-08-03 15:22:32 -07:00
Jordan Rose
1fae99b7ff "Missed call while using Focus" / "while on Do Not Disturb"
If a ring is silenced because of Do Not Disturb, call that out
specifically.
2022-08-03 15:21:29 -07:00
Sasha Weiss
7cf14333ad
Prevent empty group updates from clobbering that a member joined via invite link
Group snapshots fetched from the service do not store the
`didJoinFromInviteLink` field on their members, and when we parse a
snapshot into a group model we hardcode this value to `false` for all
members. However, we store that field locally on a `GroupMembership`'s
`MemberStateMap` when processing an "add members" change action, as the
field is provided in the `AddMember` change action proto.

This becomes an issue, since when we refresh the group's state from the
service (which we do periodically, e.g. when opening a group for the
first time after launch) the `GroupMembership` from the group's snapshot
on the service will not match the `GroupMembership` we have locally,
even though they are from the same revision, due to mismatched
`didJoinFromInviteLink` values (hardcoded in the snapshot).
Consequently, we believed we were "updating the group model in a user-
facing way", but the only change therein was clobbering a
`didJoinFromInviteLink: true` to `...: false`, which was 1) wrong and
2) did not have a description to show.

This commit changes `GroupMembership` to ignore values for
`didJoinFromInviteLink` when comparing equality. This means that when we
parse a snapshot into a `TSGroupModel` with all those values hardcoded
to false, but otherwise identical to our local, we will no longer see it
as different from our local (and subsequently clobber our local and
generate an empty update).
2022-08-03 15:04:31 -05:00
Evan Hahn
70eca7b99b Use built-in date formatter when formatting lossless durations
Previously, `String#formatDurationLossless` rolled a custom formatter.
Now, it uses `DateComponentsFormatter`.

See also: the tests in `Signal/test/util/StringAdditionsTest.swift`,
which were untouched as part of this change.

I think this is a useful refactor anyway, but it should also fix rare
RTL bugs where duration components would be backwards. (I don't think
this ever happened under normal conditions, but it could happen if a
disappearing messages timer was set to something unusual like "1 day, 3
hours".)

I also plan to build off of this for an upcoming change, which is why
I did this now.
2022-08-03 14:51:39 -05:00
Evan Hahn
846e802784 Prefer String over NSString in Swift
This is a trivial change that should have no user impact.

`String.formatDurationLossless` calls `NSString.formatDurationLossless`,
so this is a no-op. I think it's slightly better to call a `String`
method from Swift than an `NSString` one.

I did this because it makes an upcoming change easier, but I think it's
useful on its own.
2022-08-03 12:54:12 -05:00
Sasha Weiss
ac05bfc690
Add the concept of a correlation ID to NSE logging 2022-08-03 10:33:15 -07:00
Nora Trapp
234c37ad15 "Bump build to 5.49.0.4." (nightly-08-03-2022) 2022-08-03 04:00:30 -07:00
Jordan Rose
094c8290ce Remove unnecessary NotificationCenter.removeObserver calls
As of iOS 9, selector-based observers in NotificationCenter do not
need to be explicitly unregistered.
2022-08-02 17:43:52 -07:00
Jordan Rose
4f06a6d8a5 Fix incorrect uses of NotificationCenter block-based API
The block-based API returns a token that needs to be explicitly
unregistered, *and* the block should not capture 'self' strongly.
The fixes in this PR come in three flavors:

1. Switch to the selector-based API, sometimes taking advantage of
   the fact that extra arguments to an Objective-C method can be
   safely discarded (because they are passed at +0).

2. Save the observer token and unregister in deinit.

3. Comment why it's safe to leave the observer registered forever
   in this particular case.
2022-08-02 17:43:52 -07:00
Igor Solomennikov
9bb5df31d4
Camera view controller refactoring.
Refactoring around media sharing flow classes.

• extract camera controls classes into a separate .swift file.
• extract a few SendMediaNavDelegate methods into SendMediaNavDataSource.
• use block-based method for handling UIDevice.orientationDidChangeNotification.
• prepare PhotoCaptureViewController to add support for text story composer.• remove unnecessary `public` declarations.
• other minor stylistic changes.
2022-08-02 17:16:04 -07:00
Evan Hahn
cef1d330cd Improve logging for donations
This adds logging in various places to (hopefully) make it easier for us
to diagnose future problems.
2022-08-02 18:19:40 -05:00
Sasha Weiss
698180fbb3
Index name components if available 2022-08-02 11:52:20 -07:00
Nora Trapp
6e2fcd00ac "Bump build to 5.49.0.3." (nightly-08-02-2022) 2022-08-02 04:00:39 -07:00
harry-signal
741c3961bd
Add audioPlaybackRate thread-level metadata to ThreadAssociatedData table 2022-08-01 15:34:40 -07:00
Evan Hahn
bd2b3c928e Move script out of SignalServiceKit
This change should have no direct user impact.

This is just a file move.

I think this is a useful change on its own, but it may be useful in
upcoming changes too (e.g., making SignalServiceKit not a pod).
2022-08-01 16:29:43 -05:00
Evan Hahn
e3fa7848e5 Upgrade libwebp to v1.2.3
This upgrades `libwebp` (a subdependency of `YYImage`) from v1.0.2 to its
latest version, v1.2.3.

As of this writing, the [libwebp pod does not have v1.2.3][0], so I
modified [the v1.2.1 podspec][1] and vendored it into the project. You
may wish to [compare the v1.2.1 podspec with my version][2]. In the long
term, I will try to get this change submitted upstream.

I tested this with a variety of stickers (usually sent as WebP), [WebP's
alpha test images][2], and [a test WebP image from the Desktop app][3].

[0]: 11f1b72927/Specs/1/9/2/libwebp
[1]: b04c376a0d/Specs/1/9/2/libwebp/1.2.1/libwebp.podspec.json
[2]: https://gist.github.com/EvanHahn-Signal/c87c301d2d7359df961bb85dd531a91c
[3]: https://developers.google.com/speed/webp/gallery2#webp_links
[4]: 412f07d2a2/fixtures/512x515-thumbs-up-lincoln.webp
2022-08-01 15:55:52 -05:00
Phil Larson
00466c7a18 Remove extra commas when running sds_codegen.sh 2022-08-01 15:47:24 -05:00
Nora Trapp
7a84d7605b Allow viewing your own sent stories 2022-08-01 12:44:31 -07:00
Nora Trapp
a4cd566b75 Add context menu and reloading to My Stories view 2022-08-01 12:44:31 -07:00
Evan Hahn
a45121f223 Update Pods 2022-08-01 12:01:48 -05:00
Evan Hahn
8e5009bbf7
Add simple test for TypingIndicatorMessage
This change should have no direct user impact.

This tests `TypingIndicatorMessage`'s `isOnline` getter.

I plan to add additional tests to this file in a future commit, but I
think this is a useful change on its own.
2022-08-01 11:44:16 -05:00
Evan Hahn
202ce3e6d3
Update to RingRTC v2.20.13
Co-authored-by: Jim Gustafson <jim@signal.org>
2022-08-01 08:45:27 -05:00
Max Radermacher
64fa5e5652 Add env var to connect to staging server 2022-08-01 08:09:47 -05:00
Nora Trapp
45a2d61089 "Bump build to 5.49.0.2." (nightly-07-30-2022) 2022-07-30 04:00:17 -07:00
Nora Trapp
7d1d133940 Dedupe when sending to multiple private story threads 2022-07-29 12:39:14 -07:00
Evan Hahn
088c3e5d85 Remove unused relay field from envelope proto 2022-07-29 11:35:55 -05:00
Max Radermacher
8d0f4c3535
Clean up old project settings
* Remove NEW_CV_ARCHITECTURE
* Remove unused search paths
2022-07-29 09:33:24 -07:00
Max Radermacher
f0f52ec0b0 Ignore packKey in isDefaultStickerPack
Sticker packs are uniquely identified by packId.
2022-07-29 08:37:55 -05:00
Nora Trapp
ae669976d5 "Bump build to 5.49.0.1." (nightly-07-29-2022) 2022-07-29 04:00:15 -07:00
Max Radermacher
03944b813d Remove tableViewStyle 2022-07-28 16:28:33 -07:00
Max Radermacher
6aee89fab1 Fix indentation in DefaultStickers 2022-07-28 13:29:03 -07:00
Evan Hahn
c988fdfee6 Convert OWSAnalyticsTests to Swift
This is a test-only change that shouldn't affect users.
2022-07-28 13:03:09 -05:00
Max Radermacher
2bec0dcc6f Fix Spanish App Store Connect language support
Use `es` for both `es-ES` and `es-MX`.
2022-07-28 09:43:50 -07:00
Evan Hahn
ecf53802fb "Bump build to 5.49.0.0." (nightly-07-28-2022) 2022-07-28 09:59:28 -05:00
Evan Hahn
bdf335720b Update translations 2022-07-28 08:17:20 -05:00
Max Radermacher
72d4736265 Remove iOS 11 disappearing contact workaround
We don’t support iOS 11, so this code is dead.
2022-07-28 08:05:50 -05:00
Nora Trapp
d9ff7bd6d9 "Bump build to 5.48.0.5." (nightly-07-28-2022) 2022-07-28 04:00:16 -07:00
Igor Solomennikov
cf003035a9
Animate transition from rounded image corners in Review to square in Draw tool. 2022-07-27 16:19:51 -07:00