Commit Graph

370 Commits

Author SHA1 Message Date
Igor Solomennikov
3d84f3f668
Add animations to buttons in attachment keyboard.
• spring-based animations for "pressed" state of the buttons.
• chained "fade in and scale" animations for buttons when keyboard is presented.
• spring-based "fade in" animation for recent photos.
2023-09-13 12:59:28 -07:00
Igor Solomennikov
7790837eb5
Remove unnecessary "@objc" in SignalMessaging. 2023-05-16 16:41:49 -07:00
Igor Solomennikov
bb2b665f6f
Convert Theme to Swift. 2023-05-02 12:49:36 -07:00
Evan Hahn
d01cfc9ed5
Remove unused "iPad compatibility mode" getter. 2023-04-24 15:48:08 -07:00
Evan Hahn
8d4e286840
Remove unused getter from UIGestureRecognizer. 2023-04-24 15:46:47 -07:00
Evan Hahn
f05d73c768
Remove two unused getters from UIDevice. 2023-04-24 15:46:11 -07:00
Igor Solomennikov
396bda69ef
Improve media viewer open/close animations for partially obscured media.
Do not let media animate over navigation bar at the top or chat input field
at the bottom. This is done by clipping top / bottom areas of a view where animation takes place.
2023-03-03 22:47:14 -08:00
Evan Hahn
20a2cf7311 Use title casing in filenames
This change should have no user impact.

`Error+isRetryable.swift` is now `Error+IsRetryable.swift`, and others
like it.

To find the files, I ran this:

    git ls-files | grep -E '\+[a-z]'
2022-11-10 19:08:44 -08: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
Harry
9d4fb97dfd
Add story media previews to conversation picker in story send flow
* Support scale aspect fill in MediaMessageView

* show image/video previews on conversation picker when in stories only send flow

* show text story previews in conversation picker

* fix media preview border color

* update rotation for RTL

* PR feedback
2022-10-12 09:59:49 -07:00
Evan Hahn
1b00741b6d
Fix remaining SwiftLint failures, lint more strictly
This fixes our remaining SwiftLint violations, which were small.

It also updates the precommit script to fail if any violations are
found, even warnings. This will cause CI to fail if you include a file
that isn't SwiftLint-compatible.
2022-10-07 12:00:26 -05:00
Harry
6a88e6c967
Revert "Remove pre-Xcode 14 status bar workarounds"
This reverts commit 9f731edae9.
2022-10-04 09:17:33 -07:00
Harry
9f731edae9
Remove pre-Xcode 14 status bar workarounds 2022-10-03 15:29:49 -05:00
Harry
e2b5570646
Compensate for extra status bar height on iPhone 14 pro devices
* Compensate for extra status bar height on iPhone 14 pro devices

* use string sysctlKey

* more commenting
2022-09-19 15:46:17 -07:00
Harry
299c76fedd
fix iPhone 14/Xcode14 issues 2022-09-19 08:17:28 -07:00
Igor Solomennikov
7f4a5f3f7b Merge branch igor/media-editor-updates. 2022-07-06 14:54:26 -07:00
Max Radermacher
c0a85b888b
Add rendering support for Gift Badges
Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>
2022-06-22 08:05:25 -07:00
Evan Hahn
e679707038 Fix SwiftLint shorthand_operator violations
The gist is:

```diff
-foo = foo + 1
+foo += 1
```

Most of the violations were in generated files, so I changed and re-ran the generator.

A few of these violations required implementing some new methods, which I added tests for.

See [the docs for this rule][0].

[0]: https://realm.github.io/SwiftLint/shorthand_operator.html
2022-06-07 14:51:57 +00:00
Evan Hahn
04d7bb7462 Stop using arc4random in Swift files
This removes calls to `arc4random` and `arc4random_uniform` and replaces
them with calls to `Int.random` or equivalent.

These are a little less readable, which may be [why SwiftLint doesn't
like them][0]. (SwiftLint calls them "legacy", possibly because they're
not strong random number generators, but I couldn't find a clear
explanation for this anywhere, including [the original PR][1].)

