Commit graph

397 commits

Author SHA1 Message Date
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
Matthew Chen
0e749d5521 Fix build break. 2018-11-13 10:24:49 -05:00
Matthew Chen
49c8e6db7d Merge remote-tracking branch 'origin/release/2.31.0' 2018-11-13 09:50:44 -05:00
Matthew Chen
4b213df950 Fix race in ProximityMonitoringManager. 2018-11-13 09:26:46 -05:00
Michael Kirk
0d7e94f2f6 Fix: Voice Messages don't restore audio to speaker when held up to the ear past
the voice notes duration.

Specifically:

- start a voice note
- hold to ear until complete
- remove from ear
- start another voice note (or the same one) with the phone away from your ear

You'd expect audio to play through the external speaker, but instead it comes
through the earpiece.

Based on the added logging, this seems to be an apple bug.
2018-11-12 20:12:08 -06: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
Michael Kirk
85a4fc7b66 restore calling banner
The `statusBarDidChange` is called when entering but not leaving landscape mode
we we've got to update manually before showing the call banner.
2018-11-01 08:43:59 -06:00
Michael Kirk
19f2d0db48 WIP: Media Landscape Mode 2018-11-01 08:43:59 -06: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
6968dbab17 Update UIDevice on main thread 2018-10-26 15:32:12 -06:00
Michael Kirk
5632bd2d83 Use reference counting to disable proximity monitoring after audio message
Multiple overlapping activities require proximity monitoring (namely,
CallViewController and listening to audio messages).

