Commit graph

101 commits

Author SHA1 Message Date
Niels Andriesse
64f92d261b Refactor 2019-05-17 13:37:36 +10:00
Mikunj
fb1e27d633 Fix empty message generation.
Before since we were setting the groupMetaMessage, it was setting the `shouldSave` property to true and thus the message sender was looking for the message in the db.
We now don't set this property so the message should be able to be sent without saving.
2019-05-17 09:47:08 +10:00
Niels Andriesse
7faa9d333c Add missing save 2019-05-16 15:32:43 +10:00
Niels Andriesse
be7724b41b Implement feedback 2019-05-16 14:31:53 +10:00
Niels Andriesse
3161680432 Redo friend request handling 2019-05-16 12:08:37 +10:00
Niels Andriesse
cb1e876b7a Make friend request status updates more reliable 2019-05-15 11:19:33 +10:00
Niels Andriesse
b83766ef74 Clean & fix conversation settings crash 2019-05-14 15:54:39 +10:00
Mikunj
a4b042f282 Added convenience function to make empty outgoing messages. 2019-05-14 10:59:14 +10:00
Niels Andriesse
4da8d33932 Clean 2019-05-10 13:38:00 +10:00
Mikunj
09157673fe Added friend request states in TSThread.
Automatically send a OWSFriendRequest if we are not friend with the person.
2019-05-09 14:00:40 +10:00
Michael Kirk
870caaa84a simplify completion checking - make nonnull 2019-02-26 10:06:52 -07:00
Michael Kirk
13154fb828 allow long text with non-durable sends (SAE) 2019-02-26 10:06:52 -07:00
Matthew Chen
56e5feca46 Introduce ConversationSnapshot. 2019-02-26 10:55:44 -05:00
Michael Kirk
f1623b6037 missing nullability text 2019-02-25 13:27:49 -07:00
Michael Kirk
7e5256856c render media+longText message 2019-02-25 13:27:49 -07:00
Michael Kirk
b7989e9384 feature flag approval sending 2019-02-25 13:27:49 -07:00
Michael Kirk
bc4260b444 Send long-text with other attachments 2019-02-25 13:27:49 -07:00
Michael Kirk
a218d6c465 Send first chars of longtext in protobuf 2019-02-25 13:27:49 -07:00
Matthew Chen
3d757b492a Add link previews to conversation message bubbles. 2019-01-23 09:32:30 -05:00
Matthew Chen
2dcc79fbca Fix issues around link previews. 2019-01-22 10:15:50 -05:00
Matthew Chen
8e44bf554c Respond to CR. 2019-01-22 09:42:25 -05:00
Matthew Chen
d775a70a89 Build link previews. 2019-01-22 09:42:25 -05:00
Matthew Chen
31ea64bdaf Build link previews. 2019-01-22 09:42:25 -05:00
Matthew Chen
a477e01a4a Apply LinkPreview model. 2019-01-14 16:20:54 -05:00
Michael Kirk
af7ee5e1d1 address compiler breakage after rebase 2018-12-19 15:16:36 -07:00
Michael Kirk
5671fd2520 Revert "Revert 'new sort id'."
This reverts commit ebae75af00.
2018-12-19 15:16:36 -07:00
Matthew Chen
bd40aacd53 Purge dynamic interactions from database. 2018-12-18 10:55:54 -05:00
Michael Kirk
6232b1ef67 CR: add debug asserts 2018-12-17 14:43:50 -07:00
Michael Kirk
81bc357bbb more robust handling of unsaved outgoing messages 2018-12-17 14:43:50 -07:00
Michael Kirk
668cc22af3 Perf: Insert outgoing message into conversation before save completes.
This was a huge savings - e.g. 50-70% of the time between tapping send and
rendering the message takes place in the save/postWriteTransaction blocks
2018-12-17 14:43:50 -07:00
Matthew Chen
19a2bfeaad More conversation viewmodel perf improvements. 2018-12-13 11:50:55 -05:00
Matthew Chen
fea40d571c Move contact offers to Conversation view model. 2018-12-13 09:12:41 -05:00
Michael Kirk
c0cb7df10a rename hasEverHadMessage -> shouldThreadBeVisible 2018-12-12 08:46:15 -07:00
Michael Kirk
1a5c47df2f Fix SAE, limit max attachments 2018-12-05 13:56:34 -05:00
Matthew Chen
aeadea67e2 Send multiple attachments from the share extension. 2018-11-13 13:15:54 -05:00
Matthew Chen
7f89c90f16 Fix bug when sending non-body attachments (e.g. group avatars). 2018-11-13 13:15:11 -05:00
Michael Kirk
27cb91e9c8 Plumb through messageAlbumId so an Attachment knows what album (if any) it
belongs to.
2018-11-08 12:52:08 -06:00
Matthew Chen
60c5a84dd2 Fix issues in media gallery cells; Improve debug galleries. 2018-11-07 09:56:49 -05:00
Matthew Chen
c7d427029b Respond to CR. 2018-11-02 13:17:36 -04:00
Matthew Chen
f6591fac25 Add debug UI for multi-image sends. 2018-11-02 13:04:05 -04:00
Matthew Chen
d04f1e6e36 Add debug UI for multi-image sends. 2018-11-02 13:04:05 -04:00
Matthew Chen
40aa78e001 Merge remote-tracking branch 'origin/release/2.31.0' 2018-10-31 11:42:41 -04:00
Michael Kirk
cb9aa6304c find -E . -type f -regex ".*\.(m|h)" -exec sed -i "" -e "s/try_/throws_/" {} \; 2018-10-30 11:35:34 -06:00
Michael Kirk
3a6aafc454 Swift Exception wrap NSData+keyVersionByte 2018-10-30 11:35:34 -06: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
0125535d4d Pull out SignalCoreKit. 2018-10-01 09:06:40 -04:00
Matthew Chen
ebae75af00 Revert 'new sort id'. 2018-09-27 19:40:51 -04:00
Michael Kirk
c2f87c738a trivial replace of timestampForSorting -> sortId in some logging 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
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