Commit Graph

86 Commits

Author SHA1 Message Date
Elaine
aefb384f57
Device linking redesign 2024-11-13 19:03:28 -07:00
Sasha Weiss
46b5b4a9e4
Prefix donations-related types with Donations 2024-10-25 10:14:56 -07:00
Ehren Kret
4f43208fdc delete Dependencies+SignalUI.swift 2024-10-12 00:06:27 -05:00
Ehren Kret
de32c7799d remove NSObject and Dependencies extension computed vars for SignalServiceKit 2024-10-11 23:12:59 -05:00
Harry Sanabria
a58fe0cd25 Pass AppReadiness around tons of view controllers 2024-09-27 17:38:06 -07:00
Ehren Kret
fc350cb88a convert PhoneNumber to swift 2024-08-07 16:16:02 -05:00
Sasha Weiss
0b4047c675
Unify disclosureXYZ methods in OWSTableItem 2024-07-22 11:39:06 -07:00
Max Radermacher
dd42e10e88
Smoosh together various places that fetch profiles 2024-04-23 15:22:37 -05:00
Elaine
f7f9d1ef82
Update existing bar button items using the new convenience methods 2024-03-25 12:20:19 -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
192ee39f8c
Allow username QR codes to be scanned from main in-app camera 2024-03-08 15:59:30 -07:00
Max Radermacher
6ec2ab3b51
Remove PNP, usernames, and CDSI flags 2024-03-05 12:48:25 -06:00
Max Radermacher
d24c370cb1
Convert OWSUserProfile to SDSCodableModel 2024-01-24 17:14:10 -06:00
Elaine
cf67da89fa
Display username on profile card in settings 2024-01-22 12:49:02 -07:00
Max Radermacher
a836601ee2
Runnerify ReceiptCredentialRedemptionJobQueue 2023-12-18 13:44:23 -06:00
Elaine
8111cade76
Adjust settings profile row QR code icon 2023-12-15 17:51:42 -07:00
Max Radermacher
6b3397b936
Remove confusing “Subscription” prefix 2023-12-12 12:30:31 -06:00
Max Radermacher
dc6057f69c
Remove some remote configs that aren’t needed 2023-11-15 19:04:09 -06:00
Sasha Weiss
7f41ecaa8b
Support SEPA bank transfer donations 2023-11-06 13:49:40 -08:00
Sasha Weiss
2583f8f785
Always show donation settings 2023-10-26 09:16:10 -07:00
Harry
aa0e250cb7
[Death to TSAccountManager, long live TSAccountManager][9] Migrate usages of old TSAccountManager to new 2023-10-05 08:56:08 -07:00
Harry
2872ecc983
Remove Beta label for Payments 2023-08-29 15:01:45 -07:00
Sasha Weiss
a78e218283
Support processing an "uploaded" username link QR code 2023-08-01 10:55:13 -07:00
Sasha Weiss
1398e335a0
Implement username links 2023-07-31 14:58:07 -07:00
Sasha Weiss
b8a90502bb
Accessibility and color fixes for usernames 2023-07-17 09:32:14 -07:00
Sasha Weiss
7661fb2a83
Restructure the profile settings cell's autolayout 2023-07-13 11:21:42 -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
849fb9a4d6
More OWSTableItem cleanup 2023-07-05 13:44:08 -07:00
Igor Solomennikov
52f0015dfe
New set of icons. 2023-06-22 17:38:01 -07:00
Sasha Weiss
1848e4f9a1
Clean up OWSTableItem 2023-06-12 09:57:59 -07:00
Igor Solomennikov
b3578dde47
Remove NSObject inheritance and exposure to ObjC for OWSTable* classes. 2023-06-05 10:12:51 -07:00
Igor Solomennikov
f8a79687a7
Remove unnecessary @objc from the main app target. 2023-05-16 16:33:45 -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
Sasha Weiss
8047472f68
Rename SubscriptionManagerProtocol 2023-03-14 17:44:38 -07:00
Evan Hahn
cf1f0f3a2e Skip "donation settings" screen if nothing's on it
Before this change, you could tap "Donate" and be taken to a screen that
had just one button: "Donate".

