Commit graph

691 commits

Author SHA1 Message Date
Michael Kirk
006021ea41 Fix: group color change doesn't immediately apply
Because we were fetching a new thread instance, instead of updating the
existing thread instance, classes which were bound to the old thread instance
weren't updating. This affected the HeaderView.AvatarView.thread and the
ConversationStyle.thread.
2018-10-01 17:06:09 -06:00
Matthew Chen
0125535d4d Pull out SignalCoreKit. 2018-10-01 09:06:40 -04:00
Michael Kirk
06eae47e09 ConversationViewItem -> protocol 2018-09-28 12:58:33 -06:00
Matthew Chen
ebae75af00 Revert 'new sort id'. 2018-09-27 19:40:51 -04:00
Michael Kirk
c21020d7e7 Use received date for footer-collapse supression 2018-09-26 09:52:34 -06:00
Michael Kirk
6f8eddc955 unread indicator uses sortId
- removed timestamp parameter. This wasn't totally obvious, previously we were tracking two pieces of state

1. `unreadIndicator.firstUnseenTimestamp`:
    the first unseen timestamp for a conversation that exists in the database
2. `unreadIndicator.timestamp`:
    the timestamp of the first interaction *after* the unread indicator that fits in the loading window

We don't actually need to track `2` because it was only used in a comparison like:

   viewItem.interaction.timestampForSorting >= unreadIndicator.timestamp

But by definition, unreadIndicator.firstUnseenTimestamp is always less than or
equal to unreadIndicator.timestamp. Put into terms of the `sortId` corallary,
the sortId of the first unseen interaction in the database is always less than
or equal to the sortId of the first unseen interaction that fits in the loading
window.

In other words, there's no situation where

   viewItem.interaction.sortId >= unreadIndicator.firstUnseenSortId
2018-09-26 09:52:34 -06:00
Michael Kirk
3240e0d9d0 Be explicit about receivedAt time
We were often using `timestampForLegacySorting`, which is convoluted for when
we actually just want received time.

In some sense this is a superficial change, but it's part of auditing that
we've completed moved away from timestampForLegacySorting.
2018-09-26 09:52:34 -06:00
Michael Kirk
b281b37637 replace thread.lastMessageDate/archivalDate -> thread.lastSortId, thread.archivedAsOfSortId
Update migration accordingly

Date shown on home view cell is message.receivedAt
2018-09-26 09:52:34 -06:00
Michael Kirk
90aa593dcd sortId vs. Read status 2018-09-26 09:52:33 -06:00
Michael Kirk
d6d6c4fca4 ConversationVC - lastSeenSortId 2018-09-26 09:52:33 -06:00
Michael Kirk
ab55e85304 step 1: timestampForSorting audit, change signature
No change in functionality in this commit, I just broke the signature to have a
systematic audit of the callsites. Added TODO's with the plan for each call.
2018-09-26 09:52:33 -06:00
Michael Kirk
df61316495 minimize diff senderTimestamp -> timestamp 2018-09-26 09:52:33 -06:00
Michael Kirk
00d0d1e002 Remove legacy Error backdating - no changes in functionality
Historically we would backdate the SN change messages, but since adopting
non-blocking SN changes long ago, they're already sorted properly by creation
time, so backdating has been unnecessary for a while.

I also audited that all other error messages are saved directly after creation.

I applied deprecation attributes as appropriate as I audited.
2018-09-26 09:52:33 -06:00
Michael Kirk
eef1368ad3 Timestamp audit step1: change signature
There is no change in functionality in this commit.

Apart from clarifying what the timestamp means (it's the timestamp of the
*sender*), this intentionally breaks all the call sites, so I could have a sane
way to thoroughly audit wherever we're passing in timestamps, to see where
we're depending on them to affect sort order.

