Commit graph

126 commits

Author SHA1 Message Date
Michael Kirk
11afc967d2 move NotificationsManager behind NotificationsAdapter 2019-02-01 17:44:13 -07:00
Michael Kirk
df79fc9ed0 Move String+OWS into SSK
name Switcharoo String+OWS/String+SSK categories to reflect where they live.
2018-12-20 09:54:08 -07:00
Matthew Chen
eb2e16872e Distinguish 'app will/did become ready' events. 2018-11-05 09:04:57 -05:00
Michael Kirk
3560f3be5c Durable send operation
TODO
-[x] respect order of queue
-[x] replacements
  -[x] those w/o completion handler
  -[x] basic send+log operation persists
  -[x] send+ui completion
  -[x] share extension
  -[x] update state jobs
-[x] App Lifecyle
  -[x] settable
  -[x] Mark as ready on startup
  -[x] Fail appropriate jobs on startup

NICE TO HAVE
-[x] concurrent per senders
-[ ] longer retry (e.g. 24hrs)
-[ ] App Lifecyle
  -[x] retry failed jobs on startup?
  -[ ] reachability

DONE
-[x] basic passing test
-[x] datamodel
-[x] queue/classes
2018-10-25 11:54:59 -06:00
Matthew Chen
829851bd7b Hang PushManager on AppEnvironment. 2018-10-16 11:47:54 -04:00
Matthew Chen
0b4ed1175d Create AppEnvironment. 2018-10-15 15:08:37 -04:00
Matthew Chen
0125535d4d Pull out SignalCoreKit. 2018-10-01 09:06:40 -04:00
Matthew Chen
e1db60c1c0 Rework creation of singletons. 2018-09-19 15:11:26 -04:00
Matthew Chen
b883209f91 Refine logging. 2018-09-18 16:35:12 -04:00
Matthew Chen
3a12446be8 Modify environment accessors to use our 'shared' convention. 2018-09-07 16:20:41 -04:00
Matthew Chen
cc5a480baa Apply OWS log functions in Objective-C. 2018-08-27 12:58:52 -04:00
Matthew Chen
3a50377902 Apply OWS log functions in Objective-C. 2018-08-27 12:58:52 -04:00
Matthew Chen
713606271c Rename fail macros in Obj-C. 2018-08-27 10:29:51 -04:00
Michael Kirk
7e8b2e3034 Faster conversation presentation.
There are multiple places in the codebase we present a conversation.

We used to have some very conservative machinery around how this was done, for
fear of failing to present the call view controller, which would have left a
hidden call in the background. We've since addressed that concern more
thoroughly via the separate calling UIWindow.

As such, the remaining presentation machinery is overly complex and inflexible
for what we need.

Sometimes we want to animate-push the conversation. (tap on home, tap on "send message" in contact card/group members)
Sometimes we want to dismiss a modal, to reveal the conversation behind it (contact picker, group creation)
Sometimes we want to present the conversation with no animation (becoming active from a notification)

We also want to ensure that we're never pushing more than one conversation view
controller, which was previously a problem since we were "pushing" a newly
constructed VC in response to these myriad actions. It turned out there were
certain code paths that caused multiple actions to be fired in rapid succession
which pushed multiple ConversationVC's.

The built-in method: `setViewControllers:animated` easily ensures we only have
one ConversationVC on the stack, while being composable enough to faciliate the
various more efficient animations we desire.

The only thing lost with the complex methods is that the naive
`presentViewController:` can fail, e.g. if another view is already presented.
E.g. if an alert appears *just* before the user taps compose, the contact
picker will fail to present.

Since we no longer depend on this for presenting the CallViewController, this
isn't catostrophic, and in fact, arguable preferable, since we want the user to
read and dismiss any alert explicitly.

