Commit graph

258 commits

Author SHA1 Message Date
Matthew Chen
7429e1968c Clean up ahead of PR. 2017-11-30 09:49:01 -05:00
Matthew Chen
edaf65223a Migrate to shared data NSUserDefaults. 2017-11-30 09:49:01 -05:00
Michael Kirk
2c4cf96515 Some proof of framework integration in the sample share extension
// FREEBIE
2017-11-29 13:58:27 -08:00
Michael Kirk
de028404bb Shared framework between app and extension
// FREEBIE
2017-11-29 13:58:27 -08:00
Matthew Chen
a6bfc0a60e Fix build warnings from XCode 9. 2017-11-09 02:52:44 -05:00
Matthew Chen
204902c111 Respond to CR.
// FREEBIE
2017-11-06 12:50:20 -05:00
Matthew Chen
03241128f6 Respond to CR.
// FREEBIE
2017-11-06 12:37:15 -05:00
Matthew Chen
1ea413ad48 Be more defensive about handling local notifications.
// FREEBIE
2017-11-06 11:14:31 -05:00
Matthew Chen
5af6b6f213 Respond to CR.
// FREEBIE
2017-10-26 11:53:35 -04:00
Michael Kirk
c5244e175e orphan cleanup shouldn't happen until DB is registered
// FREEBIE
2017-10-21 18:16:52 -07:00
Michael Kirk
6a65ee6def Pull to refresh on homeview fetches messages.
This is useful when you're using censorship circumvention and unable to
receive push notifications.

// FREEBIE
2017-10-16 12:25:07 -07:00
Michael Kirk
9a7e3cb9d8 Register for manual message fetching when unable to obtain push tokens
// FREEBIE
2017-10-12 12:02:22 -04:00
Michael Kirk
df15c904bc Rework push registration
== Account Registration ==

Not complete until push tokens are uploaded

== Remote Notifications Registration ==

Extracted from PushManager

- wait for notification-settings registration to complete before
  requesting push tokens, otherwise it's possible token requests will
  be ignored.

- Less state required for push notification callbacks, specifically, we
  no longer need to ensure we've created a promise before the
  registration delegate methods get called.

- no more TOCFuture in Signal-iOS (still in SSK for now). It's not in
  cases of inexplicable behavior - one a recently, push notification
  premature free, in redphone, and more popular use, and I've seen two
  futures inexplicably being nil.  Instead, let's consolidate around
  PromiseKit for popularly used, maintained, strongly-typed futures.

- separate logic for registering for vanilla push/voip notifications
  (few dependencies) from responding to UILocalNotifications (lots of
  dependencies). Ultimately I'd like to consolidate the remaining
  UILocalNotifications logic with the existing NotificationsManager

== Misc ==

more debug logging
more uniform logging
remove stale logic around newly registered user

// FREEBIE
2017-10-12 12:02:22 -04:00
Michael Kirk
b5258be9b5 respond to code review
// FREEBIE
2017-10-10 11:33:40 -04:00
Michael Kirk
876521f4c3 Fetch messages sooner when launched from background
The only reason a notification wakes/launches the app is to fetch
messages.

However, upon launching, especially if the app had been killed, it can
take a second or two before being notified of the notification that woke
us. Rather than wait, just fetch messages ASAP.

// FREEBIE
2017-10-10 11:33:40 -04:00
Michael Kirk
c7cfe188ee Sync push tokens on background launch as well
// FREEBIE
2017-10-10 11:33:40 -04:00
Matthew Chen
10c00501fd Fix the "is contact" test.
// FREEBIE
2017-10-02 17:38:54 -04:00
Matthew Chen
f001e8c225 Respond to CR.
// FREEBIE
2017-09-25 17:22:27 -04:00
Matthew Chen
b4312a5619 Merge remote-tracking branch 'origin/hotfix/2.16.1' 2017-09-24 20:49:13 -04:00
Matthew Chen
825503210b Remove extraneous database view.
// FREEBIE
2017-09-22 14:24:17 -04:00
Matthew Chen
11cadf4200 Send, receive & show read receipts to senders/from receivers.
* Send read receipts to senders.
* Honor "send read receipts" preference.
* Process read receipts from recipients.
* Refactor "mark as read" logic.
* Serialize and apply recipient read receipts received before sync transcript.
* Show recipient read receipts in conversation view.

