Commit Graph

341 Commits (58abf762442b613e32a9a974c467df8249f7e71a)

Author SHA1 Message Date
Michael Kirk fe7d69e9c6 Update thread's sorting order based on whatever the currently last message is 7 years ago
Michael Kirk 02692e42bd remove addressed TODO's 7 years ago
Michael Kirk c0c973de1c Sort gallery finder by sortId 7 years ago
Michael Kirk b281b37637 replace thread.lastMessageDate/archivalDate -> thread.lastSortId, thread.archivedAsOfSortId
Update migration accordingly

Date shown on home view cell is message.receivedAt
7 years ago
Michael Kirk 089c4f09ea bump all views which rely on message sorting 7 years ago
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.
7 years ago
Michael Kirk df61316495 minimize diff senderTimestamp -> timestamp 7 years ago
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.
7 years ago
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?
7 years ago
Matthew Chen 15b52db8bf Respond to CR. 7 years ago
Matthew Chen 29bb69032a DRY up the debounce of db extension version increment. 7 years ago
Matthew Chen 3b2c5bfc7b Modify mock environments to register all db views. 7 years ago
Matthew Chen e1db60c1c0 Rework creation of singletons. 7 years ago
Matthew Chen 69290f7ec8 Improve logging around failied keychain deletion. 7 years ago
Matt Rubin d25579e478 Treat failure to delete a non-existent password as success
Fixes https://github.com/signalapp/Signal-iOS/issues/3876
7 years ago
Michael Kirk 9bca1c8e52 Add some missing nullability annotations 7 years ago
Michael Kirk 3df0e72eda Extract SPK rotation and CreatePreKey operations 7 years ago
Michael Kirk 286d3c8ce9 Serialize RefreshKeyOperation
TODO

-[] rotate signed prekey job
-[] verify current prekey w/ server
-[] create keys
7 years ago
Michael Kirk 1eb05c1d01 remove unused preKeyLastResort 7 years ago
Michael Kirk 920a82564f Merge tag '2.29.3.3' 7 years ago
Matthew Chen e784f9feeb Move fakes to SSK/tests. 7 years ago
Michael Kirk e4d12feeb9 rev gallery db extension since our `isValid` checks have changed 7 years ago
Matthew Chen cc117b385c Modify environment accessors to use our 'shared' convention. 7 years ago
Matthew Chen bd05cdc031 Rename TextSecureKitEnv to SSKEnvironment. 7 years ago
Matthew Chen bcceda1861 Respond to CR. 7 years ago
Matthew Chen cfb511aa57 Respond to CR. 7 years ago
Matthew Chen eb616a3411 Respond to CR. 7 years ago
Matthew Chen 535241ef9e Add test app context; use mock "document" and "shared data container" directories in tests, use mock keychain storage in tests. 7 years ago
Matthew Chen 399dd13cee Add test app context; use mock "document" and "shared data container" directories in tests, use mock keychain storage in tests. 7 years ago
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
7 years ago
Matthew Chen f4d1f25656 Merge remote-tracking branch 'origin/release/2.29.1' 7 years ago
Michael Kirk 6821e4a3a5 Don't include invalid media in gallery 7 years ago
Matthew Chen f473f60111 Apply OWS log functions in Objective-C. 7 years ago
Matthew Chen cc5a480baa Apply OWS log functions in Objective-C. 7 years ago
Matthew Chen 03829779cc Apply OWS log functions in Objective-C. 7 years ago
Matthew Chen c0d486b1f1 Apply OWS log functions in Objective-C. 7 years ago
Matthew Chen 3a50377902 Apply OWS log functions in Objective-C. 7 years ago
Matthew Chen 713606271c Rename fail macros in Obj-C. 7 years ago
Matthew Chen 5b50e81b4f Rename fail macros in Swift. 7 years ago
Matthew Chen cf6f3841a8 Apply new Swift logging. 7 years ago
Michael Kirk 82e559d11b Use swift macros for main thread assert 7 years ago
Matthew Chen b347c40c66 Clean up ahead of PR. 7 years ago
Matthew Chen 0a7b3537b5 Recreate message database view when message mappings are corrupt. 7 years ago
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
7 years ago
Matthew Chen db3df249bf Merge NSData categories. 7 years ago
Matthew Chen 2c9c028504 Clean up. 7 years ago
Matthew Chen 45e782c243 Revamp orphan data cleaner. 7 years ago
Michael Kirk fc1ce02ae5 CR: Now that we have transaction semantics, this shouldn't happen.
// FREEBIE
7 years ago
Michael Kirk 1eb7fc986c YapDB introduced a method purpose built to do what we were approximating.
This seems a little more future proof / less error prone if we change the
registered extensions.
7 years ago
Michael Kirk df01c7e63e Update to latest YapDB (with Signal patches applied)
Applied branches:

- mkirk/invalidFinalIndices
- mkirk/upstream-unencrypted-headers

