Commit Graph

28082 Commits

Author SHA1 Message Date
Nora Trapp
fcaeb0352f "Bump build to 5.36.0.18." (nightly-04-21-2022) 2022-04-21 04:00:48 -07:00
Michelle Linington
2e7671b3f5 More project cleanup 2022-04-20 16:26:54 -07:00
Michelle Linington
0cd1ff61fd Project cleanup 2022-04-20 16:19:26 -07:00
Michelle Linington
11beeca261 Update Pods 2022-04-20 15:09:26 -07:00
Evan Hahn
0cf8a30bf9 Test Subscription struct
This test-only change adds tests for [`Subscription`][0].

I did this because I'll be adding additional behavior to this struct and
want to be ready to test that logic. I think this is a useful change on
its own, however, so I split it out into its own change.

[0]: 2693c55232/SignalMessaging/Subscriptions/SubscriptionManager.swift (L70-L104)
2022-04-20 12:47:50 -05:00
Igor Solomennikov
e4d85a2f68 Merge branch 'igor/show-video-durations' 2022-04-20 10:35:15 -07:00
Igor Solomennikov
2c369888b4 Show video duration in "Recent Media" stripe (+ button in chat). 2022-04-20 10:23:51 -07:00
Igor Solomennikov
8fefcad8aa Tweak duration label protection to be a corner gradient. 2022-04-20 10:23:51 -07:00
Igor Solomennikov
469b275f2d Show video duration in photo library picker. 2022-04-20 10:23:51 -07:00
Igor Solomennikov
1f3ceac66c Fix GradientView not working in some cases.
GradientView would not work if its colors were passed during initialization
and never changed after. This was caused by the fact that `CAGradientLayer`'s
colors were updated in `GradientView.colors.didSet`, which isn't
called during `init()`.

Also allow access to `GradientView.gradientLayer` so that users of
that class can build more advanced gradients.
2022-04-20 10:23:50 -07:00
Evan Hahn
636b417390 Upgrade GRDB to version 5.23.0
This upgrades [GRDB][0] from v4.3.0 to v5.23.0, the latest version.

I closely followed the [migration guide][1] and stole from a prior
attempt at this upgrade. I also made sure to test the media gallery,
because that allegedly had problems before.

[0]: https://github.com/groue/GRDB.swift
[1]: 6d3f309cad/Documentation/GRDB5MigrationGuide.md
2022-04-20 09:08:50 -05:00
Nora Trapp
dd38276d8d "Bump build to 5.36.0.17." (nightly-04-20-2022) 2022-04-20 04:00:45 -07:00
Evan Hahn
9166854c05 Update donation strings: "One-time", not "One Time" 2022-04-19 14:15:12 -05:00
Jordan Rose
2c25935187 Merge branch 'jrose/simplify-setAudioSession' 2022-04-19 12:09:19 -07:00
Jordan Rose
a6c0bfac19 Simplify CallAudioService.setAudioSession(category:mode:options:)
All call sites provide the mode now, so there's no need to make it
optional. This also lets us remove a shim for pre-iOS-10 support
setting the category without the mode.
2022-04-19 11:38:37 -07:00
Martin Böttcher
32538f3bc0 Merge branch 'martin/wrongerrorhandling' 2022-04-19 19:48:45 +02:00
Martin Böttcher
9f66cce5e1 made iterating job records more stable 2022-04-19 19:47:44 +02:00
Martin Böttcher
04892da490 error iterating job records does not crash the app anymore 2022-04-19 19:47:44 +02: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
67ea0d0516 Fix some trivial compiler warnings
This fixes 10 of our Xcode warnings:

- `MessageReactionPicker.swift` was declaring a variable and not using
  it, leading to "Immutable value 'emoji' was never used". I simply
  removed it.
- `Stripe.swift` had a bunch of unnecessary `public`s, which caused
  "'public' modifier is redundant for static property declared in a
  public extension".
- `SubscriptionManager.swift` had an unnecessary `try`, causing "No
  calls to throwing functions occur within 'try' expression".
- `CallService.swift:696` was calling a function and not using its
  result, so I annotated that function with `@discardableResult`.
- `MobileCoinAPI+Configuration.swift` declared a variable with `var`
  that should've used `let`.

Nothing major here, but wanted to find ones that were easy to fix.
2022-04-19 09:28:15 -05:00
Evan Hahn
9e59ca31b5 Remove redundant DateFormatter locales
The [`locale` property of `DateFormatter`][0] defaults to `.current`, so
we don't need to specify it.

Tested this in English and Spanish in a simulator. Date formats appeared
localized.

