Commit Graph

179 Commits

Author SHA1 Message Date
Igor Solomennikov
1f3ceac66c Fix GradientView not working in some cases.
GradientView would not work if its colors were passed during initialization
and never changed after. This was caused by the fact that `CAGradientLayer`'s
colors were updated in `GradientView.colors.didSet`, which isn't
called during `init()`.

Also allow access to `GradientView.gradientLayer` so that users of
that class can build more advanced gradients.
2022-04-20 10:23:50 -07:00
Evan Hahn
67ea0d0516 Fix some trivial compiler warnings
This fixes 10 of our Xcode warnings:

- `MessageReactionPicker.swift` was declaring a variable and not using
  it, leading to "Immutable value 'emoji' was never used". I simply
  removed it.
- `Stripe.swift` had a bunch of unnecessary `public`s, which caused
  "'public' modifier is redundant for static property declared in a
  public extension".
- `SubscriptionManager.swift` had an unnecessary `try`, causing "No
  calls to throwing functions occur within 'try' expression".
- `CallService.swift:696` was calling a function and not using its
  result, so I annotated that function with `@discardableResult`.
- `MobileCoinAPI+Configuration.swift` declared a variable with `var`
  that should've used `let`.

Nothing major here, but wanted to find ones that were easy to fix.
2022-04-19 09:28:15 -05:00
Nora Trapp
27e03b6a70 Render 1:1 story replies 2022-04-15 19:28:14 -07:00
Michelle Linington
37fe097812 Lint 2022-04-13 20:23:22 -07:00
Michelle Linington
d54d654cfc PR Feedback: Remove notImplemented altogether 2022-04-13 20:21:47 -07:00
Michelle Linington
6b2f8d31d6 Lint 2022-04-13 20:21:46 -07:00
Michelle Linington
cca09295e6 Adopt notImplemented() where it's unadopted
notImplemented() ends up forwarding to fatalError() anyway, but before
it does so it flushes our logs. That's probably good to have. I think
most of these come from the default implementations Xcode provides for
you with a fix-it.
2022-04-13 20:21:46 -07:00
Igor Solomennikov
2128a2f7f2 Lint. 2022-04-12 17:38:21 -07:00
Igor Solomennikov
e7e218743d Use OWSFormat.localizedDurationString(from:) whenever a duration is displayed in the UI. 2022-04-12 17:38:21 -07:00
Igor Solomennikov
527e352258 Require secure coding when archiving data with NSKeyedArchiver.
Per PR feedback.
2022-04-12 13:24:57 -07:00
Igor Solomennikov
e946ab932a Stop using deprecated NSKeyedArchiver methods.
• use NSKeyedArchiver.archivedData(withRootObject:requiringSecureCoding:)
  instead of NSKeyedArchiver.archivedData(withRootObject).
• use NSKeyedArchived.unarchivedObject(ofClass:from:) instead of
  NSKeyedArchiver.unarchiveTopLevelObjectWithData().
2022-04-12 13:24:57 -07:00
Evan Hahn
8b072620a6 Add "Donation Receipts" view 2022-04-11 16:21:12 -05:00
Michelle Linington
a36671c4c2 Lint 2022-04-08 19:01:43 -07:00
Michelle Linington
dd0a7f6b80 Require transaction to check blocked address state 2022-04-08 19:01:43 -07:00
Michelle Linington
739af9372a Require transaction to check blocked thread state 2022-04-08 19:01:43 -07:00
Michelle Linington
bd12d4d819 Drop blockingManager forwards in ContactsViewHelper 2022-04-08 19:01:43 -07:00
Evan Hahn
f84c578420 UIView's renderAsImage always returns an image
We extend `UIView` with a new method, `renderAsImage`. It always returns a `UIImage`, but we marked its return type as `UIImage?`.

This removes that optionality and updates all callers.
2022-04-05 13:32:29 -05:00
Nora Trapp
7837ab0512 Pause story playback when a link preview is tapped 2022-03-31 00:40:47 -07:00
Nora Trapp
78eb06a812 Update story list sorting to match spec 2022-03-31 00:40:47 -07:00
Nora Trapp
03bdb55e21 Add context menu to group replies 2022-03-31 00:36:20 -07:00
Nora Trapp
b1dc925e48 Add context menu to StoriesViewController 2022-03-31 00:36:20 -07:00
Nora Trapp
9494498d70 Add support for sending group replies to stories 2022-03-31 00:34:32 -07:00
Nora Trapp
6085b8e579 Initial rendering of group replies 2022-03-31 00:34:32 -07:00
Michelle Linington
0a44bf02d8 Merge branch 'release/5.34.0' 2022-03-30 16:37:53 -07:00
Michelle Linington
d8b0f53eae Merge branch 'release/5.33.2' into release/5.34.0 2022-03-30 16:35:24 -07:00
Jordan Rose
72bdb33b05 Set CVBodyTextLabel's contentMode to redraw on bounds changes
This is a quick workaround for a behavior change in iOS 15.4 that's
causing CVBodyTextLabel to draw stretched or truncated text due to
cell reuse---the text is drawn in the cell's old size (which may be
insufficient, truncating the text), then the size changes and the
content that *is* drawn is potentially stretched.

