Commit Graph

200 Commits

Author SHA1 Message Date
Matthew Chen 1820fdbde8 Merge remote-tracking branch 'origin/hotfix/2.8.3' 2017-03-20 12:55:05 -04:00
Michael Kirk 99c982fbb2 change ZXing to framework for faster incremental compiles in xcode
// FREEBIE
2017-03-16 12:04:45 -04:00
Michael Kirk 3ee1d5568c Migrate existing users to RTC calling
// FREEBIE
2017-03-14 18:59:48 -04:00
Matthew Chen cd928cd9be Update MessagesViewController to use SignalAttachment.
// FREEBIE
2017-03-14 10:23:16 -03:00
Michael Kirk 3e651fb8df filter undisplayable text
// FREEBIE
2017-03-09 17:52:19 -05:00
Michael Kirk 9b2eb80392 Code review on new-features
* use page view controller
* UIPageControl instead of arrows for idiomatic swiping
* Nudge title lower
* better hit area for dismiss
* use darker blue for text
* Open privacy settings from callkit update screen
* tweak copy
* latest translations

// FREEBIE
2017-03-02 22:09:33 -05:00
Michael Kirk b371e627c4 one-time carousel of changes
// FREEBIE
2017-03-02 14:37:50 -05:00
Matthew Chen a4093a5f7f Respond to CR.
// FREEBIE
2017-02-17 17:30:49 -05:00
Matthew Chen 5bd44673ea Add sharing of attachments.
// FREEBIE
2017-02-17 09:39:58 -05:00
Michael Kirk 2791b9551e bump build
// FREEBIE
2017-02-10 17:42:21 -05:00
Matthew Chen 97001018ae Clean up prekey logic.
// FREEBIE
2017-02-10 16:35:16 -05:00
Matthew Chen c43063e1d6 Add “interstitial call view” that is shown during lengthy “webrtc supported” check.
// FREEBIE
2017-02-07 17:17:06 -05:00
Michael Kirk bbfd9ba74d Place Signal/Redphone calls from system contacts
// FREEBIE
2017-02-01 18:56:37 -05:00
Matthew Chen 699b364ec7 Show/hide call view controls in remote video mode if user taps screen.
// FREEBIE
2017-01-30 14:04:57 -05:00
Michael Kirk e556a369bb Include missing files to fix tests
// FREEBIE
2017-01-26 15:00:02 -05:00
Michael Kirk 814aec6cdd Recover CallKit state when remote client fails to hangup
Distinguish between localHangup, remoteHangup, and call failure.

This allows us to put CallKit in the proper state, ready to receive new
calls without having a backlog of phantom calls which haven't been
properly removed.

Note the "call error" occurs at the point ICE fails, which takes a
while. Anecdotally, like 10 seconds, which feels like a long to be
talking into the ether.

I briefly considered failing at 'disconnected', which happens much
sooner, but that's actually a recoverable state. E.g. if you toggle
airplane mode you can see that you bounce into `disconnected` and then
back to `connected`, so I don't think we'd want to fail the call as long
as WebRTC considers it "recoverable".

// FREEBIE
2017-01-26 13:18:06 -05:00
Michael Kirk a6029f2545 Merge remote-tracking branch 'origin/master' into feature/webrtc 2017-01-25 09:54:33 -05:00
Michael Kirk b2091431dc Fix retain cycle
// FREEBIE
2017-01-24 14:13:29 -05:00
Michael Kirk 87ed662116 Persist AudioService if CallViewController is dismissed
...in response to CR, move the AudioService off of the CallViewController

Adopt multiple observer pattern vs. a singular delegate. Doing so
required implementing some machinery to address the ARC (see:
Weak.swift)

// FREEBIE
2017-01-24 14:13:29 -05:00
Michael Kirk 4374e431a2 Respect silent switch in and out of app.
// FREEBIE
2017-01-24 12:57:02 -05:00
Michael Kirk 907e122d62 Migrate legacy db stored logging preferences to NSUserDefaults
This is part of making sure we can log *before* the DB is initialized.

// FREEBIE
2017-01-23 20:10:58 -05:00
Michael Kirk dbb29d7d7e Don't require recording permissions until call is ringing.
We do this by manually managing the RTCAudioSession.
Unfortunately to do this we have to include a couple of RTC headers not
exported by the default build of WebRTC.framework (see: Libraries/WebRTC)

// FREEBIE
2017-01-17 21:49:13 -05:00
Michael Kirk 8998853aff Move RTCPeerConnectionDelegate to PeerConnectionClient
This makes sense as PeerConnectionClient is our interface to WebRTC

