Commit Graph

30628 Commits

Author SHA1 Message Date
Evan Hahn
47480b7eee Speed up "mark read locally" optimization check
This should cause no change in behavior.

We had logic like this pseudocode:

```
unreadCount = db.countUnreadMessages()
messagesWithUnreadReactionsCount = db.countMessagesWithUnreadReactions()
if unreadCount == 0 && messagesWithUnreadReactionsCount == 0 {
  // Avoid unnecessary writes.
  return
}

db.markMessagesRead()
```

This optimization works but has two problems:

1. We don't actually need the count. We just need to know whether
   anything exists.
2. If there are unread messages, we should do the cleanup regardless,
   and we don't need to do the second check query.

Now the pseudocode looks like this:

```
if db.hasUnreadMessages() || db.hasMessagesToMarkRead() {
  // Avoid unnecessary writes.
  return
}

db.markMessagesRead()
```
2023-03-30 10:22:50 -05:00
Evan Hahn
fd37f7b0ac Account data report: export a file 2023-03-30 10:22:25 -05:00
Evan Hahn
6598f53d3f
Swiftify AppVersion.compare
I also require all version components to be unsigned integers, so `1.-2`
is now effectively `1.0`.
2023-03-30 10:19:59 -05:00
Harry
b07c02d791
Prevent looping when hitting reglock in new registration 2023-03-30 08:55:29 -05:00
automated-signal
60bb64d7ba "Bump build to 6.20.0.1." (nightly-03-30-2023) 2023-03-30 04:00:25 -07:00
Max Radermacher
d047a669fa
Remove throws_ handling for incoming messages 2023-03-29 18:40:30 -07:00
Max Radermacher
aaf1d0e0b6
Clean up SignalRecipient create & fetch APIs 2023-03-29 18:40:05 -07:00
Max Radermacher
dc4c9fe1d6
Swiftify verification state processing logic 2023-03-29 17:37:02 -07:00
Max Radermacher
38236e9f8f Run all precommit steps even when some fail 2023-03-29 16:00:27 -07:00
Harry
7266b45839
Remove obsolete PNI TODO 2023-03-29 15:38:35 -07:00
Evan Hahn
b042c42732 Remove new registration build target
This change should have no user impact.

Now that registration is enabled for all builds (see
53046e41cd), we can remove this build
target.
2023-03-29 17:02:10 -05:00
Igor Solomennikov
17850cb3ec
Fix double (+) button in media composer flow 2023-03-29 15:00:00 -07:00
Evan Hahn
227340ce92 Account data report: show loading spinner
I recommend reviewing this with whitespace changes disabled because a
lot of stuff was indented but not otherwise changed.
2023-03-29 15:53:18 -05:00
Max Radermacher
fce112751a Swiftify sync request message handling 2023-03-29 13:39:22 -07:00
Evan Hahn
a87d2853c1 Account data report: confirm before sharing export 2023-03-29 14:52:02 -05:00
sashaweiss-signal
36cb2e30ed "Bump build to 6.20.0.0." (nightly-03-29-2023) 2023-03-29 10:31:10 -07:00
sashaweiss-signal
82b7aae5ad Update translations 2023-03-29 10:30:47 -07:00
sashaweiss-signal
991f3b96e8 Update release notes 2023-03-29 10:25:25 -07:00
Harry
d0b8d1b446
Dont animate a pop away from a reg loading view controller 2023-03-29 09:30:40 -07:00
Harry
f7bc793ae9
Make SystemStoryManagerTest synchronous to end its reign of flaky terror
* Use schedulers with ChainedPromise

* Add full queue initializer redirection in Schedulers

* pass scheduler to OWSURLSession

* Use schedulers in SystemStoryManager

* make SystemStoryManagerTest synchronous
2023-03-29 08:47:49 -07:00
Evan Hahn
0d6da58045
Add very basic account data export functionality
The UI is not ready for release, but the basic parts are there.
2023-03-29 10:34:12 -05:00
automated-signal
3a67b6aacb "Bump build to 6.19.0.7." (nightly-03-29-2023) 2023-03-29 04:01:21 -07:00
Evan Hahn
e938ddb591
Add more debug logging for new registration 2023-03-28 21:08:06 -05:00
Harry
53046e41cd
Enable new registration on all builds 2023-03-28 17:38:06 -07:00
Harry
5e37c2f8f9
Updates for verification code entry screen
* Move resend code buttons above keyboard

* add showHelpText to verification code screen state

* hook up help button, does nothing yet

* show help bottom sheet

* lint

* pr feedback
2023-03-28 17:31:58 -07:00
Harry
4f01be0082
Clean up some error handling for registration verification code exhausting attempts
* show back to back errors on verification code screen

* handle verification code attempts exhausted

* let the user resend a code after submission attempts are exhausted

