Commit Graph

988 Commits (46ebe52a2771641c9a8d521387b50d25ef3c42fa)

Author SHA1 Message Date
Matthew Chen 857cdf4368 Map the legacy conversation color names. 6 years ago
Matthew Chen ec0206ff01 Adapt text size of default avatars to avatar size. 6 years ago
Matthew Chen 6d14a1b472 Local profile default avatars should use steel background. 6 years ago
Matthew Chen 27488f078a Replace old "default profile avatar" icon with default avatar for local user. 6 years ago
Matthew Chen e4ab360716 Respond to CR. 6 years ago
Matthew Chen 547724b5cf Add inner shadows to profile pics. 6 years ago
Matthew Chen 352777765e Add inner shadows to profile pics. 6 years ago
Matthew Chen ff6feafe8c Update text colors. 6 years ago
Matthew Chen 6715e3d1ad Respond to CR. 6 years ago
Matthew Chen b20cd57383 Rename OWSConversationColor. 6 years ago
Matthew Chen 3adc03fa2c Rework conversation message bubble colors; add "conversation colors" class. 6 years ago
Matthew Chen b3ad6e27dc Rework conversation message bubble colors; add "conversation colors" class. 6 years ago
Matthew Chen 26a2d568de Add "conversation color mode" enum. 6 years ago
Matthew Chen e5150267c2 Rework the conversation color constants. 6 years ago
Matthew Chen da63731447 Respond to CR. 6 years ago
Matthew Chen 8db4595bdc Rework group avatars to reflect conversation colors. 6 years ago
Matthew Chen 1c920c6be6 Rework group avatars to reflect conversation colors. 6 years ago
Matthew Chen 25d56b30c1 Rework group avatars to reflect conversation colors. 6 years ago
Matthew Chen 2f9eae5caf Respond to CR. 6 years ago
Michael Kirk 04a52980a3 fixup migration
- nested transaction for enumeration
- save when complete
6 years ago
Michael Kirk fe7d69e9c6 Update thread's sorting order based on whatever the currently last message is 6 years ago
Michael Kirk c2f87c738a trivial replace of timestampForSorting -> sortId in some logging 6 years ago
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
6 years ago
Michael Kirk 2eb3ec6d0c benchmark migration 6 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
6 years ago
Michael Kirk c27d35f8f2 sort search results by sortId 6 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.
6 years ago
Michael Kirk df61316495 minimize diff senderTimestamp -> timestamp 6 years ago
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.
6 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.
6 years ago
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
6 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?
6 years ago
Matthew Chen 7b2dd19fb8 Respond to CR. 6 years ago
Matthew Chen ae84528dc3 Update avatar colors; add shaded conversation color constants, modify color picker to be color-name-based, not color-based, use shaded conversation colors, remove JSQ. 6 years ago
Matthew Chen 87836f506b Move more singletons to SSKEnvironment. 6 years ago
Matthew Chen 6a712366ae Tweak gray 95. 6 years ago
Matthew Chen 922c505559 Respond to CR. 6 years ago
Matthew Chen ef6689410b Design feedback from Myles. 6 years ago
Matthew Chen 8cf5f3e58f New grayscale palette. 6 years ago
Matthew Chen 3b2c5bfc7b Modify mock environments to register all db views. 6 years ago
Matthew Chen e1db60c1c0 Rework creation of singletons. 6 years ago
Michael Kirk 21e67e9a1d New resolutions for call banner, rename to accommodate multiple X devices.
Only apply work-around to legacy versions where required.
6 years ago
Michael Kirk 3df0e72eda Extract SPK rotation and CreatePreKey operations 6 years ago
Michael Kirk 920a82564f Merge tag '2.29.3.3' 6 years ago
Michael Kirk e7f9598e68 disable dark theme switch for production 6 years ago
Matthew Chen 9b94580dae Update assertions.
* Streamline precompiled headers.
* Remove obsolete assertions in Constraints.h.
6 years ago
Michael Kirk df67e883f3 BlockList vs. "zero length" group names 6 years ago
Michael Kirk b447e68597 clarify post-unblock-group copy 6 years ago
Michael Kirk c1b88b5f48 copy cleanup: remove redundant body 6 years ago
Michael Kirk 0f9b0936df Use cached group details when rendering blocklist 6 years ago
Michael Kirk 1f15ba6dc5 Cache group details on blocking manager
In case the group thread is later deleted.
6 years ago
Michael Kirk c0991fce74 enable dark theme for beta 6 years ago
Michael Kirk 7b7da4bc13 add docs to BlockListCache 6 years ago
Michael Kirk fd492f379a Use BlockListCache where possible 6 years ago
Michael Kirk 2c49232db0 remove barely used getters
Lock contention on these methods is less important because we're not iterating
over their access, e.g. per tableViewCell
6 years ago
Michael Kirk 448936d156 BlockListCache
block manager synchronizes on self for coherent read/writes to blocking state
across threads, but we want to be able to have performant reads on the main
thread.
6 years ago
Michael Kirk 28d28cf2b6 remove unused code 6 years ago
Michael Kirk b6eb1476cb Leave group when blocking it 6 years ago
Michael Kirk 8aba5725cf BlockListViewController v. group blocking 6 years ago
Michael Kirk c6de8c579c WIP: Localizations 6 years ago
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
6 years ago
Michael Kirk 236c17f65e WIP: 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
  -[ ] 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
  -[ ] send new protos
