Commit Graph

37 Commits

Author SHA1 Message Date
Igor Solomennikov
ce0d3ba940
Media viewer animation improvements
* Improve status bar style update animation when dismissing media viewer.
* Use gesture velocity in the media dismissal spring-based animation.
2023-02-28 16:42:47 -08:00
Igor Solomennikov
1dbea3f3ed
Properly animate corner radius when opening/dismissing media in chat.
Since it's not possible to set different radius for different corners of a CALayer I had to use a masking layer instead.
Assignment of CALayer.mask cannot be animated so I had to animate path of CSShapeLayer that serves as a mask layer. CAShapeLayer.path isn't implicitly animatable and workaround for that is copying bounds.size animation and attaching that to the masking layer.
2023-02-28 16:40:05 -08:00
Sasha Weiss
1126c98f19
"Select a username" UX 2023-01-26 11:38:21 -08:00
Igor Solomennikov
6ac2646306
Clean up and consolidate logic for setting textContainerInset in MentionTextView.
Also fix logic for calculation of top and bottom text container insets for
smaller fonts.
2022-12-16 15:48:28 -08:00
Igor Solomennikov
5a45bf31a9
Improved text size calculation logic in chat input toolbar.
Fixes an issue where text input field was one line taller than necessary.
2022-12-06 15:49:57 -08:00
Igor Solomennikov
8dfe095571
Animate input box height changes in the media flow. 2022-12-06 15:44:36 -08:00
Max Radermacher
3a2b5a37bf Fix SwiftLint violations 2022-11-29 14:47:23 -08:00
Evan Hahn
0e79b75029
Add icon to "donate with credit/debit card" button 2022-11-22 12:25:18 -06:00
Igor Solomennikov
d57e0d35b8
Update "Send" button icon to up arrow in all places. 2022-11-16 16:32:34 -08:00
Igor Solomennikov
11d1807e35
More updates to chat input bar.
* Updates to "sticker" button in chat input bar.

• switch button to "keyboard" when sticker keyboard is active.
• add spring animations to sticker/keyboard buttons.
• clean up animation code: use one UIViewPropertyAnimator for all animations
  happening in chat bar at once.

* Ensure correct "pressed state" appearance for buttons in chat bar.
2022-11-14 13:33:37 -08:00
Igor Solomennikov
03e01b4c7f
Updated animation for + attachment button in chat input panel. 2022-11-10 23:09:26 -08:00
Max Radermacher
9439cc5191
Clean up recipient picker contact/group cells
- Move recipient picker code to the correct file.

- Add a helper to fetch typed reusable table view cells.

- Only set shouldUseAsyncSelection in the one place that uses it.

- Remove some code that was duplicated between sync/async selection.

- Fix some strong references in the async preparation flow.

- Allow network errors when preparing recipients -- these may do network
  fetches, and those can fail for non-interesting reasons.

- Move FindByPhoneNumberDelegate to Swift & make some code private.
2022-11-07 13:02:45 -08:00
Harry
520faa95df
Refactor OWSNavigationController
* make shouldCancelNavigationBack a var

* rename OWSNavigationView->OWSNavigationChildController

* forward delegate calls to OWSNavigationController

* apply theme and style to OWSNavigationBar consistently

fix themeing on gif picker controller

* Use topPinned navbar position. Size the blur effect view using the background view

* Use fade animation when hiding the navigation bar

* fix issues with reduced transparency setting

* pr feedback
2022-11-03 16:40:47 -07:00
Igor Solomennikov
9000a5cbb9
Add support for appropriate fonts for different scripts in Text Story composer / viewer. 2022-11-01 16:16:12 -07:00
Max Radermacher
3aa95a999a
Update SignalCoreKit 2022-10-24 23:28:33 -07:00
Evan Hahn
370ff654e7
Change license to AGPL
Change license to AGPL

This commit:

- Updates the `LICENSE` file

- Start every file with something like:

      // Copyright YEAR_FIRST_PUBLISHED Signal Messenger, LLC
      // SPDX-License-Identifier: AGPL-3.0-only

---