// FREEBIE
2017-09-22 14:24:17 -04:00
Matthew Chen
1c8dbcd223 Respond to CR.
// FREEBIE
2017-09-21 16:58:07 -04:00
Matthew Chen
3eaeb4e0ec Add read receipts manager.
* Simplify read receipts plumbing.
* Rework incoming read receipts handling.
* Rework outgoing read receipts handling.
* Make "database view registration complete" check thread-safe.
* Don't send sync messages to self if no linked devices.

// FREEBIE
2017-09-21 16:23:03 -04:00
Matthew Chen
b28c4b74b2 Pull out TSMessageDecrypter class.
// FREEBIE
2017-09-21 14:38:30 -04:00
Michael Kirk
73bdae3366 Fix 1-time crash when launching 2.16 from notification
didBecomeActive is too late in the case of launching from a
notification.

Also, start tracking when app setup is complete, and prevent certain
actions from occurring in that case. Eventually we'll enqueue these
actions rather than ignoring them, but we'll want to do more testing
before releasing that. In the meanwhile, if the environment isn't setup
at this point, a crash would be eminent anyway.

// FREEBIE
2017-09-20 13:26:32 -04:00
Matthew Chen
afc753e7ed Add batch message processor.
// FREEBIE
2017-09-20 09:24:49 -04:00
Matthew Chen
c498e4b354 Decouple message decryption and processing.
// FREEBIE
2017-09-20 09:24:49 -04:00
Matthew Chen
65732af3da New users opt-out of read receipts; legacy users opt-in.
// FREEBIE
2017-09-19 17:35:42 -04:00
Matthew Chen
80e5f281c6 Rename app preferences class.
// FREEBIE
2017-09-19 17:35:42 -04:00
Matthew Chen
3367292ba0 Merge branch 'hotfix/2.16.1' 2017-09-19 17:25:24 -04:00
Matthew Chen
f92b221e6b Startup logging.
// FREEBIE
2017-09-19 17:22:56 -04:00
Matthew Chen
70602e3bca Startup logging.
// FREEBIE
2017-09-19 17:22:56 -04:00
Matthew Chen
400f536e37 Respond to CR.
// FREEBIE
2017-09-19 09:30:01 -04:00
Matthew Chen
e222b9df68 Normalize conversation presentation logic.
// FREEBIE
2017-09-18 16:08:18 -04:00
Matthew Chen
b6d782046a Normalize conversation presentation logic.
// FREEBIE
2017-09-18 16:08:18 -04:00
Matthew Chen
0b772b3a37 Move post-registration work from view to app delegate.
// FREEBIE
2017-09-14 15:29:59 -04:00
Matthew Chen
ab00342d67 Add modal activity indicator view.
// FREEBIE
2017-09-11 12:49:14 -04:00
Matthew Chen
9dfebb2d4b Apply OWSFail() in more places.
// FREEBIE
2017-09-11 10:20:48 -04:00
Matthew Chen
c21a7673c8 Rework preservation of attachment filenames.
// FREEBIE
2017-09-11 10:20:48 -04:00
Matthew Chen
69816cdf0e Convert DataSource to Objective-C.
// FREEBIE
2017-09-11 10:20:48 -04:00
Matthew Chen
2282733fa9 Add data source class.
// FREEBIE
2017-09-11 10:20:48 -04:00
Matthew Chen
948da2afbb Merge remote-tracking branch 'origin/release/2.16.0' 2017-09-07 15:20:45 -04:00
Michael Kirk
04bf548a7b Fix one-time crash when opening thread without having a local profile
// FREEBIE
2017-09-07 13:24:15 -04:00
Matthew Chen
928525c31e Rename home view.
// FREEBIE
2017-09-06 13:59:39 -04:00
Matthew Chen
3c90c3361a Respond to CR.
// FREEBIE
2017-08-29 16:31:27 -04:00
Matthew Chen
71d7490e35 Re-sync local profile state with service if necessary.
// FREEBIE
2017-08-29 16:29:54 -04:00
Michael Kirk
1f3d2d1ed6 Send any profile key in contact sync
// FREEBIE
2017-08-29 10:35:18 -04:00
Michael Kirk
b579ea5915 Use profile name when building avatar if contact name is unavailable
// FREEBIE
2017-08-25 12:40:19 -04:00
Matthew Chen
98eb4693c5 Rework the contact offers.
// FREEBIE
2017-08-21 17:05:42 -04:00
Matthew Chen
08347478a2 Implement alternative approach to veto-able back buttons.
// FREEBIE
2017-08-21 10:10:22 -04:00