Commit Graph

30 Commits

Author SHA1 Message Date
Matthew Chen 8794880db8 Unbound message bubble cache size and DRY up cache logic.
// FREEBIE
2017-08-25 17:01:13 -04:00
Matthew Chen 98eb4693c5 Rework the contact offers.
// FREEBIE
2017-08-21 17:05:42 -04:00
Matthew Chen 5f2f8ec6d8 Start reworking the contact offers.
// FREEBIE
2017-08-21 17:05:42 -04:00
Matthew Chen 1e67bb52e3 Respond to CR.
// FREEBIE
2017-07-12 13:18:03 -04:00
Matthew Chen f584c4b434 Fix broken tests.
// FREEBIE
2017-07-12 12:14:15 -04:00
Michael Kirk 4f3278db1e Fix layout of timestamp for system messages
Incorporate topLabelSize into cell size for system messages.

We are using the term "bubble size" to describe the interaction specific
views of a collection cell. It's a crappy name, but coincides with other
usage.

// FREEBIE
2017-06-19 09:16:37 -04:00
Matthew Chen ab95b04e56 Respond to CR.
// FREEBIE
2017-06-17 13:47:10 -04:00
Matthew Chen bd440f0878 Respond to post-holiday code reviews.
// FREEBIE
2017-06-17 13:38:19 -04:00
Matthew Chen 91af4f93e1 Use reference cells for measurement.
// FREEBIE
2017-06-13 11:08:58 -04:00
Matthew Chen 1ef9ba0659 Clea up usage of fail macro.
// FREEBIE
2017-06-08 10:25:28 -04:00
Matthew Chen 15074cdb8f Clean up system message cells, make them tappable, etc.
// FREEBIE
2017-06-06 10:26:06 -04:00
Matthew Chen a013a7206e Rework and unify the system messages.
// FREEBIE
2017-06-06 10:15:56 -04:00
Matthew Chen 459c6c6ed4 Rework and unify the system messages.
// FREEBIE
2017-06-06 10:15:56 -04:00
Matthew Chen 9cdf907e20 Rework and unify the system messages.
// FREEBIE
2017-06-06 10:15:56 -04:00
Matthew Chen 2cbf1e1d05 Rework and unify the system messages.
// FREEBIE
2017-06-06 10:15:56 -04:00
Matthew Chen 8a6ca8c012 Fix glitch around downloading attachments.
// FREEBIE
2017-05-30 10:05:53 -04:00
Matthew Chen 19390abc41 Refine the unseen indicators.
* Fix sizing of the unread indicator cells.
* Fix conflicts between paging and “load window” of conversation view and unseen indicator.
* Modify unseen indicator to indicate whether there are more unseen messages and safety number changes.
* Fix conflicts between modifying the “load window” size and updating the dynamic interactions.
* Clear the “bubble size calculator” cache whenever the view changes size.
* Improve the scrolling behavior around “load more messages”.
* Improve management of “load window” size.
* Fix issues around caching of bubble sizes.

// FREEBIE
2017-05-30 10:05:22 -04:00
Matthew Chen 80fbc093d9 Handle oversize text messages and arbitrary attachments.
// FREEBIE
2017-03-29 14:34:21 -04:00
Michael Kirk c5be8f2d88 Don't include phone number in scannable safety number QR code
also fixes #1455

// FREEBIE
2016-11-14 09:12:24 -05:00
Michael Kirk 7bcf5190b4 Address some lingering emoji cropping
This is an expedient, but not good, "fix". Some messages are going to
have extra space at the bottom of the bubble. But, for the time being,
that's preferable to getting messages clipped.

// FREEBIE
2016-11-13 11:48:05 -05:00
Michael Kirk ddf0890408 Fix crash on nil message
// FREEBIE
2016-11-04 16:32:12 -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 7106eee4a3 Call notifications are deletable
// FREEBIE
2016-10-12 09:30:25 -04:00
Michael Kirk 94a23021f8 Size error messages correctly.
* calculate size of info message using the info message font.
* offset by the info message header

There were instances of lines getting cropped, or an extra line being
added. The previous, more conservative, solution was to just make every
bubble too big, but it looked terrible.

// FREEBIE
2016-10-12 09:30:25 -04:00
Michael Kirk a28fea8384 Fix emoji message truncation on iOS10
fixes #1368

Apple switched emoji fonts from AppleColorEmoji to AppleColorEmojiUI.
The new font doesn't compute it's size correctly, causing containing
rectangles to be too small.

This commit scrubs strings of the new emoji font, and replaces it with
the old.

// 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
Michael Kirk 11a586a835 New Fingerprint Format
Rather than verifying eachothers keys separately, you now verify the
privacy with your recipient by sharing a single composite number or
QRCode.

This is a breaking change, in coordination with Desktop and Android.

UX
--

Fingeprint is no longer in line with identity key error. Instead you
have the option of going to the full-screen safety number verification
experience.

Overhauled fingerprint design
-----------------------------

* use same modal dismiss button as elsewhere
* remove fingerprint from settings.
* quick slide in animation vs slow fade
  * existing was painfully slow
  * blur effect is better metaphor for something slide over top
  * anyway there was a rendering glitch in the end of fade where
    underlying navbar would "snap" out

Also Fixed
----------
Always provide a name string for contact

* Centralize all the nil-checking
* Fall back to "unknown contact"

allow multi-line error messages

// FREEBIE
2016-10-12 09:30:25 -04: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 933281f234 format objc.
This is part of unforking JSQMVC, but I'm only reformatting files
otherwise changed rather than reformatting the entire project for git
sanity.

This is intentionally a second commit so we can separate formatting
changes from code changes

* brace should drop after method definition (this is common across
  almost all objc projects, and allows you to quickly differentiate
  multi-line method signatures from their implementation.
* aligning consecutive assignments ongoingly muddies git history

// 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