For the sake of a cleaner diff of meaningful changes, instead of "fixing"
everything in this commit, I've just added comments and renamed signatures.
2018-09-26 09:52:33 -06:00
Matthew Chen
29bb69032a DRY up the debounce of db extension version increment. 2018-09-20 08:55:19 -04:00
Matthew Chen
e1db60c1c0 Rework creation of singletons. 2018-09-19 15:11:26 -04:00
Michael Kirk
920a82564f Merge tag '2.29.3.3' 2018-09-15 09:17:08 -05:00
Michael Kirk
2eca462efc can view conversation settings for left group 2018-09-12 19:16:14 -05:00
Michael Kirk
b1da5e93d9 group blocking v. conversation view 2018-09-12 19:16:14 -05:00
Michael Kirk
eadb04efcc WIP: ContactViewHelper incorporates group blocking
-[ ] UI
  -[ ] Conversation Settings
    -[x] Show switch for group
    -[ ] localize
    -[ ] migrate existing localizations? (nice to have)
    -[ ] can view conversation settings (but not edit them) in left group
    -[ ] special block copy for groups
    -[ ] special unblock copy for groups
  -[ ] ConversationViewHelper
   -[x] Track blocked groups
   -[ ] HomeView
   -[ ] ConversationView
   -[ ] Any others?
   -[ ] Rename? Extract BlockList cache?
  -[ ] Block List
    -[ ] Group Section
    -[ ] Unblock group
  -[ ] Interstitial interacting with blocked threads (e.g. thread picker)
    -[ ] BlockListUIUtils w/ thread
        -[x] Block
        -[x] Unblock
        -[ ] Replace usages where possible
        -[x] block manager
-[ ] Sync
  -[x] tentative protos
  -[ ] confirm protos w/ team
  -[x] send new protos
-[ ] Message Processing
  -[ ] Drop messages from blocked groups
