Commit graph

2243 commits

Author SHA1 Message Date
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
464b854eb1 CR: follow naming conventions 2018-08-23 10:38:54 -06:00
Michael Kirk
9c9f3875a7 Link styling 2018-08-23 10:38:20 -06:00
Michael Kirk
5148747c12 clean up long text VC 2018-08-23 10:38:20 -06:00
Michael Kirk
82e559d11b Use swift macros for main thread assert 2018-08-23 10:29:49 -06:00
Michael Kirk
781c535327 weak capture self 2018-08-23 10:18:23 -06:00
Michael Kirk
fc7dc03cee don't block main thread during search
// FREEBIE
2018-08-23 10:18:23 -06:00
Matthew Chen
b75bc27d55 Respond to CR. 2018-08-22 16:37:01 -04:00
Matthew Chen
c6132249e6 Respond to CR. 2018-08-22 16:32:44 -04:00
Matthew Chen
cb827169fb Respond to CR. 2018-08-22 16:30:12 -04:00
Michael Kirk
eaf8d789fb Darken message actions overlay in dark theme 2018-08-22 12:59:34 -06:00
Michael Kirk
e4b7d253a3 Theme "no results" cell 2018-08-22 12:24:21 -06:00
Michael Kirk
e435358bfd Revert "Add custom themed search bar."
This reverts commit 8daaef22da.
2018-08-22 12:00:44 -06:00
Michael Kirk
32f8795342 media tile toolbar respects theme by using UIAppearance defaults 2018-08-21 12:53:35 -06:00
Michael Kirk
93cb378f7a constantize toast inset 2018-08-21 10:18:13 -06:00
Michael Kirk
75ead2ac09 quoted reply: distinguish "not found" vs. "no longer available" 2018-08-20 14:59:52 -06:00
Michael Kirk
c6f77ec6ea "Tap to retry" retries, rather than maybe deletes.
Attachment downloads can fail on slow networks or if the app crashes.
It's unlikely that the users response to this would be to delete the
attachment pointer, so it doesn't make sense to surface that as a
primary action.

If a user does want to delete the attachment, as always they can
long-press to delete.

// FREEBIE
2018-08-20 12:25:23 -06:00
Michael Kirk
8cd290ba2b fix section headers not appearing on iOS11/iPhoneX
// FREEBIE
2018-08-20 12:23:00 -06:00
Michael Kirk
92de745528 theme gallery section headers
// FREEBIE
2018-08-20 12:23:00 -06:00
Matthew Chen
8daaef22da Add custom themed search bar. 2018-08-17 12:43:35 -04:00
Matthew Chen
decb0c54ca Theme review. 2018-08-16 17:30:08 -04:00
Matthew Chen
d62e07d6f1 Theme review. 2018-08-16 17:30:08 -04:00
Matthew Chen
4ea5d9b849 Theme review. 2018-08-16 17:30:07 -04:00
Matthew Chen
be7482eb60 Tap to copy sender timestamp to clipboard. 2018-08-16 16:36:01 -04:00
Matthew Chen
f89fa8359b Revert "Add logging around 'SAE to same thread' crash."
This reverts commit eee2f7c8c6.
2018-08-16 16:09:00 -04:00
Matthew Chen
e3378dec65 Revert "Add logging around 'share from SAE to same conversation' crash."
This reverts commit f62bf7d18e.
2018-08-16 16:08:39 -04:00
Matthew Chen
f62bf7d18e Add logging around 'share from SAE to same conversation' crash. 2018-08-16 16:08:15 -04:00
Matthew Chen
eee2f7c8c6 Add logging around 'SAE to same thread' crash. 2018-08-16 13:34:07 -04:00
Matthew Chen
b347c40c66 Clean up ahead of PR. 2018-08-16 12:21:03 -04:00
Matthew Chen
0a7b3537b5 Recreate message database view when message mappings are corrupt. 2018-08-16 12:21:03 -04:00
Matthew Chen
db2f5bf3b0 Add temporary logging around conversation view crashes. 2018-08-16 12:21:03 -04:00
Matthew Chen
420f5f88ff Add logging, error checking and recovery around corrupt message mappings. 2018-08-16 12:21:03 -04:00
Matthew Chen
f261a47bd3 Hide home view search by default. 2018-08-16 11:42:31 -04:00
Matthew Chen
a76d488e8b Fix QA issues in theme. 2018-08-15 17:09:59 -04:00
Matthew Chen
22dda476bb Fix QA issues in theme. 2018-08-15 16:29:13 -04:00
Matthew Chen
4e276b1095 Apply 'insets fix' correctly in message details view. 2018-08-15 15:44:13 -04:00
Matthew Chen
b3c19b7905 Improve logging of conversation view exceptions. 2018-08-15 14:30:34 -04:00
Matthew Chen
26001e49d1 Unify log tags. 2018-08-15 10:24:29 -04:00
Michael Kirk
a1e8bb865c Larger jumbomoji 2018-08-10 16:57:45 -06:00
Michael Kirk
8829cdfb4b Toast view when tapped message doesn't exist, mark remotely sourced. 2018-08-10 16:55:54 -06:00
Michael Kirk
7a0d74c17e Use dark blur for navbar
In the light theme, using the "light" blur allows the bar to seem invisible
when over white content. Similarly for the "dark" blur over black content.
2018-08-10 16:52:55 -06:00
Michael Kirk
ebd2e6d5ac Tweak theme 2018-08-09 16:43:25 -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
Matthew Chen
4096d2e0d8 Respond to CR. 2018-08-09 14:05:21 -04:00
Matthew Chen
2fecb270e6 Cache footer timestamp size. 2018-08-09 14:03:03 -04:00
Matthew Chen
c91bc71ebd Cache sender name size. 2018-08-09 14:03:03 -04:00
Matthew Chen
3fc3425605 Theme search bars. 2018-08-09 14:02:29 -04:00
Matthew Chen
dd7e429318 Skip default implementation of preferredLayoutAttributesFittingAttributes. 2018-08-09 14:01:42 -04:00
Matthew Chen
0ac1cb1e72 Cache system message text. 2018-08-09 14:01:07 -04:00