fixes#1231
Motivation
----------
Previously when messages failed to send, there was no reason given.
Furthermore, when media messages failed to send there was no indication
that any attempt to send the message even occurred, nor a retry
dialog.
UX Changes
----------
- Show "uploading" status for media
- Show specific error message in retry-send dialog
- Only scroll to bottom when new message is inserted
- Show specific errors when group creation fails
Code Changes
-----------
- Updated incorrect references to TSMessageAdapters which were actually
references to OWSMessageData
- MessageSender was extracted from SSK MessagesManager
- access MessagesManager as property
- idiomatic init/properties for Env
- log contact intersections
- Move scroll-to-bottom animation to main thread.
// FREEBIE
TSOutgoingMessage is created with details about the group changes so that we see more than just “Group Updated.”
* Customizes message for new group creation
Replaces GROUP_UPDATED with GROUP_CREATED for a brand new group. Localized for English only.
* Updates to use fixed SignalServiceKit branch
// FREEBIE
Inadvertently stole credit for work done when squashing the commits.
Reverting and re-merging giving appropriate credit.
This reverts commit 8242c9e381.
TSOutgoingMessage is created with details about the group changes so that we see more than just “Group Updated.”
* Customizes message for new group creation
Replaces GROUP_UPDATED with GROUP_CREATED for a brand new group. Localized for English only.
* Updates to use fixed SignalServiceKit branch
// FREEBIE
Fix animation memory leak exacerbated every time you reload a
conversation with expiration timers.
Stop animation on cells that aren't currently being displayed. This is
relatively minor compared to the above, but still, no reason to waste
cycles.
// FREEBIE
* 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
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
* 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
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
* Avoid intermittent crash in device manager via YapDatabaseModified
* Properly align refresh text when expecting new device
* Avoid glitchy activityIndicator while polling
* Expose edit mode toggle
Much of the code changes here were in the corresponding SSK update.
// FREEBIE
Most of the work was done in SignalServiceKit 0.0.7, this adapts to
those changes.
Migration to clean any orphaned interactions/attachments.
- don't set new migration version until migration was successful.
- remove dead code from migrations
- rename message.attachments->message.attachmentIds
- Remove unused parameter from GroupModel
- formatting touched method/'s signatures
//FREEBIE
* Set height of toolbar based on actual font height. FIXES#1282
* max height for compose field FIXES#1186
Still absent is resizing to fit draft.
// FREEBIE
The root of the problem is we were using the deprecated ALAssetsLibrary
framework, which couldn't find certain assets.
By using the photos framework not only are we able to find these
assets, but it also cleans up our code:
* no more copying byte buffers
* no more detecting file type
// FREEBIE
This is closer to the 2.3 version.
Seems like upstream sizing has changed since our JSQMVC upgrade. This wider size calculation makes sense if you're losing space to the avatar, but since we're not using avatars the full width bubbles can make the whole view seem a bit crowded when you have large blobs of text.
// FREEBIE
We were ocassionally seeing extra tall error messages. This is because,
when appropriate, we were adding the space for a timestamp, but then
never actually rendering the time stamp.
So now:
- Error Messages aren't rendered too-tall
- Error Messages get a printed timestamp when appropriate
// FREEBIE
copy/save/delete is accessed via longpress for all media messages, just
like for simple text messages.
Notes
-----
We don't support saving audio attachments as it's not clear where they should go.
(I don't think users expect them to end up in their iTunes library.)
There is still no UX for "pasting" media into Signal.
Removed the now redundant (and confusing) "share" button interface.
//FREEBIE
The history here is that the radius I'm removing was added in #884 after
having straight edges added in our custom fork for a while.
So, rather than override our override, I'm just reverting to the
upstream value, which is close in proximity, and closer to iMessages
radius.
// FREEBIE
* 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
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
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
* 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
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