2018-09-12 19:16:14 -05:00
Matthew Chen
df7acfeed3 Simplify OWSPreferences access. 2018-09-07 16:28:21 -04:00
Matthew Chen
3a12446be8 Modify environment accessors to use our 'shared' convention. 2018-09-07 16:20:41 -04:00
Matthew Chen
f9eab5cd24 Merge remote-tracking branch 'origin/release/2.29.2' 2018-09-07 15:27:50 -04:00
Michael Kirk
c7662b5a86 Step 2/2 %s/OWSAssert/OWSAssertDebug for existing previous assert semantics
Going forward, we want to prefer safer asserts, but we don't want to blindly
apply crashing asserts across the codebase
2018-09-07 10:00:48 -06:00
Matthew Chen
dc3467dcda Tidy up attachment usage. 2018-09-06 16:03:29 -04:00
Matthew Chen
498828f93c Rename AttachmentStream methods. 2018-09-06 15:30:00 -04:00
Michael Kirk
5d9cd86d13 size toolbar WRT draft 2018-09-04 10:38:43 -06:00
Matthew Chen
fac7f6932f Rename TSGroupMetaMessage enum values. 2018-09-04 09:30:01 -04:00
Matthew Chen
1cc0fbcb12 Elaborate logging around 'perform updates' crash. 2018-08-28 15:41:58 -04:00
Matthew Chen
f473f60111 Apply OWS log functions in Objective-C. 2018-08-27 12:58:52 -04:00
Matthew Chen
cc5a480baa Apply OWS log functions in Objective-C. 2018-08-27 12:58:52 -04:00
Matthew Chen
03829779cc Apply OWS log functions in Objective-C. 2018-08-27 12:58:52 -04:00
Matthew Chen
c0d486b1f1 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
Matthew Chen
b75bc27d55 Respond to CR. 2018-08-22 16:37:01 -04: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
Matthew Chen
decb0c54ca Theme review. 2018-08-16 17:30:08 -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
b3c19b7905 Improve logging of conversation view exceptions. 2018-08-15 14:30:34 -04: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
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
0ac1cb1e72 Cache system message text. 2018-08-09 14:01:07 -04:00
Matthew Chen
b3c62d91be Merge remote-tracking branch 'origin/release/2.28.1' 2018-08-08 13:51:52 -04:00
Michael Kirk
51b1761364 Fix crash during CollectionView thrash 2018-08-08 10:17:42 -06:00
Michael Kirk
7e5d9480b1 Add missing header file 2018-08-08 10:17:03 -06:00
Michael Kirk
2ea7e2b036 CR: clean up preferences 2018-08-08 10:04:59 -06:00
Michael Kirk
e5b3cbd00c Use StoreKit for reviews 2018-08-07 15:56:52 -06:00
Matthew Chen
faf3cd6a55 Fix lazy collapse of message cell footers. 2018-08-06 14:03:40 -04:00
Matthew Chen
cea93784b1 Avoid redundant content inset updates. 2018-08-06 09:08:54 -04:00
Matthew Chen
9b45a15c35 Merge branch 'release/2.28.1' 2018-08-06 09:01:19 -04:00
Matthew Chen
4918b8994e Delay footer collapse in new messages. 2018-08-03 15:57:54 -04:00
Matthew Chen
251eef46a2 Delay footer collapse in new messages. 2018-08-03 15:57:54 -04:00
Matthew Chen
dfc39b4a1d Tidy files. 2018-08-01 09:46:05 -04:00
Matthew Chen
e6bc37d941 Tidy files. 2018-08-01 09:46:05 -04:00
Matthew Chen
2c19474397 Tidy files. 2018-08-01 09:46:05 -04:00
Matthew Chen
8f55f53329 Tidy files. 2018-08-01 09:46:05 -04:00
Michael Kirk
103a8dc579 ubsan fixups 2018-07-31 17:42:20 -06:00
Michael Kirk
78ad597e44 Merge tag '2.28.0.15' 2018-07-31 17:36:37 -06:00
Matthew Chen
995c2f2a2a Refine 'new message' animations. 2018-07-31 16:04:22 -06:00
Matthew Chen
24d85898e1 Refine 'new message' animations. 2018-07-31 16:04:22 -06:00
Matthew Chen
026ef02ce5 Refine 'new message' animations. 2018-07-31 16:04:22 -06:00
Jesse Squires
6dc74ddcaf Fix some project warnings + other fixes
- Prefer checking `.isEmpty` rather than `.count == 0` for Swift collections (can be more optimal)
- Avoid comparing `BOOL` explicitly to `NO` (considered bad practice since `BOOL` is a `signed char`)
- Specify unused `SGX_FLAGS` as `__unused` to silence warnings
2018-07-31 09:48:58 -06:00
Matthew Chen
fa8a07abf1 Respond to CR. 2018-07-26 10:54:45 -04:00
Matthew Chen
7759c9ca0f Refine theme. 2018-07-26 09:42:48 -04:00
Michael Kirk
6e1c1a681b Merge tag '2.28.0.12' 2018-07-23 16:12:46 -06:00
Michael Kirk
2d4eb7d057 remove interactive 'swipe for info' 2018-07-23 13:08:41 -06:00
Matthew Chen
48975eaac8 Respond to CR. 2018-07-20 15:37:47 -04:00
Matthew Chen
d14f764b50 Streamline SignalRecipient. 2018-07-18 13:57:21 -04:00
Michael Kirk
ef9a0880ae Fix analyzer warnings 2018-07-18 10:24:08 -06:00
Michael Kirk
baacebc956 Enable (quick) static analyzer for normal builds
// FREEBIE
2018-07-18 10:24:08 -06:00
Michael Kirk
567f625902 touch instead of reload to make sure any adjacent bubbles are updated appropriately. 2018-07-17 09:53:45 -06:00
Michael Kirk
2c3f7db4e4 Only add one 'incoming message' unread indicator per foreground.
// FREEBIE
2018-07-17 09:53:45 -06:00
Michael Kirk
f2f3b9eaed reload cell after removing unread indicator
// FREEBIE
2018-07-17 09:53:45 -06:00
Michael Kirk
0847c0bafb ScrollToBottom accounts for top inset
// FREEBIE
2018-07-13 14:25:11 -06:00
Matthew Chen
687efabede Respond to CR. 2018-07-13 16:24:36 -04:00
Matthew Chen
96a8df5f88 Fix "new unread indicator animation" issue. 2018-07-13 16:21:57 -04:00
Matthew Chen
f69945ea20 Fix 'breaks vs. collapse' issue. 2018-07-13 16:21:57 -04:00
Michael Kirk
39bbcca738 CR: cleanup / copy tweak 2018-07-13 13:00:27 -06:00
Michael Kirk
dde2fd6f33 Hide menu window when vc dismisses.
Normally this isn't possible, just being paranoid.

