Commit Graph

32 Commits

Author SHA1 Message Date
Max Radermacher
d24c370cb1
Convert OWSUserProfile to SDSCodableModel 2024-01-24 17:14:10 -06:00
Sasha Weiss
06e1a416cc
Remove the "Any...Finder" pattern from a bunch of types 2023-08-21 10:27:07 -07:00
Igor Solomennikov
76c7b2db28
Convert ChatListVC to Swift. 2023-06-05 16:13:41 -07:00
Igor Solomennikov
20c55e7dec
Add necessary imports to Swift files.
Necessary for converting ChatListVC to Swift.
2023-06-05 16:04:48 -07:00
Igor Solomennikov
f8a79687a7
Remove unnecessary @objc from the main app target. 2023-05-16 16:33:45 -07:00
Igor Solomennikov
bb2b665f6f
Convert Theme to Swift. 2023-05-02 12:49:36 -07:00
Evan Hahn
14237a873f
NSLocalizedString -> OWSLocalizedString 2023-04-25 13:28:46 -05:00
Igor Solomennikov
6dd3d9a6f2
Convert all convenience methods in UIFont+OWS to Swift. 2023-04-18 17:14:51 -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
Igor Solomennikov
6c1ed8d0dd
GradientView API improvement.
Allow to set just the gradient colors, without locations, relying on CAGradientLayer's
uniform color distribution logic.

Also update all the uses of GradientView to only specify colors because all the
places were using just two locations: 0 and 1.
2022-08-26 20:58:04 -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
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
Matthew Chen
9271f83624 Remove databaseChangesWillUpdate. 2021-09-08 21:41:13 -03:00
Matthew Chen
c9880b3b73 Fix loop in "get started" banners. 2021-08-15 19:49:48 -03:00
Nora Trapp
e7074187ea Listen for the local profile updating. 2021-07-23 14:07:27 -07:00
Nora Trapp
97fcc4613c Avatar Builder Megaphone & Onboarding Card 2021-07-23 13:28:51 -07:00
Matthew Chen
f2b76e60f9 Refine names. 2021-07-02 22:08:53 -03:00
Matthew Chen
f06b72bc2a Remove uiRead(). 2021-07-02 22:04:58 -03:00
Matthew Chen
75de56236b Remove uiRead(). 2021-07-02 22:04:58 -03:00
Matthew Chen
786e7cef3d Fix build warnings. 2021-06-07 11:11:28 -04:00
Matthew Chen
e1324adf2e Add an "appearance get started" card. 2021-06-02 20:54:51 -04:00
Michelle Linington
6df7d14fbf Fix issue where banner sporadically appears after pin restoration
We shouldn't be reading from the UI database snapshot

Additionally, adds extra parameter to notify conversation list view
controller to dismiss without animation
2021-01-22 18:27:31 -08:00
Michelle Linington
2c6bf0d22f Fixes a couple issues reported by Randall:
- Add content inset for the banner
- Allow interactions in the gradient portion of the banner
2021-01-15 00:32:49 -08:00
Michelle Linington
a0b20f4d77 Fix some banner misbehavior on iOS 12
Fixes a collection view batched update crash on iOS 12
Adds a bottom layout margin to the banner for home button devices
Banner now listens for external changes to active card set
Clear banner on successful PIN restoration
2021-01-12 21:34:39 -08:00
Michelle Linington
8e28a9583b Only enable banner for new users 2021-01-12 16:20:39 -08:00
Michelle Linington
554a24685c Revert "Revert "Merge branch 'mlin/PR/GettingStartedBanner' into release/5.2.0""
This reverts commit d810122228.
2021-01-12 16:20:39 -08:00
Michelle Linington
d810122228 Revert "Merge branch 'mlin/PR/GettingStartedBanner' into release/5.2.0"
Accidentally merged a stale local copy of this branch. Reverting...

This reverts commit 5a8c3a7bec, reversing
changes made to e8f1b4a368.
2021-01-12 16:02:55 -08:00
Michelle Linington
490577bfa0 More bug fixing
Don't show banner in archive view
Only count visible threads when determining if we should hide the banner
2021-01-12 15:44:10 -08:00
Michelle Linington
d21c340706 Dark mode support. Better handling of landscape. 2021-01-12 15:44:10 -08:00
Michelle Linington
cb8de8b014 Add onboarding banner to ConversationListViewController 2021-01-12 15:44:10 -08:00