Also fixed up test suite.
7 years ago
Matthew Chen 708ef6f7dd Fix NPE using mock for unknown database objects. 7 years ago
Matthew Chen 060e0fd062 Fix NPE using mock for unknown database objects. 7 years ago
Matthew Chen 03e5d2973b Delta contact intersections. 7 years ago
Michael Kirk 77997639f5 Use CurrentAppContext instead of compiler flag to affect test behavior 7 years ago
Michael Kirk 12ef25420a Fixup SSK tests 7 years ago
Michael Kirk d591fb7f2c Fix some compiler warnings 7 years ago
Matthew Chen 158aa3abc4 Tweak system messages; incomplete vs. missed calls. 7 years ago
Matthew Chen a6dbb7704a Remove overzealous assert in search finder. 7 years ago
Matthew Chen 700e9fa491 Improve logging around deserialization exceptions. 7 years ago
Michael Kirk 737598c731 Return unknown object from deserializer
// FREEBIE
7 years ago
Matthew Chen 4abaed0e6d Tidy up type checking in database views. 7 years ago
Matthew Chen 2e6b4899a7 Remove TSRecipient. 7 years ago
Matthew Chen 21a9ce3b20 Ensure TSRecipient can be deserialized. 7 years ago
Matthew Chen f1708c0b30 Improve logging around deserialization failures. 7 years ago
Matthew Chen 28047abb6a Tweak database reset. 7 years ago
Matthew Chen 40e5bcc23f Respond to CR. 7 years ago
Matthew Chen e8d0d9ecc0 Index oversize text for search. 7 years ago
Matthew Chen f8e785ef72 Merge tag '2.26.0.25' 7 years ago
Michael Kirk a91b6b35e2 update UI DB to latest before showing CVC
// FREEBIE
7 years ago
Matthew Chen c8f2201a37 Respond to CR. 7 years ago
Matthew Chen 527e2715d4 Elaborate the search tests. 7 years ago
Matthew Chen 5c42e4c59e Improve search query construction. 7 years ago
Matthew Chen 755d30254e Improve search query construction. 7 years ago
Matthew Chen 153f3fc0a5 Improve search query construction. 7 years ago
Matthew Chen a51e9b78b0 Improve search query construction. 7 years ago
Matthew Chen f5a5d84edc Filter search index text. 7 years ago
Matthew Chen b5e0265758 Filter search index text. 7 years ago
Matthew Chen c8fee4efa7 Add swift logging to SSK. 7 years ago
Matthew Chen 44b23d44fd Respond to CR. 7 years ago
Michael Kirk dff8d7bf97 Moving code around
// FREEBIE
7 years ago
Michael Kirk f57a5dbc77 Match searches for national number format
// FREEBIE
7 years ago
Michael Kirk fff8474150 adapt to rebase conflicts 7 years ago
Michael Kirk f415827da6 Contact search results
// FREEBIE
7 years ago
Michael Kirk 729befa5cb CR: Cap max search results
// FREEBIE
7 years ago
Michael Kirk b3705196b3 remove unused code/comments 7 years ago
Michael Kirk 13c43c2520 search groups by member name, cleanup tests
// FREEBIE
7 years ago
Michael Kirk 3a03c4f74c WIP: message indexing 7 years ago
Michael Kirk b00e5a4fd9 Fuzzier search matching
-[] Backend
  -[] indexes e5.25
    -[x] wire up results: Contacts / Conversations / Messages actual: 3hr
    -[ ] group thread est: actual:
      -[x] group name actual: e.25
      -[ ] group member name: e.25
      -[ ] group member number: e.25
    -[ ] contact thread e.5
      -[ ] name
      -[ ] number
    -[ ] messages e1
      -[ ] content
-[] Frontend e10.75
  -[x] wire up VC's a.5
  -[x] show search results only when search box has content a.25
  -[] show search results: Contact / Conversation / Messages e2
   -[x] wire up matchs
   -[] style contact cell
   -[] style conversation cell
   -[] style messages cell
  -[] tapping thread search result takes you to conversation e1
  -[] tapping message search result takes you to message e1
  -[] show snippet text for matched message e1
  -[] highlight matched text in thread e3
  -[] go to next search result in thread e2
  -[] No Results page
  -[] Hide search unless pulled down
7 years ago
Michael Kirk a9e2834d9f WIP: FTS - rudimentary show results
-[] Backend
  -[] indexes e5.25
    -[x] wire up results: Contacts / Conversations / Messages actual: 3hr
    -[ ] group thread est: actual:
      -[x] group name actual: e.25
      -[ ] group member name: e.25
      -[ ] group member number: e.25
    -[ ] contact thread e.5
      -[ ] name
      -[ ] number
    -[ ] messages e1
      -[ ] content
-[] Frontend e10.75
  -[x] wire up VC's a.5
  -[x] show search results only when search box has content a.25
  -[] show search results: Contact / Conversation / Messages e2
   -[x] wire up matchs
   -[] style contact cell
   -[] style conversation cell
   -[] style messages cell
  -[] tapping thread search result takes you to conversation e1
  -[] tapping message search result takes you to message e1
  -[] show snippet text for matched message e1
  -[] highlight matched text in thread e3
  -[] go to next search result in thread e2
  -[] No Results page
  -[] Hide search unless pulled down
7 years ago
Michael Kirk 7df158120b Fix build warnings: mark initWithCoder as designated.
// FREEBIE
7 years ago
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
7 years ago
Matthew Chen 3cd6a33aa6 Fix build warnings. 7 years ago
Matthew Chen d62725d3b7 Add reported application state. 7 years ago
Michael Kirk a10ae1835e respond to code review
// FREEBIE
7 years ago
Michael Kirk 5ba5e98260 Show downloaded contact avatar in thread
// FREEBIE
7 years ago
Michael Kirk 7a1d24a9ab Avatar updates when contact/profile/group photo changes
// FREEBIE
7 years ago
Matthew Chen aa35594ad5 Respond to CR. 7 years ago
Matthew Chen 67f2d6608f Detect and handle corrupt database views. 7 years ago
Matthew Chen 1a4c01ae29 Detect and handle corrupt database views. 7 years ago
Matthew Chen 212891c50d Detect and handle corrupt database views. 7 years ago