Commit Graph

39 Commits

Author SHA1 Message Date
Sasha Weiss
4b549f9e92
Ensure icon is recreated when cell is regenerated, to get right color 2023-02-08 16:11:48 -08:00
Adam Mork
f405846faa
[Payments] Inset Styling Update for Payments
* inset styling updates, squashed to one commit off latest main

* linting
2023-02-06 09:13:35 -08:00
Max Radermacher
015803297a
Add .notAllowed to editingAuthorization for iPad 2023-02-01 11:33:37 -08:00
Sasha Weiss
8d627bf0be
Add a header view to username selection 2023-01-27 15:19:35 -08:00
Max Radermacher
f111a7f162
Swiftify DomainFrontingCountryViewController
Also:
* Remove OWSTableViewController2.useNewStyle
* Remove useThemeBackgroundColors
* Remove unused table view bg/cell colors
2022-12-06 12:53:45 -08:00
Igor Solomennikov
3abcb3294b Fix typo: "appearence" -> "appearance". 2022-11-29 22:01:42 -08:00
Igor Solomennikov
11d1807e35
More updates to chat input bar.
* Updates to "sticker" button in chat input bar.

• switch button to "keyboard" when sticker keyboard is active.
• add spring animations to sticker/keyboard buttons.
• clean up animation code: use one UIViewPropertyAnimator for all animations
  happening in chat bar at once.

* Ensure correct "pressed state" appearance for buttons in chat bar.
2022-11-14 13:33:37 -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
Nora Trapp
8c633c718e Private Story -> Custom Story 2022-10-18 15:41:04 -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
Harry Sanabria
d64a850be0 Fix native context menu icon sizes 2022-10-07 07:49:41 -07:00
Harry
c544e46ee1
Story fix bargain bin
* fix conflict between story viewer context menu drag and navigational pan gestures

* Fix RTL chevrons on story list

* swipe only between hidden stories OR visible stories, never both

* Add table row swipe actions for hiding/unhiding stories & update icons to sharp corners instead of rounded

* make story viewer context menu always dark theme to match design mocks

* dont fail dev builds when harmlessly double dismissing a context menu, which happens if backgrounding the app while the context menu is open

* update my story row icons to 16pt

* swipe to delete on my story rows

* Use themed icons. Get filled versions of various context menu icons from design
2022-09-26 17:10:10 -07:00
Nora Trapp
86be80dbd7 Add story info sheet 2022-09-12 10:36:15 -07:00
Meher Kasam
44431f1920 Add "Speak Message" accessibility feature
If "Speak Selection" is enabled in your iOS settings, you can now choose
to speak the message.

See [#5417][0] for more details.

Co-Authored-By: Evan Hahn <evanhahn@signal.org>

[0]: https://github.com/signalapp/Signal-iOS/pull/5417
2022-08-29 16:25:04 -05:00
Nora Trapp
7208776b44 Add action buttons to sent story rows 2022-08-18 16:26:15 -07:00
Nora Trapp
192c612bab Allow creation of private stories 2022-07-15 15:05:03 -07:00
Nora Trapp
7bd167f815
Initial story sending support
* Little fix for context menu

* Add 'My Stories' section to stories tab

* Add new story thread types

* Show stories in conversation picker

* Support for sending stories

* Update story list when sending stories

* Add basic 'My Stories' view controller

* Initial stories settings screens

* Consolidate TSPrivateStoryThread and TSMyStoryThread into one class

* Require an explicit read transaction to initialize an outgoing message

* Fix linting

* Allow enabling group story from internal settings

* Fix tests

* PR Feedback
2022-06-10 22:28:03 -04:00
Jordan Rose
91f4615d5d Avoid multiple ThemeDidChange notifications
We get notified of the system theme changing through OWSWindow, but
there's more than one window in the app.
2022-06-02 14:01:42 -07:00
Max Radermacher
84cb841110 Add “Gift a Badge” menu item 2022-05-12 15:09:58 -05: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
Evan Hahn
8b072620a6 Add "Donation Receipts" view 2022-04-11 16:21:12 -05:00
Nora Trapp
03bdb55e21 Add context menu to group replies 2022-03-31 00:36:20 -07:00
Nora Trapp
b1dc925e48 Add context menu to StoriesViewController 2022-03-31 00:36:20 -07:00
Martin Böttcher
fa5dbfa234
improve ContactsManagerCache performance (#4026)
* added details for Signalyzer; improved ContactsManagerCache
* some minor runtime improvements
* systems contacts are written and read in big chunks to improve overall performance
* use of __file__, __function__ and __line__ when monitoring objective C methods
* minor changes
* minor changed based on review comments
2022-03-03 09:30:31 +01:00
Jordan Rose
7fd57960dc Don't block theme changes on a write transaction
We need to write the current theme into the database so it persists
across launches, but we don't need to *block* waiting for that to
happen. This increases UI responsiveness at the cost of reverting to
someone's previous theme setting if the app crashes before the write
goes through.
2022-02-18 11:47:32 -08:00
Martin Böttcher
777c9785a2 refactored background color handling (part of cell configuration), fixed colors searching on iPad, changed handling of theme change during multi-selection 2022-01-26 10:46:08 +01:00
Martin Böttcher
625fc41416 cell background and context menu react to Theme changes 2022-01-26 10:46:08 +01:00
Martin Böttcher
88e41f29fa
corrected and adjusted background color of selected home view cells (#3907)
* corrected and adjusted background color of selected home view cells

* using multipleSelectionBackgroundView instead of replacing selectionBackgroundColor
2022-01-21 07:58:23 +01:00
Martin Böttcher
9ce447de57
refactored async loading of avatar images in HomeView (#3886)
* refactored async loading of avatar images in HomeView

* async loading avatars does not use extra DispatchWorkItems anymore

* minor code changes, added comments
2022-01-13 09:13:12 +01:00
Eugene Bistolas
41700623df Add support for configuring emoji reactions 2022-01-03 15:35:37 -08:00
Nora Trapp
095b54d13d Add boost view controller 2021-11-15 13:24:58 -08:00
Nora Trapp
7ecb98e935 PR Feedback 2021-11-10 11:16:52 -08:00
Eugene Bistolas
b3d1bdefd1 [Donor Badges] Current subscriber UI 2021-11-09 18:29:55 -10:00
Michelle Linington
6deedc67b6 Update profile settings to add badge configuration 2021-11-09 17:04:25 -08:00
Michelle Linington
77b7ea5c40 Fix a whole bunch of warnings 2021-10-21 21:11:26 -07:00
Matthew Chen
25f015d8bc Add SignalUI framework target. 2021-10-19 09:39:53 -03: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