// FREEBIE
2018-07-13 13:00:27 -06:00
Michael Kirk
82fdd5b883 Split out generic action sheet components
Keep the message specific components separte, so we could re-use the
MenuActionsViewController.
2018-07-13 13:00:27 -06:00
Michael Kirk
41c1c2fcd5 scroll focused view to maximize visability
// FREEBIE
2018-07-13 13:00:27 -06:00
Michael Kirk
ce3030917f MessageActions for info messages 2018-07-13 13:00:27 -06:00
Michael Kirk
210cba3e37 Media actions 2018-07-13 13:00:27 -06:00
Michael Kirk
2552368146 add text reply action, comment out more deprecated uimenu code 2018-07-13 13:00:27 -06:00
Michael Kirk
6079ae2439 show text details, dismiss before action to avoid problems when action presents 2018-07-13 13:00:27 -06:00
Michael Kirk
5c2a5b00aa comment 2018-07-13 13:00:27 -06:00
Michael Kirk
0c4cae133b milestone: route one real action (copy text) 2018-07-13 13:00:27 -06:00
Michael Kirk
57400e1ecb WIP: ActionView 2018-07-13 13:00:27 -06:00
Michael Kirk
18adf26e06 Don't present over navbar.
// FREEBIE
2018-07-13 13:00:27 -06:00
Michael Kirk
635c0275db stop observing db notifications while message actions are presented
This let's new messages appear after the message actions are dismissed without
complicating scroll state.
2018-07-13 13:00:27 -06:00
Michael Kirk
6275a2f102 Highlight focused view 2018-07-13 13:00:27 -06:00
Michael Kirk
aa98963fd9 Abandonded: separate window pattern
Hiding the old window, caused keyboard to resign first responder.
2018-07-13 13:00:27 -06:00
Michael Kirk
6037a440c9 wire up window mgmt 2018-07-13 13:00:27 -06:00
Matthew Chen
376e2cc1db Respond to CR. 2018-07-11 16:54:44 -04:00
Matthew Chen
ecafe546b6 Rework unread indicators. 2018-07-11 16:43:39 -04:00
Matthew Chen
8d72bb032e Rework unread indicators. 2018-07-11 16:43:39 -04:00
Matthew Chen
6d45d533ef Respond to CR. 2018-07-11 15:38:49 -04:00
Matthew Chen
e01579ed44 Tweak disappearing messages indicator. 2018-07-11 15:38:49 -04:00
Matthew Chen
158aa3abc4 Tweak system messages; incomplete vs. missed calls. 2018-07-11 15:34:16 -04:00
Matthew Chen
8b3bdb88f3 Revert "Merge branch 'charlesmchen/tweakCalls'"
This reverts commit 3e0233ea60, reversing
changes made to 74ce3012cf.
2018-07-11 15:34:16 -04:00
Michael Kirk
68ffd81390 Only show breaks between new days
// FREEBIE
2018-07-10 11:38:41 -06:00
Matthew Chen
41e505fb6f Tweak relative timestamps. 2018-07-09 16:33:03 -04:00
Michael Kirk
2763f7bd2d fix corner rounding for outgoing messages too 2018-07-09 12:19:13 -06:00
Michael Kirk
f8f0e4aa93 Fix rounding after date
// FREEBIE
2018-07-09 10:58:07 -06:00
Matthew Chen
1a9a5016fe Tweak calls. 2018-07-09 11:08:53 -04:00
Michael Kirk
0ecc97d5ff date header should break cluster 2018-07-06 15:31:04 -06:00
Michael Kirk
68c7abcbb9 Sharp corners 2018-07-06 14:57:28 -06:00
Michael Kirk
0f2c0dcd85 Only collapse footers within a cluster (from the same author) 2018-07-06 13:12:39 -06:00
Michael Kirk
a27ee19f4e Fix scroll offset for iPhoneX now that content is behind toolbar 2018-07-03 10:18:21 -06:00
Michael Kirk
94a23e63b6 resize bar after send 2018-07-03 10:18:21 -06:00
Matthew Chen
d932748cd3 Change timestamp format. Ensure we always have a date break between messages on different days. 2018-07-02 16:07:42 -04:00
Matthew Chen
1412998b4a Rework isRTL. 2018-07-02 15:27:24 -04:00
Matthew Chen
39eac9129b Respond to CR. 2018-07-02 15:25:43 -04:00
Matthew Chen
32f33f6d12 Tweak sender names. 2018-07-02 15:25:43 -04:00
Michael Kirk
5719aba91a separate icon vs. title color for toolbars 2018-06-29 17:47:04 -06:00
Michael Kirk
126d41e542 Fixup "scroll down" button so it doesn't fall behind toolbar 2018-06-29 16:58:26 -06:00
Michael Kirk
ee898829a1 fixup white nav 2018-06-29 16:49:24 -06:00
Michael Kirk
104e63ded9 remove appearance juggling 2018-06-29 16:27:37 -06:00
Michael Kirk
d5fa7f9b25 conversation view scrolls behind bars 2018-06-29 16:27:37 -06:00
Michael Kirk
f8abe32ae9 more styling to new nav colors 2018-06-29 16:27:37 -06:00
Michael Kirk
16df4f589e conversation colors
// FREEBIE
2018-06-29 11:52:41 -06:00
Matthew Chen
7d971f1b79 Rework view item configuration. 2018-06-28 15:06:09 -04:00
Matthew Chen
966e6a1156 Tweak sender names. 2018-06-27 13:18:31 -04:00
Matthew Chen
227234d8cb Respond to CR. 2018-06-27 13:15:31 -04:00
Matthew Chen
dc86bee5d1 Respond to CR. 2018-06-27 09:56:11 -04:00
Matthew Chen
16a1dcfb77 Respond to CR. 2018-06-27 09:53:45 -04:00
Matthew Chen
89523f556b Tweak intra-cell spacing. 2018-06-27 09:33:47 -04:00
Matthew Chen
33b1628c26 Rename to ConversationStyle. 2018-06-26 10:20:26 -04:00
Matthew Chen
4effa56d50 Tweak 'group sender' avatars. 2018-06-25 15:07:46 -04:00
Matthew Chen
fc299b8700 Use UI database connection throughout the conversation cells. 2018-06-25 13:08:10 -04:00
Matthew Chen
ac6f78a5fc Tweak message cells. 2018-06-25 09:26:41 -04:00
Matthew Chen
08ca4fdb50 Lazy-load contact avatar data and images. Use NSCache for avatar images. 2018-06-20 17:55:14 -04:00
Matthew Chen
83f11ad79b Don't cache CNContact. 2018-06-20 17:55:14 -04:00
Matthew Chen
0b64ecf675 Respond to CR. 2018-06-20 14:46:24 -04:00
Matthew Chen
32336e38e1 Merge tag '2.26.0.26' 2018-06-15 11:47:23 -04:00
Matthew Chen
b5a836bf28 Shared ui db connection v. auto load more. 2018-06-15 11:38:47 -04:00
Matthew Chen
f8e785ef72 Merge tag '2.26.0.25' 2018-06-15 09:59:45 -04:00
Michael Kirk
a91b6b35e2 update UI DB to latest before showing CVC
// FREEBIE
2018-06-14 18:23:13 -04:00
Michael Kirk
0cf751d34f Newly added group members should have expire time
Send expire timer with group info updates and in group updates that add a user.
2018-06-14 15:20:45 -04:00
Matthew Chen
95ac17bb7e Merge tag '2.26.0.24' 2018-06-14 15:07:47 -04:00
Michael Kirk
0dec029a69 Don't mark as read when callscreen is active
// FREEBIE
2018-06-13 15:42:01 -04:00
Matthew Chen
999e8c8e31 Respond to CR. 2018-06-12 12:44:32 -04:00
Matthew Chen
13e9f11b4e Open message search results. 2018-06-12 12:44:32 -04:00
Matthew Chen
27b6a5e5bb Open message search results. 2018-06-12 12:44:32 -04:00
Matthew Chen
bb266d03e4 Preserve default scroll state until conversation view is presented. 2018-06-11 15:09:05 -04:00
Matthew Chen
19c9e226fb Respond to CR. 2018-06-01 17:51:18 -04:00
Matthew Chen
3964b78ff7 Reduce usage of JSQ. 2018-06-01 17:44:18 -04:00
Matthew Chen
833f6ad51d Skip missing and invalid interactions in conversation view. 2018-06-01 17:42:12 -04:00
Matthew Chen
2c0ba1cbd9 Skip missing and invalid interactions in conversation view. 2018-06-01 17:42:12 -04:00
Matthew Chen
6bc145ce3a Fix more build warnings. 2018-06-01 17:37:06 -04:00
Michael Kirk
9aafd89979 Remove unused synthesized ivars
// FREEBIE
2018-06-01 13:19:45 -04:00
Michael Kirk
ae1d82be84 Fix: input toolbar disappears when tapping media while edit menu is
present

