Commit Graph

28935 Commits

Author SHA1 Message Date
Max Radermacher
6e524f25ed "Bump build to 5.52.0.0." (nightly-08-25-2022) 2022-08-25 11:47:44 -07:00
Max Radermacher
895c1b7576 Update translations 2022-08-25 11:44:03 -07:00
Igor Solomennikov
0ff89c1e5e Update chat input box send icon with a larger version. 2022-08-25 11:35:19 -07:00
Max Radermacher
5449a4de9b Remove unused code from MockSSKEnvironment
As of 86b8eb08b8, the database initialization no longer has
asychronous components. The current code returns an already-resolved
promise in all situations, so remove the asynchronous infra entirely.
2022-08-25 09:53:08 -07:00
Evan Hahn
92ef1610fc Actually run OutgoingGroupUpdateMessageTest
I added these tests in da322d3bf9 but
didn't actually add them to the project! This adds them and runs them.
2022-08-25 11:14:49 -05:00
Evan Hahn
f997e5c7a4 Remove some tests that were never run
I added these tests in da322d3bf9, but we
decided that they're not worth it.

Also, it seems I forgot to add them to the project! So they were never
run anyway, outside of the times I ran them while developing.
2022-08-25 11:14:43 -05:00
Mihail Plesa
aeb4481e1e Hide "Approve New Members" if group link is disabled
_I recommend reviewing this with whitespace changes disabled._

This hides the "Approve New Members" section if the group link is
disabled, as it doesn't really make sense to include it.