Credit to Martin for finding this; I just profiled it to make sure it
wasn't going to be prohibitive.
2022-03-30 16:31:30 -07:00
Igor Solomennikov
95d6a96824 Update checkmark in chat picker from media sharing flow to match other views.
ConversationPicker shared checkmark asset with media editor toolbar. The
checkmark was a little bit too small, also checked and unchecked indicators
had different size.

This commit updates ConversationPicker to use the same checkmark styling
that group UI has.
2022-03-29 10:12:29 -07:00
Martin Böttcher
462177a0ce
improve cold start app start times (#4079)
deferred some initial load for faster app start
2022-03-29 08:24:55 +02:00
Jordan Rose
c027faab7d Report HTTP status code when web sockets fail to connect
Necessary to detect when a device has been unlinked or unregistered.
2022-03-28 15:25:37 -07:00
Igor Solomennikov
d9acd69963 [MediaEditor] Fix typo that caused broken layout when in landscape mode. 2022-03-22 14:24:13 -07:00
Igor Solomennikov
007415832e Disable Send/Proceed button if no chats are selected. 2022-03-22 10:56:46 -07:00
Dimitris Apostolou
62724cf0be Fix typos 2022-03-18 11:31:06 -07:00
Nora Trapp
d87fa8c16c Add new fonts for text stories 2022-03-17 14:30:19 -07:00
Nora Trapp
0e66da0e67 Integrate design feedback 2022-03-17 14:29:44 -07:00
Martin Böttcher
000c4c282b Merge branch 'master' into martin/IOS-2234 2022-03-17 09:09:37 +01:00
Nora Trapp
6810c76062 Switch StoryFinder to SDSAny transactions 2022-03-16 17:54:40 -07:00
Nora Trapp
a656c91fcf Store the timestamp when a story was viewed 2022-03-16 17:53:28 -07:00
Nora Trapp
06dd88fbbc Add initial StoryPageViewController 2022-03-16 17:52:44 -07:00
Nora Trapp
52a3182f13 Render story rings on avatars 2022-03-16 17:52:43 -07:00
Nora Trapp
99350fb38c Rename HomeViewController to ChatListViewController 2022-03-16 17:51:51 -07:00
Martin Böttcher
eedfd70f3e merged master and pod files 2022-03-15 12:49:11 +01:00
Michelle Linington
1944aa8b5f Merge branch 'release/5.32.0' 2022-03-14 13:05:01 -07:00
the-real-adammork
50b6fad302 Update Promise chain in HttpRequester to fix 403 looping
Promise chain in the HttpRequester did not handle connection errors
correctly. It was mapping all errors in the catch block to "No response"
or the equivalent of "request failed and it does not have a status code"
whereas in reality the errors in that catch block did have a status code
and should be passed into the completion handler for re-attestation or
similar. Fix checks for a valid status code from the error object in the
catch block and if present passes it to the completion handler as a
.success, otherwise, return a connection error sans the statusCode.
2022-03-14 13:00:18 -07:00
Jordan Rose
a9b9f58d0e Update clang-format with AllowShortEnumsOnASingleLine: false
And apply it to our sources.
2022-03-14 11:20:20 -07:00
Martin Böttcher
c2d93547ae minor changes due to changed name of NSLocalizedStringFromAppBundle (now OWSLocalizedString) and new location of swift function and preprocessor definition 2022-03-11 14:08:26 +01:00
Martin Böttcher
8f9be31ba3 replaced NSLocalizedStringFromAppBundle with OWSLocalizedString 2022-03-08 10:17:25 +01:00
Nora Trapp
964d2fdffa Fix forwarding of messages with mentions 2022-03-08 00:00:43 -08:00
Martin Böttcher
c0adfbfb32 NSLocalizedString is replaced by NSLocalizedStringFromAppBundle (reading strings from the bundle of the main app) for all source files called by an app extension and the localizable files are removed for the app extension targets. 2022-03-07 13:29:06 +01:00
Chris Eager
d92eaf97d5 lint fixes 2022-03-04 15:41:21 -08:00
Chris Eager
ace538f568 Move URL to property of enum 2022-03-04 15:41:21 -08:00