[0]: https://developer.apple.com/documentation/foundation/dateformatter/1411973-locale
2022-04-19 09:27:54 -05:00
Nora Trapp
6d122571b8 "Bump build to 5.36.0.16." (nightly-04-19-2022) 2022-04-19 04:00:41 -07:00
Jordan Rose
dbe006ac6f Merge branch 'jrose/identity-manager-lock' 2022-04-18 18:45:01 -07:00
Jordan Rose
c8de10815a Remove internal lock from OWSIdentityManager
This isn't protecting any local state and wasn't being used
consistently, and it can result in lock inversion deadlocks if
-readWithUnfairLock: is called within a database write transaction.
2022-04-18 18:19:31 -07:00
Jordan Rose
e8243d5a44 Merge branch 'jrose/export-database-internal' 2022-04-18 17:59:47 -07:00
Jordan Rose
a61088b76f Add "Export Database" to the internal settings, for debugging 2022-04-18 17:36:42 -07:00
Max Radermacher
24b7f9cf02 Merge branch 'mcr/free-copyPropertyList' 2022-04-18 17:06:43 -07:00
Max Radermacher
bc53916301 Convert all(Testable)?Flags to functions 2022-04-18 16:28:01 -07:00
Max Radermacher
a353e8d757 free() the result of class_copyPropertyList
The docs say that the caller must `free()` the result.
2022-04-18 14:52:26 -07:00
Max Radermacher
c097b1189c Extract allPropertyNames from allFlags
This isolates all of the Obj-C runtime code in its own function.

If a class doesn’t have any properties, `class_copyPropertyList` may
return `NULL`. Previously, this would have resulted in an error while
force unwrapping the result, but all `BaseFlags` subclasses have
properties, so that wasn’t a problem in practice. Now, an empty array
will be returned, which seems correct when there aren’t any properties.
2022-04-18 14:52:26 -07:00
Max Radermacher
05b0112c88 Rename buildFlagMap()allFlags
This matches the naming scheme used for `allFeatureFlags`.
2022-04-18 14:52:26 -07:00
Max Radermacher
91512d745c Don’t pass class or value lookup block
The class can be computed from `self`, and the lookup block is always
the same (essentially `self.value(forKey:)`), so there’s no need to
provide separate implementations for each subclass. The superclass can
provide a single implementation for all subclasses to share.
2022-04-18 14:52:26 -07:00
Max Radermacher
ad8ab4a386 Implement findTestableFlags via buildFlagMap
The testable flags are a subset of all flags, so call the existing code.

This will cause the flags to be returned in an arbitrary order, but that
is fine since they’re only used in [one place][1], and that place sorts
the results before using them.

[1]: c77939a907/Signal/src/ViewControllers/AppSettings/Internal/TestingViewController.swift (L45-L48)
2022-04-18 14:52:26 -07:00
Max Radermacher
450b8035f3 Add unit tests for BaseFlags’ reflection APIs 2022-04-18 14:52:26 -07:00
Michelle Linington
6188fd27f8 Merge branch 'release/5.35.2' 2022-04-18 14:03:49 -07:00
Evan Hahn
038274621a Update some donation strings 2022-04-18 15:12:39 -05:00
Michelle Linington
86c510cfd2 "Bump build to 5.35.2.2." (Internal) 2022-04-18 12:17:50 -07:00
Michelle Linington
22ccc00c4b "Feature flags for .qa." 2022-04-18 12:17:48 -07:00
Michelle Linington
2693c55232 "Bump build to 5.35.2.1." (Beta) 2022-04-18 12:17:44 -07:00
Michelle Linington
0fb4ae2718 "Feature flags for .beta." 2022-04-18 12:17:40 -07:00
Michelle Linington
b54de53f59 "Bump build to 5.35.2.0." 2022-04-18 12:17:37 -07:00
Michelle Linington
69825a760e "Feature flags for .production." 2022-04-18 12:17:23 -07:00
Michelle Linington
df9ce18e36 Merge branch 'mlin/PR/IOS-2347' into release/5.35.2 2022-04-18 12:16:42 -07:00
Michelle Linington
cf584f77c4 Downgrade our build machine to use 13.2
This should address an issue where multiple users are seeing crashes
when trying to invoke some method on Set. This looks related to this
issue: https://bugs.swift.org/browse/SR-16096

The linked issue indicates that this is an issue with builds compiled
against Swift 5.6 but linked against Swift 5.5 at runtime. To fix this,
we should revert to building Signal with Swift 5.5 until Xcode includes
the Swift 5.6.1 patch.
2022-04-18 11:50:27 -07:00
Michelle Linington
d6cc4c80ac "Bump build to 5.35.1.7." (Internal) 2022-04-18 10:45:53 -07:00
Nora Trapp
a4d7d8416c "Bump build to 5.36.0.15." (nightly-04-18-2022) 2022-04-18 04:00:37 -07:00
Nora Trapp
c4009cc24b "Bump build to 5.36.0.14." (Internal) 2022-04-17 17:27:45 -07:00
Nora Trapp
c4851e4c5c "Bump build to 5.36.0.13." (nightly-04-17-2022) 2022-04-17 04:00:34 -07:00
Nora Trapp
ac38841e4c "Bump build to 5.36.0.12." (Internal) 2022-04-16 22:37:59 -07:00
Nora Trapp
caeb55b8d4 "Bump build to 5.36.0.11." (nightly-04-16-2022) 2022-04-16 04:00:31 -07:00