// FREEBIE
2018-06-01 13:16:43 -04:00
Michael Kirk
e6c659d0ff remove incorrect comment 2018-06-01 13:16:43 -04:00
Michael Kirk
6e6a7446d0 Use global readWrite connection
// FREEBIE
2018-06-01 13:16:43 -04:00
Michael Kirk
468f7524ef Revert "separate read/write db connections"
This reverts commit 3e61741060e6a7c2a9891b46cf3abd567d33aa3a.
2018-06-01 13:16:43 -04:00
Michael Kirk
00f8ea4ff8 Use a single ui connection to share cache.
Primarly two things:
1. using an extension for the first time per connection is slow
2. fetching the same objects (e.g. if you leave/re-enter the same
conversation)

// FREEBIE
2018-06-01 13:16:43 -04:00
Michael Kirk
ddd39fcd3d separate read/write db connections
// FREEBIE
2018-06-01 13:16:42 -04:00
Michael Kirk
d9172cccb9 Measure time to display
// FREEBIE
2018-06-01 13:16:42 -04:00
Matthew Chen
879b9d4c72 Respond to CR. 2018-06-01 12:39:13 -04:00
Matthew Chen
9a08afae28 Fix build warnings. 2018-06-01 12:39:13 -04:00
Matthew Chen
3cd6a33aa6 Fix build warnings. 2018-06-01 12:39:13 -04:00
Matthew Chen
5ed22ada7b Respond to CR. 2018-06-01 12:01:20 -04:00
Matthew Chen
e4f7995e4d Ensure conversation view is first responder before presenting another view. 2018-06-01 11:59:26 -04:00
Matthew Chen
9ee572fb24 Respond to CR. 2018-05-31 16:36:16 -04:00
Matthew Chen
fefc9843b1 Modify views to observe changes when active, not just foreground. 2018-05-31 16:31:51 -04:00
Matthew Chen
812210a63c Modify views to observe changes when active, not just foreground. 2018-05-31 16:31:51 -04:00
Michael Kirk
97324eaae1 Load less messages initially
// FREEBIE
2018-05-31 16:20:15 -04:00
Matthew Chen
4f520646cc Avoid double layout in conversation view; but carefully. 2018-05-30 17:46:24 -04:00
Michael Kirk
273063e0aa ConversationView first load avoids redundant layout
We are laying out the collection view, invalidating the layout, and then
laying out the collection view again on first appearance of the
conversation view. This is quite expensive - removing it shaves off
about 30% of load time.

