Commit Graph

21 Commits

Author SHA1 Message Date
Max Radermacher
13d5fe93dc
Run swiftformat . using v0.60.1 2026-03-26 17:10:38 -05:00
Sasha Weiss
aba3aa6f6b
Only strip poll text when sending, or done editing 2026-02-24 17:39:05 -08:00
Sasha Weiss
03d6b5fe03
Rewrite NewPollViewController using UIKit 2026-02-24 10:42:55 -08:00
Sasha Weiss
d267ec8305
Run swiftformat . 2025-12-30 11:34:05 -08:00
kate-signal
eb43156929
autofill for backup keys 2025-07-01 13:49:21 -07:00
Elaine
c52635956f
Improve backup key entry behavior 2025-04-16 12:31:13 -06:00
Harry
4ccfb958f6
Disable ai writing tools on all text fields in the app 2024-08-27 09:53:07 -07:00
Ehren Kret
30424e19ae remove OWSNavigationControllerBase
This appears to have been a hack for something that may have been
necessary in older versions of iOS. Current iOS seems to just return
true with no side-effects from this super call so there's no reason to
retain this hack apparent.
2024-04-28 23:19:43 -05:00
Elaine
2eea4e9060
Add character limit label to profile note editor 2024-04-10 09:55:23 -06:00
Elaine
1a5bacd220
Create Nicknames View Controller 2024-03-27 10:38:03 -06:00
Elaine
0887f70f1e
Streamline using a text view in a table view 2024-03-26 10:55:28 -06:00
Igor Solomennikov
bb2b665f6f
Convert Theme to Swift. 2023-05-02 12:49:36 -07:00
Igor Solomennikov
6dd3d9a6f2
Convert all convenience methods in UIFont+OWS to Swift. 2023-04-18 17:14:51 -07:00
Evan Hahn
a941c82c14
Prefer isEmpty with strings
This change may improve performance slightly but should have no other
user impact.

`myString.isEmpty` is faster than `myString.count == 0` or equivalent,
because computing `count` may require iterating over the string.

I tried to fix all occurrences of this.

Tested this by sending a message in a group and doing a full
re-registration, just in case I broke something there.
2022-11-01 17:53:46 -05: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
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
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
c416609108 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00