Commit graph

112 commits

Author SHA1 Message Date
Michael Kirk f8d65ab0f5 Post JSQMVC code cleanup
* formatting
* referencing TODOS
* remove unnecessary logging

// FREEBIE
2016-07-14 23:15:06 -07:00
Michael Kirk b7dd51438e Move colors into style class
// FREEBIE
2016-07-14 23:15:06 -07:00
Michael Kirk 1a4b38e34b Modernize init, dealloc, dicts
* Use NS_DESIGNATE_INTIALIZER to ensure we're setting all the variables we need to be in OWSCall
* no need to nil properties in dealloc on ARC
* use declarative dictionaries for legability

// FREEBIE

use declarative dictionaries for clarity
2016-07-14 23:15:06 -07:00
Michael Kirk f7f1b6877b Remove unused call thumbnail code
// FREEBIE
2016-07-14 23:15:06 -07:00
Michael Kirk e930574b1b rename our custom JSQ classes to OWS so it's clear what is/not our code.
This was done as part of unforking JSQMessagesViewController, but is
intentionally a separate commit so we can separate formatting changes
from code changes in git history.

* Import frameworks like:
    #import <FrameworkName/HeaderName.h>
* instead of:
    #import "HeaderName.h"

// FREEBIE
2016-07-14 23:15:06 -07:00
Michael Kirk 4d320d6015 Unfork JSQMessagesViewController
Geting back on upstream fixes a couple bugs (see ##Bugfixes), and also
will make future updates easier.

The unforking process was basically this:

* move custom message types (Calls and DisplayedMessages) classes from our
  custom JSQMVC fork into Signal-iOS.
* Move any method customization into our subclass. Including
  ColletionView stuff, bubble sizing, and gesture behavior

Bug Fixes
---------
* Fix mis-sized incoming media bubbles.

Bubble size was being cached by interaction id. Which broke when
receiving an attachment. The problem is that incoming media messages
were initially the height of a "Downloading Attachment" info message.
Instead we use the mediaHash for media messages to expire the bubble
size when the media changes.

* fix missized bubble when MVC did appear

The MessagesViewController isn't sized correctly until ViewWillAppear.
This caused the first round of bubbles to be rendered incorrectly (they
assumed a larger container than they had).  I think is reflected in the
current version of the app by a reflow occurring shortly after the view
appears.

Chores
------
* bump travis to build with xcode8
* specify RQV development team for device build. required by xcode 8 beta

Cleanup
------
* Refactor messageing XIB so that elements are hangning outside of
  the views frame
* Fix compiler warning with explicit cast
* delete deprecated lineBreakmode, it's the default value anyway.

// FREEBIE
2016-07-14 23:15:05 -07:00
Michael Kirk d4f2c0f249 ensure picker source available to prevent crash
This is crashing on simulator, but presumable if it weren't available
for other reasons (permissions?) it would also crash.

// FREEBIE
2016-07-07 10:31:51 -07:00
Michael Kirk 26f5418500 Remove distinction between TS and RP users
* Ensure we're always showing call button for non-group threads.
* search phone strings directly rather than precomputing field

// FREEBIE
2016-06-28 08:58:29 -07:00
Michael Kirk 1e0f0157c1 namespace ContactsManager -> OWSContactsManager
rename test class ContactManager->OWSContact_s_Manager
update docs

// FREEBIE
2016-06-28 08:58:29 -07:00
Michael Kirk aa9908d439 Large media attachments should be compressed (#1232)
* compress non-GIF media as JPEG

There are some problems with this approach
- Potentially re-encoding files
- Lots of code in the controller

* Compress GIF > 5MB into static JPEG.

This isn't ideal, but a stopgap to prevent people from sending huge
GIFs, while also giving them *some* kind of feedback (e.g. a static jpeg
is sent rather than their being no indication to sender+recipient that
anything was attempted.)

* spell bmp correctly

// FREEBIE
2016-06-23 13:43:31 -07:00
Michael Kirk 7c84c4569a Only call UI modifying observers when UI is present (#1226)
* centralize observers relevant to a "visible UI"
* collocate init/teardown of observers

// FREEBIE
2016-06-17 10:45:48 -07:00
Michael Kirk bee7c71dff Prevent freeze when swiping back twice. (#1224)
FIXES #1222

Maybe this code was a vestige of a former way we were customizing the
back button. In any case, it's no longer required for swipe-to-pop
functionality.

// FREEBIE
2016-06-16 16:42:01 -07:00
Michael Kirk 9bacc3de78 Reset compose view on thread switch (#1187)
* all Signal users can send text messages, never hide texting toolbar.

//FREEBIE

* Fix composition box size when switching threads.

Partial revert of 2c83046ff6 which
introduced a shared reusable message view controller across threads.

2c83046ff6 resulted in several discovered
bugs so far (#1179, #1150, #1152, and maybe: #1146). It's pretty clear
at this point we're going against the grain of how
JSQMesageViewController is intended to be used, and since the nominal
purpose of this feature (iPad Layout) doesn't exist, we should revert to
the known good way of interacting with the MessageViewController,
creating a fresh instance per thread.

// FREEBIE
2016-05-17 09:38:49 -07:00
Michael Kirk 7f022404d1 [UI] smaller group action menu icon, revert edit divider to neutral color (#1169)
* Group actions bar button image was too big

Added image inset to resize.

// FREEBIE

* return blue line to neutral gray. (partial revert of 0c1a97a743)

// FREEBIE

* Podfile.lock corollary to updating SSL in b7813bdc9a

// FREEBIE
2016-05-07 09:29:10 -07:00
Michael Kirk 5286c032ce reset "Load Earlier Messages" when switching threads (#1163)
Since we're now re-using the message controller across threads, we have
to reset some elements to their initial state when switching threads.
Missed this one.

Fixes: #1150

// FREEBIE
2016-04-26 18:57:55 -07:00
Michael Kirk 9f572881f8 * Cache cleaning uses YAP notificationsThis way we don't have to worry about cleaning the cache explicitlywhen we do destructive actions.// FREEBIE
* Cache cleaning uses YAP notifications

This way we don't have to worry about cleaning the cache explicitly
when we do destructive actions.

// FREEBIE
2016-04-18 10:07:35 -07:00
Michael Kirk 5869fb8e06 Fix ability to attach photos from camera (#1112)
* Fix ability to attach photos from camera

Looks like this came about with the animated GIF handling. We'll only
go down the byte-comparison-mime-type-detecting code path for attaching
existing photos, since it only exists for animated GIFs.

This will also revert to properly compressing our image attachments, so
long as they are taken from the camera.

* Prevent crash when tapping broken image

It never makes sense to present a "full screen" nil image. Previously
this happened when camera-capture was broken, but could conceivably
happen for other as-of-yet unknown reasons.

// FREEBIE
2016-04-13 11:38:42 -07:00
Michael Kirk c0bb704d2d Cache instantiated interactions (#1152)
*most* of our time when scrolling around a message view is in this
method. Doubly so when these are media items.

remove interaction from cache when it is deleted/updated

// FREEBIE
2016-04-13 10:05:09 -07:00
Arek Banas 72e1180e16 Removing unused didReceiveMemoryWarning methods from view controllers.
Closes #1078
2016-04-08 11:35:29 +02:00
Frederic Jacobs 4034baedb9 Adapting to renaming. 2016-04-08 09:47:41 +02:00
Michael Kirk f44393bb74 Re-introduces the delete action.
The delete action became opt-in in JSQMessagesViewController.
Fixes #913
Closes #1104

//FREEBIE
2016-03-27 20:12:29 +02:00
Frederic Jacobs 2c83046ff6 Closes #990.
- Use single MessagesViewController. Goal: Being able to reuse that UI
for SplitViewController on iPad. Prevents unnecessary deallocations and
re-allocations.
- Remove custom archiving UI for default swipe right to left archive
action, like in iOS Mail.app.
- DynamicType for main view.
- Simplify API of MessagesViewController to prevent undefined behavior.
//FREEBIE
2015-12-26 18:12:13 +01:00
Mahyar McDonald 0c1a97a743 Some nits & add corner rounding to the message text box.
Closes #884
2015-12-24 11:43:24 +01:00
Frederic Jacobs c6d44e59e2 TextSecureKit Refactoring
- Using same clang format file for old and new files.
- Moving out all TextSecure code to allow other clients (OS X, iOS) to
  integrate easily TextSecure functionality.
- Use TextSecure API to signup.
2015-12-22 23:41:10 +01:00
Michael Okner 37b582beda Adding support for animated gifs
Implemented using corbett's suggestion in issue #525. Uses
Flipboard/FLAnimatedImage in an AttachmentAdapter. Detects gifs using
new Animated category in MIMETypeUtil.

Backwards compatible with previous versions of Signal on iOS for both
sending and receiving Gifs, though they are sent/received in older
versions as UIImage and won't animate. Gifs also animate on both ends of
conversations with TextSecure users on Android.

//FREEBIE
2015-11-29 12:59:34 +01:00
Frederic Jacobs 26f9207cab Bye Bye Bloomfilters
For reasons outlined in
https://whispersystems.org/blog/contact-discovery/ , Signal will no
more use bloom filters for RedPhone contact intersection.
2015-11-29 01:14:49 +01:00
Frederic Jacobs ef6e658c38 Performance updates & smarter layout (2 lines)
- Adding support for ContactsUI when adding contacts on iOS 9.
- Multiple performance updates by liberating the main thread and
reusing tableview cells.
2015-10-31 23:44:15 +01:00
Frederic Jacobs bbde7cd2a8 iOS 9 Support
- Fixing size classes rendering bugs.
- Supporting native iOS San Francisco font.
- Quick Reply
- Settings now slide to the left as suggested in original designed
  opposed to modal.
- Simplification of restraints on many screens.
- Full-API compatiblity with iOS 9 and iOS 8 legacy support.
- Customized AddressBook Permission prompt when restrictions are
  enabled. If user installed Signal previously and already approved
  access to Contacts, don't bugg him again.
- Fixes crash in migration for users who installed Signal <2.1.3 but hadn't signed up
  yet.

- Xcode 7 / iOS 9 Travis Support
- Bitcode Support is disabled until it is better understood how exactly
  optimizations are performed. In a first time, we will split out the
  crypto code into a separate binary to make it easier to optimize the
  non-sensitive code. Blog post with more details coming.
- Partial ATS support. We are running our own Certificate Authority at
  Open Whisper Systems. Signal is doing certificate pinning to verify
  that certificates were signed by our own CA. Unfortunately Apple's App
  Transport Security requires to hand over chain verification to their
  framework with no control over the trust store. We have filed a radar
  to get ATS features with pinned certificates. In the meanwhile, ATS is
  disabled on our domain. We also followed Amazon's recommendations for
  our S3 domain we use to upload/download attachments. (#891)
- Implement a unified `AFSecurityOWSPolicy` pinning strategy accross
  libraries (AFNetworking RedPhone/TextSecure & SocketRocket).
2015-10-31 04:45:55 +01:00
Frederic Jacobs ada07351e1 Support for supportsVOIP attribute.
- Deprecates RedPhone upgrade flow.
- Adds a generic upgrade dialog.
- Upgrades dependencies.
- Reorganizes `TSStorageManager` & TSNetworkManager imports.
2015-08-23 00:00:39 +02:00
Frederic Jacobs c4bf4a8f50 Preliminary iOS9 support and upgrading to CocoaLumberjack 2.0 2015-08-14 00:19:29 +02:00
Frederic Jacobs f6c0625c2c Removing unused imported classes.
//FREEBIE
2015-07-27 16:19:08 +02:00
Frederic Jacobs 2fc20702d9 Fixing crash on responding to phone call. 2015-06-19 16:09:05 +02:00
Frederic Jacobs 08e3b31eec Recipient's name in group key conflict on send. 2015-06-07 22:41:59 +02:00
Frederic Jacobs cd0fb8bc51 Fixing graphical glitch in tread with images. 2015-06-07 22:41:59 +02:00
Frederic Jacobs 57f86008d1 UX and Notifications fixes
- Removes large confusing UX bar and related assets. Replaced with UISwitch.
- Enhanced user experience for missed calls.
- Fixes issue where missed call would appear as incoming call in call log.
- Fixing issues where PushKit handler not called on launch.
2015-06-07 22:38:28 +02:00
Frederic Jacobs 93de0a4326 UX improvements in how failed messages can be resent. 2015-06-07 19:33:27 +02:00
Brendan Ragan 0f57804eef Enable data selectors. 2015-05-12 18:37:19 +02:00
Frederic Jacobs e47e9759e9 Fixing leaky caches. 2015-04-28 02:15:41 +02:00
Frederic Jacobs 13448bdb2d Notifications enhancements.
- Tap to reply to a message.
- Badges application with the number of unread messages.
- Pick up a phone call from lock screen, or decline it.
- Settings for notification sounds while app in foreground and text displayed on local notifications.
2015-04-28 02:15:37 +02:00
Frederic Jacobs 1f61291e0c Addresses some performance issues on loading from database. 2015-03-21 19:15:43 +01:00
Frederic Jacobs 82a9029c37 Fixes #713 2015-03-21 17:53:39 +01:00
Frederic Jacobs 0c93679a3d Fixes #709 2015-03-21 17:53:39 +01:00
Frederic Jacobs e8ea00d71a Perform contact intersection on AddressBook change. 2015-03-21 17:53:38 +01:00
Aaron Raimist 0d97edf7af Fixes #673 2015-03-21 17:53:38 +01:00
Frederic Jacobs ee62cbdf23 Fixes #404
Support for drafts. Unsent messages are saved in case you want to send them later on and were interrupted while redacting them.
2015-03-01 08:49:20 +01:00
Frederic Jacobs daac2c0db3 Fixes #566
This fixes the issue with duplicate numbers in group chats. This is just a "fix" for 2.0.1 but the group code is still pretty messy and should be refactored for 2.1
2015-02-28 23:28:50 +01:00
Frederic Jacobs 212f0d4350 Fixes #611 2015-02-26 01:20:44 +01:00
Frederic Jacobs d4e7096e83 Fixes #609
- Also addresses a typo where the cipher key was checked to exist twice.
2015-02-21 14:50:14 +01:00
Christine Corbett 1ede61f272 Localizing the TextSecure component of Signal. 2015-02-20 19:31:44 +01:00
Frederic Jacobs 19ca10d431 Allows retry of failed downloads. 2015-02-19 01:57:38 +01:00