Commit Graph

57 Commits

Author SHA1 Message Date
Matthew Chen
1454773d99 Respond to CR. 2019-04-25 09:54:49 -04:00
Michael Kirk
64a0c4bfaa auto-migrate to Swift5 2019-04-04 13:44:42 -06:00
Matthew Chen
882dd16d7c Apply presentAlert() throughout codebase. 2019-03-21 10:55:04 -04:00
Matthew Chen
cc117b385c Modify environment accessors to use our 'shared' convention. 2018-09-07 16:20:59 -04:00
Matthew Chen
3a12446be8 Modify environment accessors to use our 'shared' convention. 2018-09-07 16:20:41 -04:00
Matthew Chen
5b50e81b4f Rename fail macros in Swift. 2018-08-27 10:27:48 -04:00
Matthew Chen
7be8f30877 Apply -> Never. 2018-08-27 10:21:03 -04:00
Matthew Chen
cf6f3841a8 Apply new Swift logging. 2018-08-27 10:02:28 -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
82e559d11b Use swift macros for main thread assert 2018-08-23 10:29:49 -06:00
Matthew Chen
26001e49d1 Unify log tags. 2018-08-15 10:24:29 -04:00
Matthew Chen
d34f83b445 Refine theme. 2018-08-08 15:04:23 -04:00
Matthew Chen
8da96e979c Refine theme. 2018-08-08 15:04:23 -04:00
Matthew Chen
5b5ef7e0bf Respond to CR. 2018-07-05 17:27:37 -04:00
Matthew Chen
1412998b4a Rework isRTL. 2018-07-02 15:27:24 -04:00
Michael Kirk
104e63ded9 remove appearance juggling 2018-06-29 16:27:37 -06:00
Matthew Chen
f63d25a172 Migrate to Swift 4. 2018-05-30 15:05:02 -04:00
Matthew Chen
916d55c55d Migrate to Swift 4. 2018-05-30 15:05:02 -04:00
Matthew Chen
28f7142a59 Auto-migration to Swift 4. 2018-05-30 15:05:02 -04:00
Michael Kirk
c3274f4e7b Fix navbar after using message button in contact card
I removed this earlier - but turns out we still need this strong
reference, even though we're now using willDissapear instead of
didDissappear.

// FREEBIE
2018-05-15 17:03:38 -04:00
Michael Kirk
117d7319d2 Add contact modally and restore navbar style when dismssing contacts
// FREEBIE
2018-05-14 18:40:56 -04:00
Michael Kirk
704a6f55a0 Fix crash after canceling "Add New Contact"
Text of the exception is:
  "Impossible to set up layout with view hierarchy unprepared for constraint"

Since their container view is pinned to the top layout guide, this
should not change the layout.

// FREEBIE
2018-05-14 14:03:25 -04:00
Matthew Chen
c05c1ac879 Always show 'add to contacts' button. 2018-05-10 13:35:41 -04:00
Matthew Chen
cb7f28ed34 Use dark status bar in contact view. 2018-05-10 12:17:25 -04:00
Matthew Chen
6460493669 Surface organization name in contact view. 2018-05-10 12:05:07 -04:00
Michael Kirk
609746abec clarify naming
// FREEBIE
2018-05-10 11:31:22 -04:00
Matthew Chen
65a516685d Fix l10n strings. 2018-05-09 17:53:40 -04:00
Matthew Chen
b4d24f1c72 Refine field actions in contact view. 2018-05-09 17:52:36 -04:00
Michael Kirk
ad4e4b0c4c return navbar after tapping message/call buttons
// FREEBIE
2018-05-09 16:01:12 -04:00
Michael Kirk
42109593af Remove fromViewController state from ContactShareViewHelper
// FREEBIE
2018-05-09 10:21:00 -04:00
Michael Kirk
77bbbad70c Remove contactShare state from ContactShareViewHelper
// FREEBIE
2018-05-09 10:21:00 -04:00
Matthew Chen
c2adf624ea Respond to CR. 2018-05-08 17:22:34 -04:00
Matthew Chen
44ceee5849 Add contact share actions to conversation view and improve phone number parsing. 2018-05-08 17:22:34 -04:00
Matthew Chen
01bfa8dfc4 Apply contact share assets. 2018-05-08 16:56:08 -04:00
Matthew Chen
7f1cbd9277 Respond to CR. 2018-05-07 16:19:13 -04:00
Matthew Chen
50c49baca8 Update design of 'approve contact share' view. 2018-05-07 16:18:22 -04:00
Matthew Chen
b0c4ad7f63 Apply design changes from Myles. 2018-05-07 16:17:16 -04:00
Matthew Chen
4e07895853 Apply design changes from Myles. 2018-05-07 16:17:16 -04:00
Matthew Chen
5f1941f6aa Apply design changes from Myles. 2018-05-07 16:17:16 -04:00
Michael Kirk
45f91ead44 Use actual avatar in ContactViewController
// FREEBIE
2018-05-07 12:08:41 -04:00
Michael Kirk
77fc5571fb Implement avatar sending
// FREEBIE
2018-05-07 12:08:41 -04:00
Michael Kirk
5ba5e98260 Show downloaded contact avatar in thread
// FREEBIE
2018-05-07 12:08:41 -04:00
Matthew Chen
2c6f18fa6e Clean up ahead of PR. 2018-05-04 18:13:22 -04:00
Matthew Chen
7a9acce504 Add contact share approval view. 2018-05-04 18:13:22 -04:00
Matthew Chen
6e18d84a10 Add contact share approval view. 2018-05-04 18:13:22 -04:00
Matthew Chen
4fcbfe0e12 Fix merge breakage. 2018-05-04 16:20:33 -04:00
Matthew Chen
1fc401d200 Respond to CR. 2018-05-04 13:34:11 -04:00
Matthew Chen
bff6c84403 Clean up ahead of PR. 2018-05-04 13:21:53 -04:00
Matthew Chen
72102cd5fa No navigation bar in Contact view, custom back button, fix scrolling. 2018-05-04 13:21:53 -04:00
Matthew Chen
575573ef6b Let users pick recipient id for actions in contact view. 2018-05-04 13:21:53 -04:00