Commit graph

64 commits

Author SHA1 Message Date
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
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
Michael Kirk 6c5fbc6de5 Update existing contact offers in place
WIP: migration / autoincrement logic

TODO:

-[x] contact offer
-[ ] verify all paths that utilized timestampForSorting, e.g. make sure SN appear before the message they affect, etc.
-[x] Monotonic ID
-[x] New extension which sorts by id
-[x] Migration
  -[ ] batch migration?

fixup contact offers
2018-09-26 09:52:33 -06:00
Michael Kirk a60d8eb161 WIP: migration / autoincrement logic
TODO:

-[ ] contact offer
-[ ] verify all paths that utilized timestampForSorting, e.g. make sure SN appear before the message they affect, etc.
-[x] Monotonic ID
-[x] New extension which sorts by id
-[x] Migration
  -[ ] batch migration?
2018-09-26 09:52:33 -06:00
Michael Kirk 920a82564f Merge tag '2.29.3.3' 2018-09-15 09:17:08 -05:00
Michael Kirk df67e883f3 BlockList vs. "zero length" group names 2018-09-14 11:32:39 -05:00
Michael Kirk c1b88b5f48 copy cleanup: remove redundant body 2018-09-14 10:52:01 -05:00
Michael Kirk b6eb1476cb Leave group when blocking it 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
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 fac7f6932f Rename TSGroupMetaMessage enum values. 2018-09-04 09:30:01 -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 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 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
Michael Kirk d591fb7f2c Fix some compiler warnings 2018-07-17 19:22:58 -06:00
Matthew Chen 376e2cc1db Respond to CR. 2018-07-11 16:54:44 -04:00
Matthew Chen 35f058c46a Rework unread indicators. 2018-07-11 16:43:39 -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 776b5abed1 Handle edge cases around unread indicator & contact offers. 2018-06-20 17:38:27 -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 390c0bc201 Send fake contact shares. 2018-05-04 09:37:04 -04:00
Matthew Chen 0316a98eb8 Undo renaming of contactShare property of TSMessage. 2018-05-01 11:26:01 -04:00
Matthew Chen 0d8cfc5403 Rename contact share class to contact. 2018-05-01 11:03:25 -04:00
Matthew Chen 4b8a2fa8a3 Sketch out "contact share" model. 2018-05-01 11:03:25 -04:00
Michael Kirk eec7678979 Group's meta message defaults to "Delivery"
// FREEBIE
2018-04-19 14:57:42 -04:00
Matthew Chen 6ee74eaffc Respond to CR. 2018-04-10 15:56:13 -04:00
Matthew Chen 6a07599e00 Respond to CR. 2018-04-10 15:54:46 -04:00
Matthew Chen f2b416d800 Respond to CR. 2018-04-10 15:54:46 -04:00
Michael Kirk 90486aa49c Inline method with one caller, fix formatting
// FREEBIE
2018-04-09 12:47:57 -04:00
Michael Kirk c56e8acc51 QuotedReplyModel from SSK->SignalMessaging
// FREEBIE
2018-04-09 12:47:56 -04:00