Now, you'll only see this screen if there's anything _else_ to do on
that screen.

For example:

1. User installs the app fresh.
2. User goes to the settings and taps "Donate". They're taken to the
   donate screen, not the donate _settings_ screen. They donate.
3. Later, they go to the settings and tap "Donate" again. They're now
   taken to the donate settings screen.
2022-12-20 12:13:37 -06:00
Evan Hahn
c8bc2cde2e Improve name of donation settings view controller
This change should have no user impact.

`DonationViewController` is now `DonationSettingsViewController`.

I think this is a better name on its own, but it'll seem even better
after upcoming change.
2022-10-26 14:12:48 -05:00
Max Radermacher
ab55cf3929 Import SignalMessaging where it’s needed
The next commit removes a file that, through assorted Swift/Obj-C bridge
magic, resulted in SignalMessaging being available to all these files.
2022-10-24 10:19:06 -07:00
Nora Trapp
9639393ded Move stories settings to root level 2022-10-18 11:08:50 -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
Max Radermacher
df5437fb77
Remove "Linked Devices" item on linked devices
These aren't currently capable of modifying linked devices.
2022-08-04 08:39:59 -05:00
Max Radermacher
def8129ac8
Handle expired gift badges
- Show an error when trying to redeem them
- Show an error if your last remaining gift badge expires
2022-07-27 13:15:58 -07:00
Max Radermacher
29507343ff Remove unused subscription & badge code 2022-07-19 09:45:01 -07:00
Ehren Kret
149c485df7 Add payments section to the UI 2022-04-30 15:09:49 -05:00
Evan Hahn
51247f7d74 Reorganize donation screens
Co-Authored-By: Michelle Linington <66273351+michelle-signal@users.noreply.github.com>

There are various things you might want to do as a donor to Signal:

- Start, modify, or stop a monthly subscription
- Do a one-time donation
- Manage your badges
- See your receipts

Previously, `SubscriptionViewController` was your gateway to all of this
stuff. However, this had some problems:

- You could only see receipts if you had an active subscription.
  One-time donors, or relapsed sustainers, could not get receipts
- It didn't work well if Apple Pay was disabled
- It wasn't extensible (e.g., for adding badge gifting)

This change breaks that single screen into two:

- `SubscriptionViewController` is responsible for letting users start,
  modify, or stop a monthly subscription
- `DonationViewController` is your "donation homepage", which links to
  everything else: `SubscriptionViewController`, `BoostViewController`
  for one-time donations, `DonationReceiptsViewController` for receipts,
  etc.

Because the new `DonationViewController` takes on more responsibility,
you'll see `SubscriptionViewController` and
`DonationReceiptsViewController` getting smaller.

This change also:

- Reorganizes the top-level app settings to match new designs
- Adds behavior for users who don't have Apple Pay
- Adds basic error handling if your network is down
- Uses enums with associated values to prevent invalid states
2022-04-27 16:16:05 -05:00
Evan Hahn
cefce5b2f2 Clean up donate URL code
This small change cleans up two things for the donate URL:

1. Moves it into a constant in `TSConstants`
2. Adds a trailing slash to the URL (because the server will redirect
   you without one)

I think these cleanups are useful by themselves, but I'll be using the
constant again in an upcoming change and split this off into its own
small commit.

Made sure I could still open the URL in the app.
2022-04-21 12:23:37 -05:00
Evan Hahn
9166854c05 Update donation strings: "One-time", not "One Time" 2022-04-19 14:15:12 -05:00
Evan Hahn
ef6c044a54 Remove legacy donation view
_I recommend reviewing this with whitespace changes disabled._

We have a kill switch that disables badge acquisition. If that kill
switch is active, we show a one-time donation view.

That kill switch has been off since January of 2021, so I think we can
remove this one-time donation view. That lets us remove hundreds of
lines of code, but it will also make future donation-related changes a
bit easier.
2022-04-19 10:46:04 -05:00
Evan Hahn
038274621a Update some donation strings 2022-04-18 15:12:39 -05:00