// FREEBIE
2018-08-24 08:54:23 -06:00
Michael Kirk
c05700fd98 Log in OWSFail
step 1: rename OWSFail->OWSFailNoProdLog
step 2: rename OWSProdLogAndFail->OWSFail
step 3: Convert OWSFailNoProdLog->OWSFail where we want logging
step 4: Rename OWSCFail->OWSCFailNoProdLog
step 5: Rename OWSProdLogAndCFail -> OWSCFail
step 6: Convert OWSCFailNoProdLog -> OWSCFail where we want logging
2018-08-09 15:30:19 -06:00
Michael Kirk
3eb7e9271e Fix: second reply from lockscreen doesn't send
// FREEBIE
2018-07-06 17:56:05 -06:00
Matthew Chen
6bc145ce3a Fix more build warnings. 2018-06-01 17:37:06 -04:00
Matthew Chen
3cd6a33aa6 Fix build warnings. 2018-06-01 12:39:13 -04:00
Matthew Chen
91d54360ba Add contact view. 2018-05-03 14:09:54 -04:00
Matthew Chen
89abe79c78 Respond to CR. 2018-04-24 13:43:38 -04:00
Matthew Chen
c5981b164b Notify users of corrupt messages. 2018-04-24 13:41:44 -04:00
Matthew Chen
af2539f473 Rework archived conversations mode of home view. 2018-04-24 11:29:24 -04:00
Michael Kirk
1d4c0624be Clarify variable names
// FREEBIE
2018-04-09 12:47:56 -04:00
Michael Kirk
b6409dd514 CR: formatting changes
// FREEBIE
2018-04-04 10:59:06 -04:00
Michael Kirk
bf401bad90 Send quoted messages
MVP

- [x] populate from menu
- [x] send quoted message

TODO

- [] thumbnail
- [] paperclip icon showing for text message
- [] cancel button asset
- [] fonts
- [] colors
- [] adjust content inset/offset when showing quote edit

NICE TO HAVE

- [] animate presentation
- [] animate dismiss
- [] non-paperclip icon for generic attachments

// FREEBIE
2018-04-04 10:59:04 -04:00
Michael Kirk
319e0d808f Merge tag '2.21.0.14' into release/2.22.0 2018-03-08 10:40:56 -05:00
Michael Kirk
bbdcd0c768 Call connection fixups
callUIAdapter is not a singleton (for better or for worse)

No one should hold a reference directly to it, but rather via the
CallService, which is a singleton

Wait a bit longer for initial call screen before terminating. Especially
first call can hit this limit.

When call *does* take too long to show, terminate properly to ensure
we're not left with a phantom call

// FREEBIE
2018-03-07 18:09:07 -05:00
Matthew Chen
d6f4db1523 Rename TSStorageManager to OWSPrimaryStorage. 2018-03-06 17:12:13 -03:00
Matthew Chen
e12a1e984a Work on two-factor auth settings UI. 2018-03-01 15:38:59 -05:00
Matthew Chen
99aedca45f Strip out special casing for pre-iOS 9 users. 2018-02-26 14:13:38 -05:00
Matthew Chen
d648a258d1 Merge branch 'hotfix/2.19.7' 2018-02-16 10:49:52 -05:00
Matthew Chen
abfd333a17 Address Indic script crash. 2018-02-16 10:19:47 -05:00
Matthew Chen
f9f60bc14f Ensure app delegate hooks are ignored until app is ready. 2018-01-30 10:31:13 -05:00
Matthew Chen
b21f793756 Register all database views asynchronously. 2018-01-30 10:30:28 -05:00
Matthew Chen
9258b0883e Clean up TSStorageManager usage. 2017-12-19 11:41:31 -05:00
Matthew Chen
85686d3144 Continue TSStorageManager refactor. 2017-12-19 11:41:30 -05:00
Matthew Chen
9a990b58e8 Respond to CR. 2017-12-19 11:38:25 -05:00
Matthew Chen
b4e8df79da Migrate environment to SignalMessaging. 2017-12-05 10:29:29 -05:00
Matthew Chen
c817aa51b3 Migrate environment to SignalMessaging. 2017-12-05 10:28:46 -05:00
Matthew Chen
21e9f57cbe Imitate Android's behavior of delaying local notifications based on incoming sync messages. 2017-11-16 10:18:02 -05:00
Matthew Chen
6e840ff956 Fix build warnings from XCode 9. 2017-11-09 02:52:44 -05:00
Matthew Chen
03241128f6 Respond to CR.
// FREEBIE
2017-11-06 12:37:15 -05: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
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
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
Matthew Chen
e0194fd605 Allow multiple simultaneous GIF downloads.
// FREEBIE
2017-10-02 13:37:32 -04:00
Michael Kirk
344903fa5b Show proper thread from notification
// FREEBIE
2017-09-28 14:55:13 -04:00
Matthew Chen
ee13084d5c Respond to CR.
// FREEBIE
2017-09-27 14:05:21 -04:00
Matthew Chen
ffe44e68be Refactor linked device read receipts.
// FREEBIE
2017-09-27 13:17:43 -04:00
Matthew Chen
7268bde506 Add stress group to debug UI.
// FREEBIE
2017-09-22 10:30:35 -04:00