Commit Graph

87 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
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
Michelle Linington
a36671c4c2 Lint 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
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
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
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
Dimitris Apostolou
62724cf0be Fix typos 2022-03-18 11:31:06 -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
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
Martin Böttcher
eedfd70f3e merged master and pod files 2022-03-15 12:49:11 +01: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
8f9be31ba3 replaced NSLocalizedStringFromAppBundle with OWSLocalizedString 2022-03-08 10:17:25 +01: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
Chris Eager
fa8e829115 Move CaptchaView to its own file 2022-03-04 15:41:21 -08:00
Igor Solomennikov
3d385c4419 Initial commit for redesigned in-app camera.
Work in progress:
• iPad support needs work
• navigation between screens isn't finished yet.
2022-03-02 17:56:39 -08:00
Igor Solomennikov
1c6fb5e822 Make SignalUI.PillView public.
Will need to subclass it for camera UI.
2022-03-02 17:56:39 -08:00
Igor Solomennikov
6dfd13530f Add CircleBlurView.
Round view that has blur (configurable) background.
2022-03-02 17:56:39 -08:00
Martin Böttcher
f670447fd9
removed some compiler warnings (#4027) 2022-03-02 09:26:58 +01:00
Martin Böttcher
c4f967ef46
removed checks testing for iOS12.0 or newer (#4030) 2022-02-25 17:39:12 +01:00
Igor Solomennikov
ea55469ec8 Remove deprecated UITextViewDelegate methods.
textView(_:shouldInteractWith:in:) were deprecated in iOS 10.

This change is purely deletion of code because newer UITextViewDelegate
methods:  textView(_:shouldInteractWith:in:interaction:) were already
implemented.
2022-01-31 15:15:18 -08:00
Igor Solomennikov
ec96c7a1c6 Do not use UIVC.topLayoutGuide and UIVC.bottomLayoutGuide.
Both are deprecated in iOS 12.
2022-01-31 15:15:18 -08:00
Nora Trapp
1358f78f81 Small change number design tweaks. 2022-01-20 10:26:34 -08:00
Jordan Rose
a678532380 Don't use promises in LoopingVideo
AVAsset is already lazily loaded; init(url:) is cheap.
2022-01-14 09:58:16 -08:00
Martin Böttcher
9ce447de57
refactored async loading of avatar images in HomeView (#3886)
* refactored async loading of avatar images in HomeView

* async loading avatars does not use extra DispatchWorkItems anymore

* minor code changes, added comments
2022-01-13 09:13:12 +01:00
Martin Böttcher
9b3c809bdf
made async avatar loading in homeview more robust (#3881)
* made async avatar loading in homeview more robust

* async loading of avatar images in the background should not interfere with foreground operations anymore

* corrected handling of loading avatars not triggered from the home view

* better separation between existing avatar load calls (sync and async) and new async-only call used in HomeViewCell. Should eliminate side-effects and improve performance.
2022-01-08 08:46:12 +01:00
Martin Böttcher
b498b6552c code cleanup 2022-01-05 10:18:34 +01:00
Martin Böttcher
858261ee61 async avatar loading will be performed in a serial queue because it uses much less memory 2022-01-04 09:54:50 +01:00
Martin Böttcher
923d8714d4 async avatar loading will only be excecuted from new method called in HomeViewCell 2021-12-28 11:17:57 +01:00
Martin Böttcher
925297509c made changes more thread safe 2021-12-28 10:30:06 +01:00
Martin Böttcher
f510d5ca13 removed unnecessary code 2021-12-27 13:17:51 +01:00
Martin Böttcher
267e5fb22a avatar loading using concurrent queue 2021-12-23 10:05:19 +01:00
Martin Böttcher
c5aab9116c changed async loading of avatar images: no races and faster 2021-12-23 09:21:02 +01:00
Martin Böttcher
09ed7d26f5 added placeholder image during async avatar loading 2021-12-22 10:18:05 +01:00