First, I removed existing license headers with this Ruby 3.1.2 script:

    require 'set'

    EXTENSIONS_TO_CHECK = Set['.h', '.hpp', '.cpp', '.m', '.mm', '.pch', '.swift']

    same = 0
    different = 0

    all_files = `git ls-files`.lines.map { |line| line.strip }
    all_files.each do |relative_path|
      if relative_path == 'Pods'
        next
      end

      unless EXTENSIONS_TO_CHECK.include? File.extname(relative_path)
        next
      end

      path = File.expand_path(relative_path)

      contents = File.read(path)
      new_contents = contents.sub(/\/\/\n\/\/  Copyright .*\n\/\/\n\n/, '')

      if contents == new_contents
        same += 1
      else
        different += 1
      end

      File.write(path, new_contents)
    end

    puts "updated #{different} file(s), left #{same} untouched"

I'm sure this script could be improved, but it worked well enough.

Then, I created `Scripts/lint/lint-license-headers` and ran it to auto-
fix a lot of files. This changed the mode of some files, but I think
that's actually desirable. For example,
`SignalServiceKit/src/Util/AppContext.m` previously had a mode of
`0755/-rwxr-xr-x`, and it's now `0644/-rw-r--r--`.

Then I fixed some stragglers and updated the precommit script.

See [a similar change in the Desktop app][0].

[0]: 8bfaf598af
2022-10-13 08:25:37 -05:00
Nora Trapp
da9f52c67d Update conversation split view styling 2022-09-12 10:48:28 -07:00
Harry
b9dd5cb63c
Use final avatar for system author (onboarding story)
* Use final avatar for system author (onboarding story)

* remove onboarding story feature flag
2022-08-30 16:45:37 -07:00
Igor Solomennikov
6548e374e2
Improved crop tool in media editor.
Re-do all crop view controller with pure Auto Layout which allowed to animate layout changes and transitions between UI states.

Image rotation using two fingers was removed to match native Photos app: tilt control UI at the bottom allows much more precise rotation and two finger gesture is now purely for zooming and panning.
2022-07-26 14:11:03 -07:00
igor-signal
a02c18c972
Animate UI changes in the bottom toolbar in media review screen.
Animate UI changes in the bottom toolbar in media review screen.
2022-07-13 12:12:48 -07:00
Max Radermacher
369118b045 Add support for replying to gift messages 2022-07-07 10:49:20 -07:00
Igor Solomennikov
7f4a5f3f7b Merge branch igor/media-editor-updates. 2022-07-06 14:54:26 -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
Igor Solomennikov
1aec65bc1d Fix incorrect layouts constraints in AL helper method.
UIView.autoPin(toEdgesOf:withInset:) was creating incorrect vertical
edge constraints.

Also rename the method to better match conventions: `withInsets` instead
of `withInset`.
2022-04-22 11:08:20 -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
Dimitris Apostolou
62724cf0be Fix typos 2022-03-18 11:31:06 -07:00
Igor Solomennikov
6848210a4c Remove UIScrollView workaround that was only used in iOS 11.0-11.2
Not needed anymore since min supported iOS version is now 12.2
2022-01-31 15:15:18 -08:00
Martin Böttcher
fcbd352462 renamed some properties and arguments; removed orphaned protocol 2022-01-26 10:46:08 +01:00
Martin Böttcher
777c9785a2 refactored background color handling (part of cell configuration), fixed colors searching on iPad, changed handling of theme change during multi-selection 2022-01-26 10:46:08 +01:00
Eugene Bistolas
8765108a1e [Badging] Durable redemption job pending/failure UI 2021-11-16 09:50:35 -08:00
Michelle Linington
6deedc67b6 Update profile settings to add badge configuration 2021-11-09 17:04:25 -08:00
Michelle Linington
77b7ea5c40 Fix a whole bunch of warnings 2021-10-21 21:11:26 -07:00
Matthew Chen
a0efdc2e95 Respond to CR. 2021-10-21 09:21:33 -03:00
Matthew Chen
5d780d1589 Apply script to normalize includes and imports. 2021-10-21 09:21:10 -03:00
Matthew Chen
57f8212495 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Matthew Chen
25f015d8bc Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Matthew Chen
c416609108 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00