// FREEBIE
2018-05-30 17:46:24 -04:00
Matthew Chen
5f593bd736 Revert "Add temporary verbose logging around message creation."
This reverts commit f26ad5cd34.
2018-05-29 14:01:11 -04:00
Matthew Chen
0aa8306036 Revert "Add temporary verbose logging around message creation."
This reverts commit 5b0d806a6d.
2018-05-29 14:01:04 -04:00
Matthew Chen
5b0d806a6d Add temporary verbose logging around message creation. 2018-05-29 13:42:49 -04:00
Matthew Chen
f26ad5cd34 Add temporary verbose logging around message creation. 2018-05-29 11:49:42 -04:00
Michael Kirk
2709a91b5e Fixup attachment approval vis-a-vis call banner
// FREEBIE
2018-05-24 12:28:20 -04:00
Michael Kirk
1b60716759 Stop worrying about notification order by using delegate pattern
// FREEBIE
2018-05-24 12:28:20 -04:00
Michael Kirk
29d08545e2 Use OWSNavigationController instead of UINavigationController
- [ ] document picker
- [ ] camera picker
- [ ] image picker
- [ ] restore "confirm to go back" behavior (interactive pop gesture?)

// FREEBIE
2018-05-24 12:28:20 -04:00
Michael Kirk
33eb4c38cd Centralize translucency configuration
// FREEBIE
2018-05-24 12:28:20 -04:00
Michael Kirk
a2b1793262 initial render is wrong, but settles somewhere nice
-[x] fix initial placement
-[x] add additional top safe area?