See [#5319][0].

[0]: https://github.com/signalapp/Signal-iOS/pull/5319
2022-08-25 10:33:58 -05:00
Nora Trapp
2247824fe7 "Bump build to 5.51.0.9." (nightly-08-25-2022) 2022-08-25 04:00:44 -07:00
sashaweiss-signal
efc697af23 Re-order lines in test harness to avoid a race condition 2022-08-24 16:21:13 -07:00
Harry
63661ba4c8
Add feature flag for system onboarding story
* Add feature flag for system onboarding story

* switch to dev
2022-08-24 14:51:06 -07:00
Harry
33e26b6c4c
Migrate OWSSignalService from objc to swift, and split it into a protocol and implementation
* Split OWSSignalService into a swift protocol and implementation, migrated from objc

* Put OWSSignalService under SSKEnvironment and use mock in mock environment

* Rename from basename + impl to protocol + basename

* extend mock functionality a bit

* pr feedback
2022-08-24 14:36:52 -07:00
Max Radermacher
0f749fdb06 Update CDS MrEnclave
Tested lookups with a contact that exists and one that doesn’t.
2022-08-24 13:58:21 -07:00
Harry
2950667ac9
Split OWSURLSession into a protocol and implementation
* Split OWSURLSession into a protocol and implementation

* Add OWSURLSessionMock

* Rename from basename + impl to protocol + basename

* add simple init for mock session

* nits from pr comments

* pr comments 2
2022-08-24 13:33:27 -07:00
Max Radermacher
923b186c48 Remove redundant NewGroupState initialization
This view controller expects to be passed an instance that already
exists. The instanced created on this line is therefore created but
never read. Avoid creating it to save some CPU cycles.
2022-08-24 12:22:31 -07:00
Max Radermacher
91008dd29e Fix indentation in SDSKeyValueStore 2022-08-24 12:17:05 -07:00
Jordan Rose
556c6e3c96 CallHeader: Use a monospace-digit font for the call duration 2022-08-24 12:15:48 -07:00
Jordan Rose
2bb1f6c22a Move the "Your camera is off" indicator up to GroupCallViewController
...so it can be constrained to not overlap the call header or call
controls when in larger font sizes. Additionally, the new view uses a
smaller font, and a horizontal layout for the icon + label when on
small screens.
2022-08-24 12:15:48 -07:00
Jordan Rose
ecc48d7935 Remove dedicated "Call is Full" screen
With more information on the group call lobby screen, it doesn't make
sense to have the entire camera feed replaced with a "Call is Full"
message. Instead, disable the Join button as before, and show a toast
if the user taps on it anyway.
2022-08-24 12:15:48 -07:00
Jordan Rose
2350656282 Overhaul the group call header "title" and "status" text
Title: name of the group, unless someone is presenting

Status, when in a call:
- "Reconnecting",
- "Ringing Ahmed, Bianca, and N others",
- "No one else is here", or
- (call timer)

Status, before joining the call:
- "Akiko, Bharat, and N others are in the call",
- "Signal will ring Alex, Blue, and N others", or
- "Amy, Brian, and N others will be notified"
2022-08-24 12:15:48 -07:00
Jordan Rose
5b53856c6f CallHeader: Add the group avatar to the call lobby
And pave the way for multi-line status messages
2022-08-24 12:15:48 -07:00
Jordan Rose
db83791f07 CallHeader: Remove the HStack, use manual constraints instead
This allows hiding the members button when there is no one in the
call. It will also be useful for the redesigned lobby screen where the
info is in the middle of the screen instead of at the top.
2022-08-24 12:15:48 -07:00
Jordan Rose
4ca7796385 Call controls: allow the Join button to expand horizontally
While this text should still be kept terse, larger font sizes or other
languages can still end up wanting more horizontal space. The vertical
size is fixed so it doesn't mess up the layout, though.
2022-08-24 12:15:48 -07:00
Jordan Rose
825481f9e9 Call controls: Remove Cancel button from group call lobby
The back button works just as well. While here, also use the new join
button design (fully rounded).
2022-08-24 12:15:48 -07:00
Jordan Rose
0978c06bca Hide top and bottom gradients in call lobbies
The new design only has them when in the call.
2022-08-24 12:15:48 -07:00
Jordan Rose
50e8ef7ed8 Extract TSGroupThread.sortedGroupMembers(...) from FullTextSearcher
This will be used for deterministically listing group members in the
group call lobby, hence some customization that FullTextSearcher
doesn't need.
2022-08-24 12:15:48 -07:00
Evan Hahn
b3ac90d9fc Hide sticker button when opening chat with a draft quote
This fixes a bug that was [reported on the forums][0]. If you:

1. Open a chat.
2. Quote a message.
3. Go back to the chat list.
4. Open that chat again.

Previously, the sticker button would be shown. This is because the
`quotedReply` member wouldn't be set yet. This fixes that by
initializing `quotedReply` with the `ConversationInputToolbar`.

[0]: https://community.signalusers.org/t/beta-feedback-for-the-upcoming-ios-5-50-release/46594/4
2022-08-24 13:21:38 -05:00
Jordan Rose
bb7d5892d9
MediaGallery: Separate the loading logic into MediaGallerySections (take two)
Re-applies 4e37af097b and ecd0740c7d after further testing and cleanup.
2022-08-24 10:46:29 -07:00
Jordan Rose
eee8c5cd29 Never ring a group if we know there's already a call in progress 2022-08-24 10:16:45 -05:00
Nora Trapp
235bfe9a48 "Bump build to 5.51.0.8." (nightly-08-24-2022) 2022-08-24 04:00:40 -07:00
Sasha Weiss
36eb0be145
Make CVComponentDelegate not an @objc protocol anymore 2022-08-23 22:50:27 -07:00
Sasha Weiss
fb11013859
Rename CVBodyTextLabel to CVTextLabel 2022-08-23 22:00:47 -07:00
Sasha Weiss
299e3869a6
DRY out showing the MemberActionSheet in ConversationViewController 2022-08-23 21:07:12 -07:00
Sasha Weiss
86d5999bf7
Remove duplicate call to animate in label 2022-08-23 21:05:13 -07:00
Igor Solomennikov
91fee94b4c
Improve GradientView slightly and re-use it in TextAttachmentView. 2022-08-23 18:19:22 -07:00
Igor Solomennikov
37c0447a6e
Update to allow re-use of code related to text overlays in photo editor.
• rename VAlignTextView to MediaTextView.
• rename ImageEditorPaletteView to ColorPickerBarView.
• move text style declarations from ImageEditorTextItem to MediaTextView because
  those would no longer be specific to image editor.
• extract TextToolbar from ImageEditorViewController to a standalone public class
  that is supposed to work in conjunction with MediaTextView.
2022-08-23 17:30:20 -07:00
Jordan Rose
2ffeec159a Temporarily disable NSE->app handoff of "urgent" opaque CallMessages
Until the main app actually handles these (they are
group-call-ring-related), iOS will think we're trying to abuse the
handoff mechanism to perform non-calling work, and start throttling
relayed messages. Just disable that for now, to be re-enabled soon.
2022-08-23 14:43:11 -07:00
george-signal
87533d2b67
Improve phone number parsing.
* Improve phone number parsing.

Previously, if you entered a phone number
including a country code during registration you'd
have a duplicate country code. Signal on Android
did not have this bug because it uses a different
API inlibphonenumber. This diff changes iPhone to
use the same API, which is smart enough to remove
the country code from the phone number the user
entered if needed.

Co-authored-by: Evan Hahn <evanhahn@signal.org>
2022-08-23 11:56:06 -07:00
Jordan Rose
41b381b1b1 When starting a call, attemptRotationToDeviceOrientation()
Speculative fix for a hard-to-reproduce issue where the call view ends
up laid out in landscape and then clipped to portrait, rather than
being forced to portrait in the first place.

Possibly fallout from 856ced4062, which replaced an explicit call to
our UIDevice.ows_setOrientation(). We don't want to revert to that
because it messes up legitimate orientation detection.
2022-08-23 10:45:27 -07:00
Jordan Rose
11cf13a255 Avoid intermediate copies when using dictionary keys as collections
The non-lazy map and filter always make a new array or dictionary,
which is often consumed immediately into a Set. Using `lazy` avoids
that intermediate allocation, as well as the need to loop over the
array or dictionary a second time.

This is a micro-optimization, but several of these accessors are
accessed fairly frequently, so we might as well make them faster.
2022-08-23 10:42:11 -07:00
Nora Trapp
66e1811c2c "Bump build to 5.51.0.7." (nightly-08-23-2022) 2022-08-23 04:01:19 -07:00
Max Radermacher
4e4b9ec9fd Remove unused code for creating a new group
All call sites use the `avatarData` parameter, not `avatarImage`.
2022-08-22 17:19:50 -07:00
Adam Mork
aac2f37150
[Payments] Update the MobileCoin dependency to the latest 1.2.2 release
* update MobileCoin to release v1.2.x, add new 1.2.x testNet enclave
values, migrate deprecated function calls to new alternatives.

* Add new top-level error to convertMCError

use staging for now

* Add mainnet enclave values, revert production/staging environment change from testing. Add comment about libmobilecoin static libraries needing to be built on signal build machine.

* add 2.x series enclave measurements

* Add intel hardening advisory for the new 2.x series of enclaves. This hardening advisory being added has no effect on the 1.2.x enclaves, but is required for the 2.x enclaves.

* Remove commented enclave measurements, change Logger.error to Logger.warn (some failed requests is expected for long-living connections), Add in new testNet enclave measurements

* Update to LibMobileCoin v1.2.2

Co-authored-by: Nora Trapp <nora@signal.org>
2022-08-22 13:08:40 -07:00
Nora Trapp
23ff1c17e4 Further AttachmentMultisend cleanup 2022-08-22 11:23:03 -07:00
Max Radermacher
f1a92f004c Remove references to SignalServiceKit (the pod) 2022-08-22 09:18:55 -07:00
Max Radermacher
72ec060180 Use project’s iOS deployment target for tests
Before this change:
- SignalTests -> project deployment target
- SignalPerformanceTests -> project deployment target
- SignalUITests -> overridden to iOS 15.0
- SignalServiceKitTests -> overridden to iOS 15.5

After this change, all four use the project’s deployment target.
2022-08-22 09:16:18 -07:00
Max Radermacher
686f99f039 Fix ContactDiscoveryOperationTest
Make `encodeE164s` a static method since it doesn’t need to access any
details from the operation instance.

Also move the test to SignalServiceKitTests.
2022-08-22 09:11:42 -07:00
Igor Solomennikov
c8d1526bf8 Hide CAMERA | TEXT while recording video. 2022-08-22 07:45:00 -07:00
Nora Trapp
36b5e31744 "Bump build to 5.51.0.6." (nightly-08-22-2022) 2022-08-22 04:00:32 -07:00
Evan Hahn
4a5ee31567 Remove unused application state change notification
This change should have no obvious user impact.

When the application's state changes, we fire off a notification. But
we don't actually listen to that notification, as far as I can tell—it
looks like the last listener was removed in 2019 (in
680b844f3c).

This removes that notification.

`git grep -i ReportedApplicationStateDidChange` yields no results after
this change.
2022-08-21 18:17:46 -05:00
Nora Trapp
30cd34704d "Bump build to 5.51.0.5." (nightly-08-20-2022) 2022-08-20 15:01:12 -07:00