- Makes it easier to test PeerConnectionClient and CallService
- Allows us to shrink CallService class a bit (it's huge)

// FREEBIE
2017-01-17 20:14:33 -05:00
Matthew Chen c6de676018 Respond to CR.
// FREEBIE
2017-01-12 17:55:44 -05:00
Matthew Chen 4a65a88512 Rework new call view.
// FREEBIE
2017-01-12 15:55:14 -05:00
Michael Kirk a17873291b Fix up tests
// FREEBIE
2017-01-12 09:56:09 -05:00
Michael Kirk 9e248168b9 merge CallKitProviderDelegate into CallKitCallUIAdaptee
There was not a clear distinction in responsibilities and mostly the
Adaptee was just delegating to the CKProviderDelegate
2017-01-12 09:56:09 -05:00
Michael Kirk 647b2b37e9 WIP: WebRTC calling
* Ensure NotificationsManager has dependencies
    Otherwise it's easy to mess up the order of the required dependencies.
* move AccountManager into Environment, it's heavy to construct

// FREEBIE
2017-01-12 09:56:05 -05:00
Thomas Guillet d7b27a4021 Refactor ContactsPicker to show a clean search bar
* Replace UITableviewController to UIViewController
* Create a custom xib file
2017-01-09 11:45:43 +01:00
Michael Kirk 90daf60c56 Fix travis build
* Add generated Signal-Swift.h to test search header path. You must do
  this when testing an ObjC clas with swift dependencies (PushManager. in this case)
* Word on the street is that XCode8.2 is less flaky for running simulator tests

// FREEBIE
2016-12-22 10:48:06 -06:00
Michael Kirk ddba843d44 Censorship circumvention in Egypt and UAE
* domain fronting
* non-websocket message fetching

// FREEBIE
2016-12-21 10:04:23 -06:00
Daniel Rosado 76d01863db [Invite Flow] Use email address to collate contacts when no given or family name is provided
* Add tests to ContactsPicker collate contacts functionality
2016-12-09 15:12:13 -05:00
Michael Kirk 5a0141003d "No Contacts" screen uses new invite flow
fixes #1501

// FREEBIE
2016-11-30 15:03:18 -05:00
Josh Schneier 896dd026d2 Remove DJWActionSheet 2016-11-29 10:20:56 -05:00
Michael Kirk f30c733ef3 Custom contact picker for invite flow
Preferred to the system contact picker because:
1. removes "group" clutter from header, unlikely to be used much.
2. can select while searching
3. fixes unified contact problem where e.g.
   If only one of your contact has a phone number, they appear disabled
   when choosing to invite via messaging, even though the other linked
   contact *does* have a phone number.
4. label users w/o email so it's clearer why they can't be selected

Also:

* Twitter share-image was too tall

// FREEBIE
2016-11-26 14:43:42 -05:00
Michael Kirk 06ca3c9290 Mail and Message invite flow
* Spruce up compose contact-picker
- Fix random sorting for contacts missing first or last name
- Add Avatar to contact picker
- de-dupe contacts

Better copy for INVALID_MESSAGE error.

// FREEBIE
2016-11-22 12:11:35 -05:00
Michael Kirk 584118a9fc compare safety numbers with clipboard (#1475)
* Compare safety numbers with clipboard

// FREEBIE
2016-11-21 11:06:37 -05:00
Michael Kirk 88d9ef987f Share dialog for Safety Numbers
// FREEBIE
2016-11-15 18:44:52 -05:00
Michael Kirk d3c2f44aeb Exclude extra data detectors.
Data detectors work by matching local text against a series of local
matchers. No network activity is required. Some of the data detectors
are really useful (e.g. a link, or being able to copy a phone number).

Some aren't very useful, e.g. pop culture references, and seeing things
underlined is giving people the false impression that their data is
being inspected remotely.

// FREEBIE
2016-11-14 08:58:22 -05:00
Michael Kirk c2aa17e362 Changed Safety numbers no longer block communication
When your partner changes their identity key (e.g. by reinstalling),
you'll see a notice alongside their message, but it will no longer
prevent the message from showing. aka "non blocking".

Existing users will be opted into the previous blocking behavior.

This is configurable for all users in Settings > Privacy.

// FREEBIE
2016-11-11 09:13:38 -05:00
Jarosław Pawlak c152c1c83a asking for camera permissions #1363 2016-11-08 16:28:24 -05:00
Michael Kirk c6a2fbff23 Tapping corrupted message opens "session reset" activity
This action was previously hidden under a secret longpress gesture in
the fingerprint view controller.

Ideally we'd never receive corrupted messages, but at the point we do,
our sessions are out of whack, and the only recovery option is to reset.
Let's help our users do that.

* Resetting session sends END_SESSION message

  Otherwise the remote side wouldn't know we reset the session and will
  send us a message on the old ratchet.

* Don't reset their identity key when resetting sender ratchet.

* Updated translations

// FREEBIE
2016-11-04 14:57:37 -04:00
Michael Kirk bd370f1de4 Fix cropped Chinese/Japanese messages
The earlier fix for the broken ios10 emoji font ended up breaking
messages for some users with a tall font.

Here we have a lighter touch - ensuring we don't touch messages that
don't use emoji.

Also, introduce a different approach to the fix, rather than trying to
compute the bounding rect of an appropriately attributed string, just
add an extra bit of height per line.

This approach isn't ideal for long messages with only one emoji line in
them, but the previous approach was incompatible with Chinese messages
that also contain emoji. See the new
`MesssagesBubblesSizeCalculatorTest.swift` for test cases considered.

// FREEBIE
2016-11-03 16:22:33 -04:00
Michael Kirk 62f9606bf5 Merge branch 'mkirk/fix-registration-without-background-modes#1329'
// FREEBIE
2016-11-03 16:19:21 -04:00
Michael Kirk 1dd06a5e6c Fix registration flow / Keep push tokens in sync
* Separate registering an account from registering for push notifications
  * Allows us to complete registration without prompting user for
    notification settings.

UX Changes
----------
* Automatically keep push tokens in sync on startup.
  Push tokens *can* change, though they rarely do. It happens more often
  for people switching between appstore/beta builds.

  fixes #1174

* Show alert with registration failure
  * add secret 8-tap debug log gesture to registration flow

* Move registration to separate flow
  * don't see flash of inbox when first launching

* show useful error messages when given wrong code / no code

* remove background fetch
  We werent using it, but only relying on a side effect of it which is
  no longer necessary.

Code Changes
------------

* More registration logging.

* Install PromiseKit with carthage

  Our dependencies are not yet framework compatible, so we can't use
  cocoapods.

* Merge preferences util "category" into superclass.

  The immediate reason for this is Swift interop was assuming optional
  types were not optional, and exploding when a value was nil.

  This is clearer anyway, since we were treating it like a subclass, and
  it was the only thing using the class anyway.

* auto-genstrings now searches *.swift (and *.h, which was previously
  broken) for translateable strings.

// FREEBIE
2016-11-03 16:13:49 -04:00
Matthew Douglass c958c7909c Unifies bubble sizes for media bubbles
Media bubbles (for photo, video and animated) sizes are calculated using shared logic. The bubbles are fixed width and their height is calculated based on the aspect ratio of the underlying image (clamped to a reasonable min/max height).

Fixes #1270

// FREEBIE
2016-10-27 21:47:53 -07:00
Michael Kirk 7c32259a92 We aren't using ErrorMessage/InfoMessage. (#1412)
We incorrectly assumed some parameters were these types, but actually
they were TSMessageAdapters.

// FREEBIE
2016-10-23 13:39:42 -04:00
Michael Kirk 1e417ea93f Longpress to copy safety numbers
Nothing else to see here. =)

 ༼ つ ◕◡◕ ༽つ [swift]

// FREEBIE
2016-10-13 10:04:58 -04:00
Michael Kirk b95112356c iOS 8 Fixups
* ContactsUI framework is not available on ios<9.
  And it never was, so this framework should not be "required".

* Fix conversation settings title font on ios8

* Fix fingerprint not displaying on ios8

* ios8 safety number indented on third line.

* Fix glitchy table cell animation (not ios8 specific)

  The defaut slide-under animation only looks good if you're using a
  standard table cell height, but our duration slider is taller than the
  rest of the table's cells.

  Plus add a little bottom padding to the slider cell

// FREEBIE
2016-10-12 09:30:25 -04:00
Michael Kirk ee0cce75e8 Disappearing Messages
* Per thread settings menu accessed by tapping on thread title

  This removed the toggle-phone behavior. You'll be able to see the phone
  number in the settings table view.

  This removed the "add contact" functionality, although it was already
  broken for ios>=9 (which is basically everybody).

  The group actions menu was absorbed into this screen

* Added a confirm alert to leave group (fixes #938)

* New Translation Strings
* Extend "Add People" label to fit translations.
* resolved issues with translations not fitting in group menu

* Fix the long standing type warning where TSCalls were assigned to a TSMessageAdapter.

* Can delete info messages

  Follow the JSQMVC pattern and put UIResponder-able content in the
  messageBubbleContainer. This gives us more functionality *and* allows us
  to delete some code. yay!

  It's still not yet possible to delete phone messages. =(

* Fixed some compiler warnings.

* xcode8 touching storyboard. So long xcode7!

* Fixup multiline info messages.

  We were seeing info messages like "You set disappearing message timer to
  10" instead of "You set disappearing message timer to 10 seconds."

  Admittedly this isn't a very good fix, as now one liners feel like they
  have too much padding.

   If the message is well over one line, we were wrapping properly, but
  there's a problem when the message is *just barely* two lines, the cell
  height grows, but the label still thinks it's just one line (as evinced
  by the one line appearing in the center of the label frame. The result
  being that the last word of the label is cropped.

* Disable group actions after leaving group.

// FREEBIE
2016-10-12 09:30:25 -04:00