-[ ] Message Processing
  -[ ] Drop messages from blocked groups
6 years ago
Matthew Chen 3935b019f4 Add base class for tests. 6 years ago
Matthew Chen 3fe7d7f9be Remove more usage of logTag. 6 years ago
Michael Kirk 5bafc7b6d6 Don't allow enabling dark theme in production yet 6 years ago
Matthew Chen df7acfeed3 Simplify OWSPreferences access. 6 years ago
Matthew Chen 106ecf2e8e Respond to CR. 6 years ago
Matthew Chen cc117b385c Modify environment accessors to use our 'shared' convention. 6 years ago
Matthew Chen 3a12446be8 Modify environment accessors to use our 'shared' convention. 6 years ago
Matthew Chen bd05cdc031 Rename TextSecureKitEnv to SSKEnvironment. 6 years ago
Matthew Chen f9eab5cd24 Merge remote-tracking branch 'origin/release/2.29.2' 6 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
6 years ago
Matthew Chen 34a05cdb85 Refine image validation. 6 years ago
Matthew Chen 51e8fdcb25 Use small thumbnail when creating quoted reply. 6 years ago
Matthew Chen 206432fdf0 Add failure methods to thumbnail service. 6 years ago
Matthew Chen 3437361d70 Use new thumbnails in media gallery thumbnails. 6 years ago
Matthew Chen ac4365e1c9 Add OWSThumbnailService. 6 years ago
Matthew Chen 446ceb2b9c Rename AttachmentStream methods. 6 years ago
Matthew Chen 498828f93c Rename AttachmentStream methods. 6 years ago
Matthew Chen 9ab4da5c81 cherry-pick Merge branch 'charlesmchen/logSdp' 6 years ago
Matthew Chen fac7f6932f Rename TSGroupMetaMessage enum values. 6 years ago
Matthew Chen f4d1f25656 Merge remote-tracking branch 'origin/release/2.29.1' 6 years ago
Michael Kirk d6f856a626 fixup: Leave theme enabled if ever enabled 6 years ago
Michael Kirk 4e19a79436 Leave theme enabled if ever enabled 6 years ago
Michael Kirk 64dd7c79ed enable dark theme for beta 6 years ago
Michael Kirk e715bf9ea2 image sizing
Validate image sizing
6 years ago
Matthew Chen f473f60111 Apply OWS log functions in Objective-C. 6 years ago
Matthew Chen cc5a480baa Apply OWS log functions in Objective-C. 6 years ago
Matthew Chen 03829779cc Apply OWS log functions in Objective-C. 6 years ago
Matthew Chen c0d486b1f1 Apply OWS log functions in Objective-C. 6 years ago
Matthew Chen 3a50377902 Apply OWS log functions in Objective-C. 6 years ago
Matthew Chen 0b5b74a901 Respond to CR. 6 years ago
Matthew Chen b4539328e1 Log call session description. 6 years ago
Matthew Chen 2d06c05a4f Log call session description. 6 years ago
Matthew Chen 713606271c Rename fail macros in Obj-C. 6 years ago
Matthew Chen 5b50e81b4f Rename fail macros in Swift. 6 years ago
Matthew Chen 7be8f30877 Apply -> Never. 6 years ago
Matthew Chen d4f7b5d45b Respond to CR. 6 years ago
Matthew Chen e1049fdfcc Respond to CR. 6 years ago
Matthew Chen cf6f3841a8 Apply new Swift logging. 6 years ago
Michael Kirk 1a92f414eb Revert "Disable dark theme in production."
This reverts commit 472a92a1a3.
6 years ago
Michael Kirk 1d2590fa12 Merge tag '2.29.0.17' 6 years ago
Michael Kirk bc2ba63c21 DRY refactor 6 years ago
Michael Kirk 37738c24c5 Allow menuActions + callBanner
// FREEBIE
6 years ago
Michael Kirk 82e559d11b Use swift macros for main thread assert 6 years ago
Matthew Chen cb827169fb Respond to CR. 6 years ago
Matthew Chen 472a92a1a3 Disable dark theme in production. 6 years ago
Michael Kirk 1743407cc2 Code cleanup per code review 6 years ago
Michael Kirk 3022f92925 Tweak tint for search bar icons in dark theme 6 years ago
Michael Kirk 75bb9b60db Alternative dark theme search bar
Rather than our custom class, we can get pretty far using existing UISearchBar
styling, and then apply the final tweak, the search bar text field background
color by traversing the view.