// FREEBIE
2018-05-24 12:28:20 -04:00
Michael Kirk
3a9391f4fb notes on what didn't work 2018-05-24 12:28:20 -04:00
Michael Kirk
4dbd14ac41 WIP navbar resize
-[ ] CallScreen
  -[x] functional button
  -[ ] needs design
  -[x] disable conversation view call buttons while in call
-[ ] iOS11
  -[x] resize nav content
  -[ ] background showing at top of all vc's
  -[] iPhoneX
    -[x] use differently sized banner for now
    -[] mimic X system design
-[ ] iOS10
  -[x] resize nav content
  -[ ] animation glitch while push/pop
-[ ] iOS9

// FREEBIE
2018-05-24 12:28:20 -04:00
Matthew Chen
e2d9c1187a Fix "group avatar doesn't update after local change." 2018-05-18 15:37:38 -04:00
Matthew Chen
692d0a7579 Don't mark messages as read if conversation view isn't 100% visible. 2018-05-17 16:07:23 -04:00
Matthew Chen
78de7a10f7 Don't mark messages as read if conversation view isn't 100% visible. 2018-05-17 16:07:23 -04:00
Matthew Chen
f436fc19c2 Make contact share "bubble/card" reflect share contents. 2018-05-16 17:19:05 -04:00
Matthew Chen
f6106512db Only mark messages read in conversation view if visible. 2018-05-16 16:30:01 -04:00
Michael Kirk
30cef1f084 start readtimer whenever we become active
// FREEBIE
2018-05-15 12:56:47 -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
2cc3eabdb8 quote reply to contact share (no avatar)
// FREEBIE
2018-05-10 14:34:19 -04:00
Matthew Chen
acdc51ba3d Respond to CR. 2018-05-10 13:17:34 -04:00
Matthew Chen
37b8b368a6 Show "share contact" flow in single presented navigation controller. 2018-05-10 13:17:01 -04:00
Michael Kirk
c15fea4eca merge avatar with existing
// FREEBIE
2018-05-10 11:31:22 -04:00
Michael Kirk
0c469764f1 re-use contact picker for "add to existing"
Required refactor of contact picker to be presented non-modally.

TODO: merge emails, address, display names

// FREEBIE
2018-05-10 11:31:22 -04:00
Michael Kirk
609746abec clarify naming
// FREEBIE
2018-05-10 11:31:22 -04:00
Matthew Chen
4079cdb600 Apply more contact share assets. 2018-05-09 17:51:27 -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
Michael Kirk
7e22d9e900 Prevent input toolbar from appearing over camera view, contact view or actionsheet
// FREEBIE
2018-05-08 17:07:15 -04:00
Michael Kirk
41aa7eafe3 makeKeyAndVisible restores first responder, so no need to track it
ourselves.

This isn't *quite* as nice for the case when we want to restore a
textfield that was active before, but it much more simply covers the
more important case that we restore input accessory views after
backgrounding/foregrounding.