This is the kind of change that's error-prone, so I wrote [a simple
script to help avoid regressions][2]. The script runs 10,000 iterations
of the old and new RNG and compares the ranges, reporting differences.
(Some differences are likely, like the ones that involve floats; others
are very unlikely to have differences.)

`git grep arc4random | grep swift` returns no results after this change.
Same for [everything else SwiftLint checks for][3].

[0]: https://realm.github.io/SwiftLint/legacy_random.html
[1]: https://github.com/realm/SwiftLint/pull/2419
[2]: https://gist.github.com/EvanHahn-Signal/9c75c9f484f4778149cbde3eafc9b285
[3]: ea6cc50890/Source/SwiftLintFramework/Rules/Idiomatic/LegacyRandomRule.swift (L23-L27)
2022-05-03 10:19:07 -05:00
Nora Trapp
376471587f Backend support for stories receipt 2022-03-16 17:51:48 -07:00
Martin Böttcher
f331f00646 UI tweaks to context menus 2022-01-31 09:31:17 +01:00
Martin Böttcher
7ebf46b3e8 fixed some lint issues and modified some UI details due to updated and specified requirements 2021-12-02 20:36:23 +01:00
Martin Böttcher
a3876232d5 PAPERCUT-475: added swipe action to HomeView allowing muting/unmuting thread 2021-12-02 20:36:23 +01:00
Matthew Chen
fc749b4d72 Change phone number. 2021-11-19 14:28:18 -03:00
Matthew Chen
57f8212495 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Matthew Chen
b27457ecc6 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Matthew Chen
a50b328efd 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
Matthew Chen
39a47dea11 Add logging around websocket lifecycle. 2021-08-30 21:26:49 -03:00
Matthew Chen
0252673acc Message polish: Quoted reply style changes. 2021-08-26 21:14:58 -03:00
Matthew Chen
4071e1e4a5 Fix message forwarding issues. 2021-08-25 11:04:13 -03:00
Matthew Chen
5a8a54cba2 Rework selection layout again. 2021-08-23 18:19:39 -03:00
Matthew Chen
470723fa30 Modify forward flow to support multi-forward. 2021-08-19 16:57:30 -03:00
Matthew Chen
fc69485272 Fix build warnings. 2021-08-12 20:08:32 -03:00
Matthew Chen
3f8bb0b19b Refine home view initial loads. 2021-07-29 09:30:57 -03:00
Matthew Chen
aeb9c978d8 Minor fixes. 2021-07-16 09:16:37 -03:00
Matthew Chen
81c4f61824 Convert conversation list cells to use manual layout. 2021-07-07 09:46:33 -03:00
Matthew Chen
1d5b2aa2f5 Rework avatar building and caching. 2021-06-18 14:01:32 -03:00
Matthew Chen
c2b413ef6d Merge CVC bubble views. 2021-06-11 11:45:25 -03:00
Matthew Chen
6946667e7d Merge CVC bubble views. 2021-06-11 11:45:25 -03:00
Matthew Chen
74377e4935 Small fixes. 2021-05-25 21:41:39 -03:00
Matthew Chen
39e48807d1 Remove icon fonts. 2021-05-20 20:45:26 -03:00
Matthew Chen
02b306d7bf Disable layer animations. 2021-05-17 22:17:31 -03:00
Matthew Chen
da859784d3 Disable layer animations. 2021-05-17 17:18:46 -03:00
Matthew Chen
9cf432553b Disable layer animations. 2021-05-17 17:06:32 -03:00
Matthew Chen
112ebbcd71 Improve thumbnail quality. 2021-05-04 17:39:20 -03:00
Nora Trapp
1806097947 Fix iOS 12 calling crash 2021-05-02 09:27:38 -07:00
Matthew Chen
b428275371 Manual layout: quoted replies. 2021-04-22 23:02:28 -03:00
Nora Trapp
298c83505e Merge branch 'release/5.10.0' 2021-04-19 09:43:49 -07:00
Matthew Chen
21685bea08 Always load media attachment thumbnails async. 2021-04-19 13:30:36 -03:00