This fixes a couple issues:

1. There was a small wavering in height of the custom search bar
2. When your table header view is a UISearchBar you get nice scroll "snapping"
   when showing/hiding the search bar.
6 years ago
Michael Kirk e435358bfd Revert "Add custom themed search bar."
This reverts commit 8daaef22da.
6 years ago
Matthew Chen 4971d40c75 Respond to CR. 6 years ago
Matthew Chen 9e21612298 Respond to CR. 6 years ago
Matthew Chen 6dd474d794 Theme quoted replies. 6 years ago
Matthew Chen a92fca5c13 Theme quoted replies. 6 years ago
Michael Kirk b80d88c824 theme attachment approval keyboard
// FREEBIE
6 years ago
Matthew Chen c7ed09ed91 Fix 'can't delete formatting in phone number' issue. 6 years ago
Matthew Chen 8daaef22da Add custom themed search bar. 6 years ago
Matthew Chen decb0c54ca Theme review. 6 years ago
Matthew Chen d62e07d6f1 Theme review. 6 years ago
Matthew Chen 4ea5d9b849 Theme review. 6 years ago
Matthew Chen a76d488e8b Fix QA issues in theme. 6 years ago
Matthew Chen 22dda476bb Fix QA issues in theme. 6 years ago
Matthew Chen 26001e49d1 Unify log tags. 6 years ago
Michael Kirk 71cb90b575 Avoid incremental theme-redraws
IMO this feels more impressive
6 years ago
Michael Kirk 8829cdfb4b Toast view when tapped message doesn't exist, mark remotely sourced. 6 years ago
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.
6 years ago
Michael Kirk 1ff443c3ac restore transparent navbar in attachment approval 6 years ago
Michael Kirk ebd2e6d5ac Tweak theme 6 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
6 years ago
Matthew Chen 8ecf6884c5 Remove "sending" color for outgoing messages. 6 years ago
Matthew Chen 3fc3425605 Theme search bars. 6 years ago
Matthew Chen 800689d9ff Configure default cells. 6 years ago
Matthew Chen 2c9c028504 Clean up. 6 years ago
Matthew Chen adadf094d4 Enable theme. 6 years ago
Matthew Chen 6dfe36f9b5 Respond to CR. 6 years ago
Matthew Chen 816f02fbab Fix unintentional moves. 6 years ago
Matthew Chen 9c92719ec4 Refine theme. 6 years ago
Matthew Chen 5ef0b6d056 Refine theme. 6 years ago
Matthew Chen acd7d094b1 Refine theme. 6 years ago
Matthew Chen a56a16411f Refine theme. 6 years ago
Matthew Chen a543cd5a4e Refine theme. 6 years ago
Matthew Chen ce4fdd5135 Refine theme. 6 years ago
Matthew Chen d34f83b445 Refine theme. 6 years ago
Matthew Chen 4f8dbf39b5 Refine theme. 6 years ago
Michael Kirk 0620aba3bc Add cancel button 6 years ago
Michael Kirk 2ea7e2b036 CR: clean up preferences 6 years ago
Michael Kirk e5b3cbd00c Use StoreKit for reviews 6 years ago
Matthew Chen a5ffbdebb3 Remove Obj-c proto parser. 6 years ago
Matthew Chen 06d84860ae Fix rebase breakage. 6 years ago
Matthew Chen 45e782c243 Revamp orphan data cleaner. 6 years ago
Michael Kirk 0bc03b0fd4 Move seed 6 years ago
Matthew Chen 6be3d2e42d Code generate Swift wrappers for protocol buffers. 6 years ago
Matthew Chen dfc39b4a1d Tidy files. 6 years ago
Matthew Chen e6bc37d941 Tidy files. 6 years ago
Matthew Chen 8f55f53329 Tidy files. 6 years ago
Matthew Chen d6cb07cc4a Respond to CR. 6 years ago
Matthew Chen 0f4e846ed7 Tidy profile avatars. 6 years ago
Matthew Chen 579e88bdc2 Improve nullability handling for SignalAccount. 6 years ago
Michael Kirk 78ad597e44 Merge tag '2.28.0.15' 6 years ago
Michael Kirk def8b43daa iOS9/10 fixups 6 years ago
Michael Kirk 78b4df95a5 fixup call banner offsets 6 years ago
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
6 years ago
Matthew Chen fa8a07abf1 Respond to CR. 6 years ago
Matthew Chen 581347a7fb Refine theme. 6 years ago
Matthew Chen 7759c9ca0f Refine theme. 6 years ago
Matthew Chen f795b12a86 Refine theme. 6 years ago
Michael Kirk 6e1c1a681b Merge tag '2.28.0.12' 6 years ago
Michael Kirk b42f528713 Integrate with new contact discovery endpoint
Also:
* use system cookie parsing
* add AESGCM additional authenticated data parameter