// FREEBIE
2018-05-08 17:07:15 -04:00
Matthew Chen
bd116f8938 Share contacts from share extension. 2018-05-07 17:04:55 -04:00
Matthew Chen
5f1941f6aa Apply design changes from Myles. 2018-05-07 16:17:16 -04:00
Michael Kirk
a10ae1835e respond to code review
// FREEBIE
2018-05-07 12:51:55 -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
fd93bf677e Clean up ahead of PR. 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
0c745dd989 Add contact share approval view. 2018-05-04 18:13:22 -04:00
Matthew Chen
459101c20e Add feature flag for contact sharing. 2018-05-04 09:35:47 -04:00
Matthew Chen
ff6b45abee Respond to CR. 2018-05-03 14:31:11 -04:00
Matthew Chen
91d54360ba Add contact view. 2018-05-03 14:09:54 -04:00
Matthew Chen
2738bcbc58 Create contact view. 2018-05-03 14:09:54 -04:00
Michael Kirk
e604437e24 Don't become first responder while presenting
// FREEBIE
2018-05-03 12:45:48 -04:00
Michael Kirk
5c0c01dea2 Contact picking
// FREEBIE
2018-05-02 11:06:09 -04:00
Michael Kirk
b702695793 cleanup 2018-04-26 11:18:18 -04:00
Michael Kirk
55e19b55b3 Fix layout for iOS9/10
code cleanup

// FREEBIE
2018-04-26 11:18:18 -04:00
Michael Kirk
7a1d24a9ab Avatar updates when contact/profile/group photo changes
// FREEBIE
2018-04-26 11:18:18 -04:00
Michael Kirk
b1bff71145 WIP moving to stackview backed header view in conversation view
- iOS10 with large titles doesn't truncate
2018-04-26 11:18:18 -04:00
Matthew Chen
204d379603 Respond to CR. 2018-04-25 10:49:19 -04:00
Matthew Chen
9275c67818 Rework outgoing message state. 2018-04-25 10:49:19 -04:00
Matthew Chen
fa9a4c808a Simplify usage of contacts framework. 2018-04-24 13:21:12 -04:00
Michael Kirk
9c81eb44a1 Replace remaining UI usage of interaction.description
// FREEBIE
2018-04-21 19:21:18 -04:00
Matthew Chen
a1386eca81 Fix taps in message cells. 2018-04-17 13:28:06 -04:00
Michael Kirk
64ff4cd660 tap-to-retry failed thumbnail downloads
// FREEBIE
2018-04-16 16:06:18 -04:00
Matthew Chen
6caa5b87b6 Add more asserts around thread in SAE. 2018-04-13 14:59:38 -04:00
Matthew Chen
644e78f19d Respond to CR. 2018-04-13 14:32:42 -04:00
Matthew Chen
759b2a332f Respond to CR. 2018-04-11 14:18:09 -04:00
Michael Kirk
7abd51838f Move bubble actions to new bubble delegate
// FREEBIE
2018-04-11 11:55:30 -04:00
Michael Kirk
6b6f4f9336 Limit caption length
// FREEBIE
2018-04-10 16:00:19 -04:00
Matthew Chen
f2b416d800 Respond to CR. 2018-04-10 15:54:46 -04:00
Matthew Chen
8b060a187c Tap on quoted replies. 2018-04-10 15:54:46 -04:00
Matthew Chen
65015e686f Tap on quoted replies. 2018-04-10 15:54:46 -04:00
Matthew Chen
8fe289feec Tweak design of quoted replies. 2018-04-09 16:45:42 -04:00
Matthew Chen
3799dce822 Respond to CR. 2018-04-09 14:32:10 -04:00
Matthew Chen
ade2ee7216 Use dynamic type everywhere in conversation view. 2018-04-09 14:25:53 -04:00
Michael Kirk
c56e8acc51 QuotedReplyModel from SSK->SignalMessaging
// FREEBIE
2018-04-09 12:47:56 -04:00
Michael Kirk
1d4c0624be Clarify variable names
// FREEBIE
2018-04-09 12:47:56 -04:00
Michael Kirk
a9459757f0 Lingering var renames QuotedReplyDraft -> QuotedReplyModel
// FREEBIE
2018-04-09 12:47:56 -04:00
Michael Kirk
fa2e1ba89b Fetch thumbnail when not available locally
// FREEBIE
2018-04-09 12:47:56 -04:00