Commit Graph

22 Commits

Author SHA1 Message Date
Igor Solomennikov
2259a151d9
Delete unused OWSButton methods / properties. 2026-05-31 10:12:11 -07:00
Igor Solomennikov
08bf2bb9e5
Remove OWSRoundedButton. 2026-05-31 10:11:44 -07:00
Sasha Weiss
d267ec8305
Run swiftformat . 2025-12-30 11:34:05 -08:00
Elaine
ed35c95216
Update call header for controls drawer 2024-07-22 13:35:04 -06:00
Adam Sharp
b42710cf90 Work around use of deprecated UIButton API
The old UIButton API is still functional as long as we don't use
UIButton.Configuration, so we can safely ignore these warnings until we're
ready to adopt the configuration API across the codebase.
2024-07-03 14:27:48 -04:00
Elaine
d600ae8055
Add raise hand toast feature flag 2024-06-21 12:48:33 -06:00
Ehren Kret
d4e17730f3 remove import SignalMessaging statements 2024-03-12 03:35:34 -05:00
Ehren Kret
9c7078b3f8 migrate OWSContactsManager to swift
as the last remaining objective-c file, this removed direct dependency
from the SignalMessaging framework headers on SignalServiceKit and
thus required adding lots of import statements
2024-03-09 10:45:55 -06:00
Elaine
9ef87b28c0
Update name conflict UI 2024-02-08 08:41:55 -07:00
Sasha Weiss
02dd61abdb
Show a button to access your username link from top-level settings 2023-07-13 10:41:18 -07:00
Sasha Weiss
da6810e198
Implement username link sharing 2023-07-07 14:54:26 -07:00
Igor Solomennikov
0e9d511d1d
SignalUI cleanup.
• convert ObjC code from UIView+SignalUI to Swift.
• separate code from UIView+SignalUI to smaller files by functionality.
2023-06-23 14:36:21 -07:00
Sasha Weiss
98bd0ef77c
Add a button to share your username from profile settings 2023-01-27 16:22:34 -08:00
Evan Hahn
198fc1784a
Consolidate one-time & monthly donation screens
Previously, one-time donations were on one screen and monthly donations
were on another. Now, they're on a single screen with a picker.

Most of the interesting changes are in `DonateViewController`.

Other things of note:

- There are some new TODOs here for existing bugs I didn't fix. For
  example, one-time donations don't do so well if there are any problems
  at all.

- Even though we only support Apple Pay, there's code that alludes to
  additional payment methods. For example,
  `DonateChoosePaymentMethodSheet`. We'll expand on this in the future.

- Users should only be able to select currencies that the server
  supports. For example, you shouldn't be able to select EUR if the
  server doesn't support euros. This wasn't working correctly before,
  but is fixed here.

  We already fixed one part, where users could change to an unsupported
  currency (see dab02f30ae). However, if
  your _default_ currency is unsupported and you didn't change it,
  that's no good. This is unlikely for most users but could happen.

  I fixed this by changing it from (effectively)
  `Locale.current.currencyCode ?? "USD"`, which might not be supported,
  to a preference list, choosing the first one the server likes.

- I skip animations if the Reduce Motion setting is enabled.

- On the donation screen, the logic for the preview badge has changed
  slightly. If you already have a badge, we'll always use that.
2022-11-08 16:27:50 -06:00
Evan Hahn
b459e22026 Improve "dim when highlighted" logic for OWSButtons
This dims the button:

    let button = OWSButton()
    button.dimsWhenHighlighted = true
    button.isHighlighted = true

This did not, and I think it should (last 2 lines are switched):

    let button = OWSButton()
    button.isHighlighted = true
    button.dimsWhenHighlighted = true

This also removes an unnecessary `@objc` annotation.

I think this is a useful change on its own but I expect it to make an
upcoming change easier, too.
2022-10-13 12:45:02 -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
48c3c08c10 Fix vertical_parameter_alignment SwiftLint violations
This fixes violations of [SwiftLint's `vertical_parameter_alignment`
rule][0]. This should have no user impact.

[0]: https://realm.github.io/SwiftLint/vertical_parameter_alignment.html
2022-08-18 10:37:09 -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
21a8175795 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