// FREEBIE
6 years ago
Matthew Chen 25a98554b7 Intern JSQMessagesViewController. 6 years ago
Matthew Chen 906d0b01a4 Fix build break. 6 years ago
Matthew Chen 819c2b1ceb Remove Twisted Oak. 6 years ago
Michael Kirk 3d6b8e2bb5 hide navbar blur layer in attachment approval, which has a clear navbar 6 years ago
Matthew Chen 2b1f928770 Respond to CR. 6 years ago
Matthew Chen 48975eaac8 Respond to CR. 6 years ago
Matthew Chen 8862f9a531 Refine views. 6 years ago
Matthew Chen fcbf8d4dc2 Refine views. 6 years ago
Matthew Chen 9f9e0965d5 Refine table views. 6 years ago
Michael Kirk ab1190222b Fix overzealous failure when user has no Signal contacts
// FREEBIE
6 years ago
Matthew Chen 460f7344ad Remote attestation. 6 years ago
Matthew Chen 39c7fd9f15 Respond to CR. 6 years ago
Matthew Chen 3c3742aae9 Clean up ahead of PR. 6 years ago
Matthew Chen bf1642052a Fix nullability. 6 years ago
Matthew Chen 03e5d2973b Delta contact intersections. 6 years ago
Matthew Chen d14f764b50 Streamline SignalRecipient. 6 years ago
Michael Kirk d591fb7f2c Fix some compiler warnings 6 years ago
Matthew Chen 0c453c8d57 Fix content insets. 6 years ago
Michael Kirk 11fc674ef4 Avoid blur as overly-tall navigation bar lingers after dismissal.
Use the precise status bar height.
6 years ago
Michael Kirk 7a5f5476db rename to avoid confusion 6 years ago
Michael Kirk 06b4584e02 move fix to OWSViewController 6 years ago
Michael Kirk 24060c17d0 CR: proper width calculation for header view 6 years ago
Michael Kirk fef6c64bdc decrease header spacing from 32->28.
Previous spacing was based on applying the "full width" gutter spacing twice.
6 years ago
Michael Kirk 8da47b64d9 clarify different methods
These method names were too similar to existing methods in PureLayout, which
have slightly different behavior.

ows_autoPinToSuperviewEdges uses left/right, whereas PureLayouts uses
leading/trailing

ows_autoPinToSuperviewMargins uses our own constraint adding logic, which
behaves differently in some cases.
6 years ago
Matthew Chen c3b02522ca Fix oversize accessory view. 6 years ago
Matthew Chen 3a3fb0e41b Fix oversize accessory view. 6 years ago
Michael Kirk 1a2428a4b0 CR: leave some wiggle room on max window height. 6 years ago
Michael Kirk bdc8181cbc hide menu view controller when resigning active
// FREEBIE
6 years ago
Michael Kirk dde2fd6f33 Hide menu window when vc dismisses.
Normally this isn't possible, just being paranoid.

// FREEBIE
6 years ago
Michael Kirk 82fdd5b883 Split out generic action sheet components
Keep the message specific components separte, so we could re-use the
MenuActionsViewController.
6 years ago
Michael Kirk 3a157d9df6 window level on iOS11
// FREEBIE
6 years ago