These activities can overlap arbitrarily, so we use a reference counting
strategy to keep proximity monitoring on as long as one of these activities is
active.
2018-10-26 15:32:12 -06:00
Matthew Chen
408008d3e7 Use different contact avatar assets depending on size of output. 2018-10-26 15:18:45 -04:00
Matthew Chen
4ea6d72008 Improve default avatar quality. 2018-10-26 15:18:45 -04:00
Matthew Chen
5b339a642b Respond to CR. 2018-10-25 15:39:16 -04: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
28f37a7a34 Update contacts cells' dependencies. 2018-10-25 09:48:57 -04:00
Michael Kirk
ce9ca1bdaa audio player type 2018-10-24 07:46:27 -06:00
Michael Kirk
3b4188f34b hoist audio session singleton to Environment 2018-10-24 07:46:25 -06:00
Michael Kirk
3d022adf4e WIP: audio activities 2018-10-24 07:44:50 -06:00
Matthew Chen
275414cbda Respond to CR. 2018-10-16 17:42:54 -04:00
Matthew Chen
7c1f1882d8 Sync "show UD indicators" setting. 2018-10-16 17:42:54 -04:00
Matthew Chen
603e3bf0b6 Move SM singletons to Environment. 2018-10-15 11:34:42 -04:00
Matthew Chen
f1d93d4472 Merge remote-tracking branch 'origin/release/2.30.2' 2018-10-12 16:00:42 -04:00
Michael Kirk
d5f69e4bba feature flag for group avatar color 2018-10-12 15:32:03 -04:00
Michael Kirk
1544f8db46 Optionally show UD status in message details 2018-10-11 09:04:35 -06:00
Matthew Chen
17541a8888 Change conversation bubble colors. 2018-10-09 16:06:23 -04:00
Michael Kirk
2b805e4eae Constantize ConversationColorName, map previous incorrect values 2018-10-04 18:21:35 -06:00
Michael Kirk
d59e21e7f0 Nothing outside of TSThread should know about legacy colors 2018-10-04 17:07:50 -06:00
Michael Kirk
405cc31a38 Apply new colors to new conversation 2018-10-04 10:34:57 -06:00
Matthew Chen
95387dd220 Fix rebase breakage. 2018-10-03 08:59:55 -04:00
Matthew Chen
24d7a97616 Fix rebase breakage. 2018-10-01 09:08:41 -04: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
79add78d51 Merge branch 'release/2.30.1' 2018-09-27 13:03:35 -06:00
Matthew Chen
5a99cd347f Pull out OWSConversationColor to its own file. 2018-09-27 12:24:14 -04:00
Matthew Chen
43dc362fc7 Fix secondary color within message bubbles. 2018-09-27 12:22:52 -04:00
Matthew Chen
0e5f42defe Use new asset for default contact avatars. 2018-09-27 12:22:14 -04:00
Matthew Chen
ec0206ff01 Adapt text size of default avatars to avatar size. 2018-09-27 11:25:18 -04:00
Matthew Chen
6d14a1b472 Local profile default avatars should use steel background. 2018-09-27 11:24:20 -04:00
Matthew Chen
27488f078a Replace old "default profile avatar" icon with default avatar for local user. 2018-09-27 11:24:20 -04:00
Matthew Chen
e4ab360716 Respond to CR. 2018-09-27 10:43:50 -04:00
Matthew Chen
ff6feafe8c Update text colors. 2018-09-27 09:30:59 -04:00
Matthew Chen
6715e3d1ad Respond to CR. 2018-09-27 09:28:16 -04:00
Matthew Chen
b20cd57383 Rename OWSConversationColor. 2018-09-27 09:15:15 -04:00
Matthew Chen
3adc03fa2c Rework conversation message bubble colors; add "conversation colors" class. 2018-09-27 09:07:47 -04:00
Matthew Chen
b3ad6e27dc Rework conversation message bubble colors; add "conversation colors" class. 2018-09-27 09:07:47 -04:00
Matthew Chen
26a2d568de Add "conversation color mode" enum. 2018-09-27 09:07:47 -04:00
Matthew Chen
e5150267c2 Rework the conversation color constants. 2018-09-27 09:07:47 -04:00
Matthew Chen
da63731447 Respond to CR. 2018-09-27 09:07:03 -04:00
Matthew Chen
8db4595bdc Rework group avatars to reflect conversation colors. 2018-09-27 08:55:20 -04:00
Matthew Chen
1c920c6be6 Rework group avatars to reflect conversation colors. 2018-09-27 08:55:20 -04:00
Matthew Chen
25d56b30c1 Rework group avatars to reflect conversation colors. 2018-09-27 08:55:20 -04:00
Matthew Chen
2f9eae5caf Respond to CR. 2018-09-27 08:50:52 -04:00
Michael Kirk
fe7d69e9c6 Update thread's sorting order based on whatever the currently last message is 2018-09-26 09:52:34 -06: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
2eb3ec6d0c benchmark migration 2018-09-26 09:52:34 -06:00
Michael Kirk
c27d35f8f2 sort search results by sortId 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
Matthew Chen
7b2dd19fb8 Respond to CR. 2018-09-25 16:11:37 -04:00
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. 2018-09-25 16:11:37 -04:00
Matthew Chen
8cf5f3e58f New grayscale palette. 2018-09-20 10:14:20 -04:00
Michael Kirk
21e67e9a1d New resolutions for call banner, rename to accommodate multiple X devices.
Only apply work-around to legacy versions where required.
2018-09-19 11:17:40 -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
b447e68597 clarify post-unblock-group copy 2018-09-14 11:09:14 -05:00
Michael Kirk
c1b88b5f48 copy cleanup: remove redundant body 2018-09-14 10:52:01 -05:00
Michael Kirk
0f9b0936df Use cached group details when rendering blocklist 2018-09-14 10:31:17 -05:00
Michael Kirk
1f15ba6dc5 Cache group details on blocking manager
In case the group thread is later deleted.
2018-09-14 10:31:17 -05:00
Michael Kirk
7b7da4bc13 add docs to BlockListCache 2018-09-12 19:16:14 -05:00
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.
2018-09-12 19:16:14 -05:00
Michael Kirk
b6eb1476cb Leave group when blocking it 2018-09-12 19:16:14 -05:00
Michael Kirk
c6de8c579c WIP: Localizations 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
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
2018-09-12 19:16:14 -05:00
Matthew Chen
cc117b385c Modify environment accessors to use our 'shared' convention. 2018-09-07 16:20:59 -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
ac4365e1c9 Add OWSThumbnailService. 2018-09-06 15:30:00 -04:00
Matthew Chen
9ab4da5c81 cherry-pick Merge branch 'charlesmchen/logSdp' 2018-09-04 13:51:31 -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
0b5b74a901 Respond to CR. 2018-08-27 10:49:26 -04:00
Matthew Chen
b4539328e1 Log call session description. 2018-08-27 10:49:25 -04:00