* clear last digit after an incorrectly entered verification code

* wipe errors and allow proceeding when changing e164

* lint
2023-03-28 17:06:29 -07:00
Evan Hahn
c298d7914d
New registration: hide back button in more cases
Specifically, on the CAPTCHA and code verification screens.
2023-03-28 15:18:09 -07:00
Harry
3a78f30ed9
Registration cleanup
* Don't wipe local kbs state when kbs stuff fails for change number; its still valid for the old number

* remove remaining error sheet todos

* fix tests
2023-03-28 14:23:41 -07:00
Harry
e538b76bc5
Show errors for various timeouts during registration
* add error message for rate limiting as it appears in mocks

* update colors in verification code view when theme changes

* Set validation state when we can't submit a verification code yet

* show alert when trying to submit verification code too many times

* handle changing e164 once we have a session

* Handle rate limit for recovery password based registration

* handle rate limit for session based createAccount/changeNumber request

* lint
2023-03-28 13:56:25 -07:00
Sasha Weiss
d5583c059e
Skip offering blocked threads in the ConversationPicker 2023-03-28 12:50:39 -07:00
Sasha Weiss
2eed6927c8
Check if we have a TSGroupMember before inserting in migration 2023-03-28 12:31:33 -07:00
Sasha Weiss
e46307f989
Fall back to snapshot if group change proto has incompatible revision 2023-03-28 12:10:26 -07:00
Evan Hahn
95df4819da
New registration: "Skip and Create New PIN" action 2023-03-28 13:13:24 -05:00
Evan Hahn
5083361aaf Swiftify AppVersion.iosVersionString 2023-03-28 12:43:26 -05:00
Igor Solomennikov
eed90ed89c
Fix some C warnings.
* A function declaration without a prototype is deprecated in all versions of C
* No previous prototype for function `xxx`.
2023-03-28 10:27:03 -07:00
Evan Hahn
2f90a7ef60 "Bump build to 6.19.0.6." (Internal) 2023-03-28 10:52:28 -05:00
Evan Hahn
7cf71793f8 New registration: let users submit debug logs during the process 2023-03-28 10:27:00 -05:00
Harry
7ba5f7384a
Handle being de-registered while still in the middle of registration
* put rereg mode params into a struct for sharability

* add step and UI handling for when we become deregistered during post-reg steps

* handle dereg when syncing push tokens

* show generic error on kbs backup failure

* handle dereg when restoring from kbs

* handle dereg during profile setup steps

* finalize pni stuff before deregistering

* add comment

* change debug fail to log

* Navigate to verification vc before showing popup so that we don't cancel the nav controller pop

* send a session sms code even if we get interrupted right after session creation

* improve state handling for initial session sms code

* nit: make var fileprivate

* show error when state changed on screen
2023-03-28 07:50:56 -07:00
Harry
ab186dbe31
Persist failed pin restoration state across registration "paths" 2023-03-28 08:05:57 -05:00
Harry
545dffd408
New registration: don't say you can continue with new PIN when you can't 2023-03-28 08:04:22 -05:00
automated-signal
e3a17e6859 "Bump build to 6.19.0.5." (nightly-03-28-2023) 2023-03-28 04:01:16 -07:00
Harry
580312e4c7
Remove todo for update account attributes error 2023-03-27 17:09:39 -07:00
Igor Solomennikov
7a717b9c35
Fix an error and some warnings in Xcode 14.3
* Fix name collision.

`UIView.autoPinEdgesToSuperviewEdges(withInsets:)` declared in SignalUI
was doing the same thing as `-[UIView autoPinEdgesToSuperviewEdgesWithInsets:]`
in PureLayout. Xcode 14.3 has started treating this ObjC name collision as an error.

* Fix warnings that would be errors in Swift 6.
2023-03-27 16:36:43 -07:00
Harry
477729a502
Show error on registration captcha rejection; be prepared to handle repeat captchas 2023-03-27 16:30:48 -07:00
Evan Hahn
113bf85eab
Enable new registration for internal builds 2023-03-27 16:30:21 -07:00
Max Radermacher
fd5abb66f7 Fix a few warnings 2023-03-27 16:30:09 -07:00
Harry
02388aac62
Clarification for already handled error cases for new registration
* update comment for reg recovery pw create account handling

* handle prekey generation failure
2023-03-27 16:29:15 -07:00
Evan Hahn
e02273e3ea New registration: better error on challenge submission server error
Similar to 7c9e8f64f2.
2023-03-27 17:53:45 -05:00
Evan Hahn
17cb6756ae
New registration: show generic error for "session invalidated" errors 2023-03-27 17:39:19 -05:00
Igor Solomennikov
b6ba857767 Bring vertical spacing between UI elements in media viewer's bottom panel up to spec. 2023-03-27 15:24:56 -07:00