Commit Graph

102 Commits

Author SHA1 Message Date
Igor Solomennikov
2fd17eda12 Animate controls on the crop screens in and out.
This change also fixes a bug when bottom buttons in the crop screen
were not visible. That happened because ImageEditorBottomBar by default
had its controls hidden (with the intent that they are animated in once
view controller's view is visible). That was a poor design choice on my
end and is fixed in this commit.
2022-07-07 08:37:34 -07:00
Igor Solomennikov
7f4a5f3f7b Merge branch igor/media-editor-updates. 2022-07-06 14:54:26 -07:00
Evan Hahn
d0c7de494a Computed accessors shold always be in the same order
`get`, then `set`. This fixes violations of [SwiftLint's
`computed_accessors_order` rule][0].

A very mechanical change.

[0]: https://realm.github.io/SwiftLint/computed_accessors_order.html
2022-06-24 09:35:07 -07:00
Evan Hahn
76c8d66702 Use "done" button on gift badge message keyboard
Goodbye "return", hello "done".

Clicking "done" will dismiss the keyboard.
2022-06-23 17:09:57 +00:00
Sasha Weiss (Signal)
2f4ded9d03
Fix reentrant DB read on mentions processing 2022-06-20 13:21:22 -07:00
Nora Trapp
7bd167f815
Initial story sending support
* Little fix for context menu

* Add 'My Stories' section to stories tab

* Add new story thread types

* Show stories in conversation picker

* Support for sending stories

* Update story list when sending stories

* Add basic 'My Stories' view controller

* Initial stories settings screens

* Consolidate TSPrivateStoryThread and TSMyStoryThread into one class

* Require an explicit read transaction to initialize an outgoing message

* Fix linting

* Allow enabling group story from internal settings

* Fix tests

* PR Feedback
2022-06-10 22:28:03 -04:00
Nora Trapp
a106ecdfdd Fix RTL layout of video playback progress bar 2022-06-08 16:58:56 -04:00
Evan Hahn
41c4be6b71 Remove useless override
This override stopped being relevant in
c4f967ef46, as far as I can tell.
2022-06-06 14:45:54 +00:00
Evan Hahn
c2e7f0ca93 Prefer implicit getters
_I recommend reviewing this with whitespace changes disabled._

This fixes violations of [SwiftLint's `implicit_getter` rule][0] by
removing explicit getters when an implicit one would do.

[0]: https://realm.github.io/SwiftLint/implicit_getter.html
2022-06-06 14:00:15 +00:00
Evan Hahn
24ca5abf9c Remove unneeded breaks
This fixes our violations of [the SwiftLint `unneeded_break_in_switch`
rule][0].

[0]: https://realm.github.io/SwiftLint/unneeded_break_in_switch.html
2022-06-03 17:52:28 +00:00
Evan Hahn
0cee2789b9 Update "pending changes action sheet" localization metadata
_I recommend reviewing this with whitespace changes disabled._

This is a minor change; it have no direct user impact.

We have a "pending changes action sheet" which shows up to warn users
that their changes may not be saved. The localization key and comment
indicated that its strings were only for groups, but that's not
true—it's used for lots of things, such as editing your profile or
updating a group's metadata.
2022-05-27 21:54:42 +00:00
Igor Solomennikov
8b3ea9d27d Fix typo: "Gausian" -> "Gaussian". 2022-05-17 19:25:30 -07:00
Evan Hahn
29c0ddf60e Fix violations of SwiftLint's attributes rule
_I recommend reviewing this with whitespace changes disabled._

Most of these were `@objc` being on the same line, which I fixed with [a
silly script][1]—probably could've used `sed` if I were wiser. The rest
were manual fixes.

See [the SwiftLint documentation for this rule][0].

[0]: https://realm.github.io/SwiftLint/attributes.html
[1]: https://gist.github.com/EvanHahn-Signal/d353c93fa269c82b96baca0a1086521f
2022-05-14 09:07:42 -05:00
Evan Hahn
5be42da750 Change references from master to main
_I recommend reviewing this with whitespace changes disabled._

Signal has renamed its primary branch to `main`. This updates references
to the old name, `master`, to either reference `main` or a specific
commit hash.

I also fixed a couple of small whitespace issues in a file I was
editing.
2022-05-02 10:30:40 -05:00
Nora Trapp
1443eef293 Animate presentation and dismissal of stories with interactive dismissal 2022-04-21 11:00:12 -07:00
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