Commit Graph

767 Commits (9c3ecbc77d7d9636949900c0d7ed6c1d1b42488d)

Author SHA1 Message Date
Michael Kirk 01a3ef015f Don't show permissions pop-up until user has seen contact disclaimer (#1456)
// FREEBIE
9 years ago
Michael Kirk 3bbdd13fbe Bump version
// FREEBIE
9 years ago
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
9 years ago
Michael Kirk 28a2a4610c Fix compiler warnings.
// FREEBIE
9 years ago
Michael Kirk 1da7b3b2cf bump build
// FREEBIE
9 years ago
Michael Kirk 368db7e553 [SSK] Only need to fetch prekey once
Plus related rate limit translations

// FREEBIE
9 years ago
Michael Kirk 4c5bc1ed6f Fix fingerprint Label copying
failed to update storyboard when class was renamed.

// FREEBIE
9 years ago
Michael Kirk 96c5ab0111 Bump build
// FREEBIE
9 years ago
Michael Kirk 49e5b19487 Update translations
// FREEBIE
9 years ago
Michael Kirk c7a2fd30c2 Bump build
// FREEBIE
9 years ago
Michael Kirk 23c80748e6 Hide safety numbers until you've exchanged keys
// FREEBIE
9 years ago
Michael Kirk b8fc4001ec Camera permission fixup
- remove unknown segue, otherwise couldn't compile project
- translated english strings
- added translation comments
- reused existing "dismiss" string
- deselected row after dismissing permissions alert in linked devices
  screen

// FREEBIE
9 years ago
Jarosław Pawlak c152c1c83a asking for camera permissions #1363 9 years ago
Michael Kirk 1912fbde72 [SSK] Send group messages as long as one recipient is found
// FREEBIE
9 years ago
Michael Kirk c401f764ef [SSK] Fix crash on messaging unregistered user
// FREEBIE
9 years ago
Michael Kirk 79d5cf9e93 bump version
// FREEBIE
9 years ago
Michael Kirk 1bf77e8261 dismiss keyboard when showing corrupted message actionsheet
otherwise the keyboard covers the actionsheet.

// FREEBIE
9 years ago
Michael Kirk 21d37a92e5 Fix crash on nil image.
The only case I've actuall seen this is when a download is removed from
the file system, outside of Signal.

// FREEBIE
9 years ago
Michael Kirk 82c903b5da bump build
// FREEBIE
9 years ago
Michael Kirk ddf0890408 Fix crash on nil message
// FREEBIE
9 years ago
Michael Kirk 157b5ef15d Bump build
// FREEBIE
9 years ago
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
9 years ago
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
9 years ago
Michael Kirk 62f9606bf5 Merge branch 'mkirk/fix-registration-without-background-modes#1329'
// FREEBIE
9 years ago
Michael Kirk 78d9c97d70 Bump build and properly set version.
// FREEBIE
9 years ago
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
9 years ago
Michael Kirk f98e57e164 WIP: Fix hanging registration when background modes disabled
fixes #1329

We must register notification settings earlier to be sure we'll be able
to get the users push tokens.

We were previously relying on a quirk of background fetch, a feature
which we don't *actually* use, wherein it's possible to get push tokens
for a user without first prompting them for their notification
settings. More on this from UIApplication.h:

    // Calling this will result in either application:didRegisterForRemoteNotificationsWithDeviceToken: or application:didFailToRegisterForRemoteNotificationsWithError: to be called on the application delegate.
    // ---> Note: these callbacks will be made only if the application has successfully registered for user notifications with registerUserNotificationSettings:, or if it is enabled for Background App Refresh.
    - (void)registerForRemoteNotifications NS_AVAILABLE_IOS(8_0);

In the previous implementation, if a user had disabled background
notifications (e.g.  in order to save battery), we were waiting for push
tokens that would never come.

However, this simple "fix" introduces a UX problem - now we prompt for
an alert in the middle of our registration flow.

// FREEBIE
9 years ago
Michael Kirk bae050480a Debug logging around call init crash.
// FREEBIE
9 years ago
Michael Kirk ac996db258 Merge pull request #1407 from mdouglass/fix-issue-1270
Unifies bubble sizes for media bubbles

// FREEBIE
9 years ago
Mike 7c6b84c46b Outgoing message sound respects Settings toggle (#1373) 9 years ago
Michael Kirk 431a91a485 Convert to non-decimal build numbers.
first three digits were redundant anyway. Now it's less likely to mess
up the build version, and yet easier to recover if you do.

// FREEBIE
9 years ago
Michael Kirk 61fa5756ab bump build.
oof: I previously pushed a build number 2.6.4.x to the 2.6.3.x release, so
now we have to stick with 2.6.4 in order to upload it. =/

// FREEBIE
9 years ago
Michael Kirk 21ebe0db98 bump build
// FREEBIE
9 years ago
Michael Kirk 1eb234e8ba Attempt to fix intermittent crash in messages view controller
HACK to work around radar #28167779

  "UICollectionView performBatchUpdates can trigger a crash if the collection view is flagged for layout"
  more: https://github.com/PSPDFKit-labs/radar.apple.com/tree/master/28167779%20-%20CollectionViewBatchingIssue

I have never reproduced the crash, but it's appearing in about 0.05% of
<=2.6.2 sessions and an alarming ~5.0% of beta sessions >=2.6.3.8.

// FREEBIE
9 years ago
Michael Kirk e206afdc5e Bump build
// FREEBIE
9 years ago
Michael Kirk eded20f1f5 [SSK] Don't send empty message to self after changing disappearing timer
previously fixed in: SSK:91fcd01632a81f2aa67d2d94b97c68d519e6881a

But got lost in a rebase after moving TSMessagesManager+sendMessage to
OWSMessageSender.

// FREEBIE
9 years ago
Michael Kirk f2ee006d5f Update translations
Bump version.

// FREEBIE
9 years ago
Michael Kirk 541ca39155 Partial revert of 33f6a95520 (#1421)
An existing related crash is much more common after 33f6a95520.

This is the only change proximate to the crash.

Crash looks like this:

    Last Exception Backtrace:
    0   CoreFoundation                  0x189c601c0 __exceptionPreprocess + 124 (NSException.m:165)
    1   libobjc.A.dylib                 0x18869855c objc_exception_throw + 56 (objc-exception.mm:521)
    2   CoreFoundation                  0x189c60094 +[NSException raise:format:arguments:] + 104 (NSException.m:131)
    3   Foundation                      0x18a6ea82c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 112 (NSException.m:157)
    4   UIKit                           0x1903a534c -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:] + 13428 (UICollectionView.m:5585)
    5   UIKit                           0x1903a8e98 -[UICollectionView _endUpdatesWithInvalidationContext:tentativelyForReordering:animator:] + 92 (UICollectionView.m:6401)
    6   UIKit                           0x1903a9178 -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:animator:] + 384 (UICollectionView.m:6459)
    7   UIKit                           0x1903a8fd8 -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:] + 96 (UICollectionView.m:6423)
    8   UIKit                           0x1903a8f5c -[UICollectionView _performBatchUpdates:completion:invalidationContext:] + 84 (UICollectionView.m:6418)
    9   UIKit                           0x18fc834ec -[UICollectionView performBatchUpdates:completion:] + 64 (UICollectionView.m:6407)
    10  Signal                          0x1000d7e90 -[MessagesViewController yapDatabaseModified:] + 756 (MessagesViewController.m:1863)

// FREEBIE
9 years ago
Matthew Douglass baf0ea96d6 Fixes [UIDevice isiPhoneVersionSixOrMore]
Improves the detection logic for iPhone 6 and above (uses interface idiom and the pixel width of the screen). This fixes detection on the iPhone 7 which was previously broken because it’s model number wasn’t include.

Also removes a number of category methods that weren’t being used in the codebase and were equally incomplete.

// FREEBIE
9 years ago
Matthew Douglass 09d377f7e2 Unifies bubble sizes for media bubbles
On iPhone 6 and above, media bubble sizes are 10% wider
On iPhone 5s and below, media bubbles are fixed in their larger dimension and the other dimension is calculated based on the aspect ratio of the underlying image (clamped to a reasonable min/max height).

// FREEBIE
9 years ago
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
9 years ago
Matthew Douglass bbfffdf79f Scanning an invalid QR code shows an error dialog
* From the error dialog you are able to back out of scanning or try again. Adds English localization for this message.

  Adds an extra flag in OWSQRCodeScanningViewController to make sure that we don’t handle captureResults when capture is disabled (this was racing before because the call to [capture stop] is async and that was causing the cancel case to present the error dialog multiple times.

  Fixes Signal-iOS#1347

* Fixes appearance of race with starting capture
  Also marks the capture variable as atomic since it is accessed on
  multiple threads.

// FREEBIE
9 years ago
Michael Kirk 40d6550fca Update translations
// FREEBIE
9 years ago
Michael Kirk 560b377512 Fix intermittent crash on network status change
These notifications are posted off the main thread, so let's make sure
we're only touching the view hierarchy on the main thread.

// FREEBIE
9 years ago
Michael Kirk 66f0f8cc95 [SSK] Better error messages when failing to send
// FREEBIE
9 years ago
Michael Kirk 84e5606972 [SSK] Fix disappearing messages don't become consistent after reinstall
Fixes the bug wherein:

Given the sender had disappearing messages enabled
And the receiver thinks it's disabled (this can happen due to re-install)
When we receive a disappearing message
The message does start expiring timer and disappear
But you see a notice "<sender> disabled disappearing messages"
Rather than the expected "<Sender> set disappearing messages timer to X".

// FREEBIE
9 years ago
Michael Kirk 689df1be37 Handle key change in group send
// FREEBIE
9 years ago
Michael Kirk 0e345dbbad Update translations
// FREEBIE
9 years ago
Michael Kirk 33f6a95520 Explain send failures for text and media messages
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
9 years ago
Michael Kirk 7c32259a92 We aren't using ErrorMessage/InfoMessage. (#1412)
We incorrectly assumed some parameters were these types, but actually
they were TSMessageAdapters.

// FREEBIE
9 years ago
Matthew Douglass 722c3a5e78 Create TSOutgoingMessage with info on group change
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
9 years ago
Michael Kirk 802d2bfdff Revert "Create TSOutgoingMessage with info on group change"
Inadvertently stole credit for work done when squashing the commits.
Reverting and re-merging giving appropriate credit.

This reverts commit 8242c9e381.
9 years ago
Michael Kirk 8242c9e381 Create TSOutgoingMessage with info on group change
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
9 years ago
Michael Kirk 15dcbbb06c re-pull translations after updating source
// FREEBIE
9 years ago
Michael Kirk b9945b7e32 pull latest translations before updating source
// FREEBIE
9 years ago
Michael Kirk 16a30f2892 translate untranslated strings
// FREEBIE
9 years ago
Michael Kirk 8c062f93aa Refresh Localizable.strings with auto-genstrings
This shouldn't have any affect on behavior, we're just removing unused
strings, extracting comments, and re ordering.

Going forward we can use auto-genstrings to get a sensible diff without
having to manually add/remove/update strings and comments.

Thanks @nixnuex!

// FREEBIE
9 years ago
Michael Kirk 64f4eb73c5 Allow autogenstrings to find all strings
* Inline #define strings, so genstrings can find them
* Make all strings single line so they don't get truncated by auto-genstrings
* Properly quote LHS in strings file

// FREEBIE
9 years ago
nixnuex 722356db58 script to generate and merge global .strings file
* make auto-genstrings executable
9 years ago
Michael Kirk 49de772997 Fix slow reloading conversation view. (#1397)
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
9 years ago
Michael Kirk 50ce283582 Fix empty bubble when setting disappearing message timer in a thread to
yourself.

fixes #1393

// FREEBIE
9 years ago
Michael Kirk 5b01976466 Fix hidden incoming audio
Missed bottom constraint when customizing incoming message bubbles to
include timer icon in footer.

// FREEBIE
9 years ago
Michael Kirk bc9154f18f Bump version / update translations
// FREEBIE
9 years ago
Michael Kirk 1e417ea93f Longpress to copy safety numbers
Nothing else to see here. =)

 ༼ つ ◕◡◕ ༽つ [swift]

// FREEBIE
9 years ago
Michael Kirk da82c01f6e Restart timer animation when returning from background
// FREEBIE
9 years ago
Michael Kirk 04f5c3ce22 Slow the timer animation down a bit.
fixes #1384

// FREEBIE
9 years ago
Michael Kirk 6a4fc3168d Fix delivery shown for undelieverd disappearing messages.
fixes  #1380

// FREEBIE
9 years ago
Michael Kirk ddc8db6ac3 bump build
// FREEBIE
9 years ago
Michael Kirk 607262df6a Remove observers on dealloc (#1379)
// FREEBIE
9 years ago
nixnuex ca5ca9d0cc code verification: show complete phone number 9 years ago
Michael Kirk a04b351455 Fix set timer in group thread. (#1375)
// FREEBIE
9 years ago
Michael Kirk 7661b7f402 Consistent copy with other platforms
// FREEBIE
9 years ago
Michael Kirk 185cb24938 Update translations
// FREEBIE
9 years ago
Michael Kirk 85beb93e86 Style timer changes less alarmingly.
// FREEBIE
9 years ago
Michael Kirk 89df8ddb31 Group updates can be deleted
Removed some dead code re: NSCopy/Coding, since it seems unused.

// FREEBIE
9 years ago
Michael Kirk 07ab1bd931 Call notifications appear immediately after call
previously you had to leave/return. This happens because we unregister
observers while our view is not visible.

// FREEBIE
9 years ago
Michael Kirk 7106eee4a3 Call notifications are deletable
// FREEBIE
9 years ago
Michael Kirk 405990a7d5 Don't select or copy info message text.
// FREEBIE
9 years ago
Michael Kirk dc95d328cb Don't expire messages until they are sent.
// FREEBIE
9 years ago
Michael Kirk 2b2ebbe099 Tweak settings design
* lighter tint for icons, their bold stroke width makes them darker than
  the text
* Replace double hourglass icons with a single one. It aligns better,
  and the "small time" vs "big time" is confusing
* Add description of what disappearing messages do

// FREEBIE
9 years ago
Michael Kirk dc0807297b Update translations
// FREEBIE
9 years ago
Michael Kirk 023e62e6a6 fix reused cell starts blinking too early
There are dispatch_async's waiting to be fired on some re-used cells.

// FREEBIE
9 years ago
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
9 years ago
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
9 years ago
Michael Kirk 2edd2b8f81 set launch state correctly
// FREEBIE
9 years ago
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
9 years ago
Michael Kirk 43a2eb9da1 Fix occasional crash when sending after deleting messages
// FREEBIE
9 years ago
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
9 years ago
Michael Kirk 48336b6c53 Resetting session returns you to messages view with an indicator that
your session was reset.

// FREEBIE
9 years ago
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
9 years ago
Michael Kirk cc2a25b184 update translations
// FREEBIE
9 years ago
Michael Kirk 8d2b38f027 Fix device listing
broken while refactoring db to async

// FREEBIE
9 years ago
Michael Kirk 3e7e67e276 Async migrations framework
* nonblocking by default
* track success of each migration independently

// FREEBIE
9 years ago
Michael Kirk 3b687da0ec Upgrade SSK to setup db async where possible
fixes #1358

// FREEBIE
9 years ago
Michael Kirk 2ab6955967 More logging, scrub phone numbers from file logs (#1357)
Phone number are still logged in TTY for development.

// FREEBIE
9 years ago
Michael Kirk 1433ee2655 Fix crash on boot =/ (#1349)
I botched a migration 6 months ago, which left some lingering TSRecipients serialized in our data store, laying in wait to explode the next time we enumerate every object in the database (e.g. when we add an index).

The bloom filter migration failed to remove TSRecipients in the somewhat rare event that the local user had no downloaded bloom filters. This could happen e.g. if they were low on disk space at the time of running the migration, I believe the app would remove the bloom filter cache.

// FREEBIE
9 years ago
Michael Kirk 14570cb6cf bumping minor version
since 2.5.0.19 was approved for release we have to bump the minor
version to upload the build.

// FREEBIE
9 years ago
Michael Kirk 0c4f1d41b6 Fix contact sync in SSK (#1345)
* bump version
* update translations

// FREEBIE
9 years ago
Michael Kirk 891acb163b Bump version
// FREEBIE
9 years ago
Michael Kirk be0556f68a fix "last active" date
// FREEBIE
9 years ago
Michael Kirk 5372173c4a Fix groups breaking without avatar (#1336)
- Group updates were appearing as "unsupported attachment"
- Couldn't message in a new group unless it had attachment.

// FREEBIE
9 years ago
Michael Kirk 720b167b3b Fix multiple keychange errors (#1334)
* Don't attempt to send a message unless we've successfully built device-messages
* Only process message exception when we're done with retries.

// FREEBIE
9 years ago
Michael Kirk ed06555567 Merge branch 'release/2.5.0' into release/2.5.0-with-master
// FREEBIE
9 years ago
Michael Kirk 197933817c Fix height of network status on iphone5.
Abandon dynamic type since other (standard) table cells don't use it.

// FREEBIE
9 years ago
Michael Kirk 63513bed12 Apple now requires camera permission explanation
Even though it's pretty obvious why we need your camera when you push a
"take photo" button...

Unfortunately this warning will be confusing if someone's first exposure
to it is to scan an identity code, but that seems like an edge case not
worth pegging an extra sentence of copy to an already unnecessary
warning.

Also, we're enabling push notifications for dev, per apple build
submission feedback.

// FREEBIE
9 years ago
Michael Kirk f753cfeed4 Fix XCode8 code signing
// FREEBIE
9 years ago
Michael Kirk 7c6e9e07b8 Read receipts remove lockscreen notifications
No need to have a notification for a message you've already read on
desktop.

// FREEBIE
9 years ago
Ronny b59a0e47d7 Disable group header interaction (#1328)
prevent clickability of the group header cell in the group members view
9 years ago
nixnuex 50cd4f54fc verification code field: improved user experience (#1325) 9 years ago
Michael Kirk f7198d5eaa Don't crash when receiving read receipts after message
// FREEBIE
9 years ago
Michael Kirk d8be0b5d22 New translations
// FREEBIE
9 years ago
Michael Kirk 0a64022748 Must specify team for XCode 8 build
// FREEBIE
9 years ago
Michael Kirk 90dab190f3 Update SSK to send useragent upon provisioning
We do this to coordinate a theme choice on the desktop

// FREEBIE
9 years ago
Michael Kirk c7ee430790 Support for receiving voice messages from android (aac) (#1321)
We already support receiving them from Desktop (mp3)

Plus some Xcode 8 turds in the image assets.

// FREEBIE
9 years ago
Michael Kirk 5200cccbe3 Update translations
* New bg (Bulgarian) localization!
* New sq (Albanian) localization!
* replace unfinished bg_BG localization with complete bg localization
* caps keys to make it easier to see missing localizations
* pull with newly pushed source keys

// FREEBIE
9 years ago
Michael Kirk 6bd2453d7d Fix choppy paperclip icon on iphone6
Previously ios was generating the asset for us from our vector (pdf),
but apparently it does a crappy job. Most notably on small thin lines
like our paperclip.

// FREEBIE
9 years ago
Michael Kirk 33f63e76d1 Fix devices icon intermittently showing
Because it was not rendering correctly in all cases, we're foregoing the
templated image, and using a colored asset.

// FREEBIE
9 years ago
Michael Kirk 019310f284 Deselect table rows when swiping back in table views
// FREEBIE
9 years ago
Michael Kirk 7e67fb1939 Some style for the QR code scanner.
Also made identity key scanner appear faster. Previously we were
waiting for camera to initialize. Now we do this after the view has
loaded - with a black background, the affect is preferable than
lagging on the transition.

// FREEBIE
9 years ago
Michael Kirk f28400146f bump build
// FREEBIE
9 years ago
Michael Kirk 7c3a07960f Device manager fixes
* 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
9 years ago
Michael Kirk dee26e6e0a Use PNG constant
// FREEBIE
9 years ago
Michael Kirk 9006ff604f Multi device read receipts.
All the heavy lifting is in SignalServiceKit.

// FREEBIE
9 years ago
Michael Kirk 428f7fca19 Adapt to nullability annotations in SignalServiceKit
// FREEBIE
9 years ago
Michael Kirk 92290a5d4d Fix: Inbox count not updating while viewing archive
e.g. If I'm viewing the archive when a new message comes in

// FREEBIE
9 years ago
Michael Kirk ef6784ed95 Device Manager
* List linked devices
* Adding a new device
* Removing a device

TODO: design on the QRScanner

// FREEBIE
9 years ago
Michael Kirk 84156698c4 Provision device from QRCode.
NEEDS DESIGN - will likely have an intermediate "device manager" screen.

* extracted QRCode Scanner into re-usable ViewController

// FREEBIE
9 years ago
Michael Kirk 6545161192 thread is set during notification callback.
It should *not* be non-atomic

// FREEBIE
9 years ago
Michael Kirk eef2002224 Clean up settings (#1316)
* Remove unused (hidden) button from settings
* dynamic type for settings cells
* prefer property vs ivar access
* property attributes

// FREEBIE
9 years ago
Michael Kirk cc2d47fbd3 Update protocol (#1315)
* Update to latest SignalServiceProtocol
* Show SignalServiceKit compiler warnings

// FREEBIE

* Update to latest signal protocol

// FREEBIE
9 years ago
Michael Kirk e56d41edc7 Otherwise we'll never run future migrations. (#1314)
// FREEBIE
9 years ago
James Barclay f8a0be4c70 Return immutable data from generateSecureRandomData:length and use OSStatus to check the status of SecRandomCopyBytes. (#1306) 9 years ago
Michael Kirk 9a86ca76ce screen security is enabled by default
// FREEBIE
9 years ago
Michael Kirk 58548c68cc code cleanup
- refactor screen protection code for clarity
- remove unused settings cell class
- remove unused preferences

// FREEBIE
9 years ago
Adam Stiles 52861a6ef5 Fix incorrect GIF message bubble sizing (#1300)
TSAnimatedAdapter is used when rendering GIFs. TSAnimatedAdapter
inherits from JSQMediaItem but does not provide a custom implementation
of the hash method. The default implementation of hash in JSQMediaItem
results in all messages of a given interaction type (incoming,
outgoing) sharing a cached bubble size. For this reason, JSQMediaItem
subclasses are required to implement hash (see
https://github.com/jessesquires/JSQMessagesViewController/issues/631).

This commit fixes issue #1275 by implementing hash in TSAnimatedAdapter
the same way TSPhotoAdapter does.
9 years ago
Michael Kirk 6120bd9e8e Orphan-data cleanup no longer causes timeout (#1303)
On older devices with lots of data, the orphan data cleaner can time
out. Here we're trading certainty that the migration completed for
confidence that the boot process doesn't time out.

// FREEBIE
9 years ago
Vitali Lovich 547cd9797a Improve audio waveform scrolling performance (#1292)
The object is already cached & the waveform view constructed when scrolling,
so there's no need to re-create the view.

This doesn't fix the problem with the wave-form generation on the first
view of the message.  That is a more critical problem in the underlying
SCWaveformView class which renders on the main thread instead of doing
it asynchronously.

FIXES #1258
9 years ago
Michael Kirk 92b3ea5d25 Re-enable attachment cleanup migration after fixing it in SSK (#1298)
// FREEBIE
9 years ago
Michael Kirk 000a5941f4 Delete attachment cleanup migration.
After running locally, I noticed many old threads missing old
attachments. I'll do some further investigation.

// FREEBIE
9 years ago
Michael Kirk 9f2bb5d2cc Fixes lingering interactions after removing thread (#1297)
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
9 years ago
Michael Kirk f09af989b7 2.4 update translations (#1291)
// FREEBIE
9 years ago
Michael Kirk 73856c3e44 bump release target to 2.4.0.4
// FREEBIE
9 years ago
Michael Kirk 147cc15105 Input toolbar fits text size (#1290)
* 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
9 years ago
Michael Kirk bb3bda2364 bump build 2.4.0.3
// FREEBIE
9 years ago
Michael Kirk 86f06593d8 Fix "can't reattach saved GIF" (and others) (#1288)
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
9 years ago
Michael Kirk 3c2846274c Prevent crash when copying corrupted image attachment. (#1287)
// FREEBIE
9 years ago
Michael Kirk c4209e793a Don't use "we" in error message copy.
per @RiseT on transifex

// FREEBIE
9 years ago
Panos Sakkos c5f6b7b7bd Improved error message when network doesn’t allow to access Signal port.
Fixes #130

FREEBIE
9 years ago
Brandon Cheng 583d3e82ad Alternative solution for requiring direct taps for launching media view (#1235) (#1261)
// FREEBIE
9 years ago
Ronny e7affecc17 FIX: Leaving group should dismiss keyboard #1274 (#1278)
If we hide the input toolbar, we should hide the keyboard too

//FREEBIE
9 years ago
Ronny 0455f03615 Fixes Call Error message text should adapt size to fit localized texts (#1164) (#1178)
- adding constraints and changing properties for _callStatusLabel to
fit 3 lines of text

//FREEBIE
9 years ago
Michael Kirk 97fdabf9a2 Narrow the bubbles a bit. (#1269)
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
9 years ago
Michael Kirk 835021b0d3 Fix extra tall error messages by rendering timestamp (#1268)
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
9 years ago
Michael Kirk f205ff19fa new translations (#1265)
// FREEBIE
9 years ago
Michael Kirk f899cff128 Fix in-app audio
- sound is set by passing in reference
- don't access properties in constructor
- distinguish multiple variables with same name

// FREEBIE
9 years ago
Michael Kirk df63c8624d fix compiler warnings
// FREEBIE
9 years ago
Michael Kirk e7d4763715 Must tap directly on bubble to launch fullscreen media view (#1260)
// FREEBIE
9 years ago
Michael Kirk 9db3b0db27 Consistent and efficient media Delete/Copy/Save UX
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
9 years ago
Michael Kirk 70197fb482 bump version to 2.4.0
// FREEBIE
9 years ago
Michael Kirk db3b2d443c Use upstream corner radius
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
9 years ago
Michael Kirk 4ccb295dbb Send button disabled color and dynamically sized
Using upstream button and change notification allows us to delete some
code.

// FREEBIE
9 years ago
Michael Kirk f8d65ab0f5 Post JSQMVC code cleanup
* formatting
* referencing TODOS
* remove unnecessary logging

// FREEBIE
9 years ago
Michael Kirk b7dd51438e Move colors into style class
// FREEBIE
9 years ago
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
9 years ago
Michael Kirk f7f1b6877b Remove unused call thumbnail code
// FREEBIE
9 years ago
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
9 years ago
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
9 years ago
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
9 years ago
Michael Kirk 987ce5f832 bump release target to 2.3.6.0 (#1256)
// FREEBIE
9 years ago
Michael Kirk d24d54d4f2 small IOS9 Fixes (#1253)
* Fix compiler warnings by explicitly casting to int.
* Show a better permissions message when viewing attachments.
* Fix comment.

// FREEBIE
9 years ago
Michael Kirk 992dbe586a Fix crash on unknown attachment (#1249)
// FREEBIE
9 years ago
Michael Kirk 01b00e3814 bump release target to 2.3.5.0
// FREEBIE
9 years ago
Michael Kirk 1f1920b648 Fix crash on iOS10 when attaching media
New permissions strings are required.

// FREEBIE
9 years ago
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
9 years ago
Michael Kirk 1e43e139fd Get back on upstream SocketRocket (#1241)
* Latest SocketRocket includes
  * crash fixes.
  * our new security policy management, so we don't have to
    keep rebasing to incorporate updates.

* Adapt to policy renaming in SignalServiceKit
* bump XCode version to play nice with SWIFT_NAME

// FREEBIE
9 years ago
Michael Kirk b83bcdab8a updated french and japanese translations 9 years ago
Michael Kirk a181d218cf extract and test contact searcher
// FREEBIE
9 years ago
Michael Kirk 8c6bf3cba6 prefer properties per style
// FREEBIE
9 years ago
Michael Kirk 1f31015d54 find phone number regardless of punctuation used in search.
e.g. 3235551234, 323-555-1234, 1-323-555-1234, etc. are all the same as +13235551234.

// FREEBIE
9 years ago
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
9 years ago
Michael Kirk 62633ff7f4 remove unused code
// FREEBIE

dot notation is only for property access

// FREEBIE

remove unused code
9 years ago
Michael Kirk 1e0f0157c1 namespace ContactsManager -> OWSContactsManager
rename test class ContactManager->OWSContact_s_Manager
update docs

// FREEBIE
9 years ago
Michael Kirk b3bb4c745e Set explicit height for all media types. Audio is the only special case. (#1237)
This might FIX #1111, but I think there are actually a handful of things
breaking our layout.

// FREEBIE
9 years ago
Michael Kirk 87d2fe1131 bump release target to 2.3.4
// FREEBIE
9 years ago
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
9 years ago
Michael Kirk 76352bf471 Code Cleanup (#1229)
* remove unused Signal-Bridging-Header
* move Adapters out of ViewControllers directory
* remove unimplemented method from header
* Fix unused variable warning.
* Move SignalsViewControllers out of UITests directory.
* remove executable bit from source files

// FREEBIE
9 years ago
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
9 years ago
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
9 years ago
Michael Kirk 4a1c53f624 Access contacts atomically to avoid corruption (PR #1223)
4% of our crashes are from accessing latestContactsById with an invalid
address. This was partially addressed by assigning a value on init, but
it's still happening.

By converting the ivar to an atomic property we can avoid any funny
business that would happen when accessing this var while it's being
updated in a different thread.

Also, make sure we're copying to defensively strip mutability.

Also:
* bumped release target
* removed unused code
* dealloc at the top per style.
9 years ago
Michael Kirk 8f04f863b7 hide UI element must happen on main thread (#1220)
// FREEBIE
9 years ago
Michael Kirk 7fef6aeab2 Fix crash after deleting message (#1219)
* update to JSQMessageViewController fixes #1218
* no need for SVC to retain membership of MVC

// FREEBIE
9 years ago
Michael Kirk 965261f465 attempt to fix intermittent SEGFAULT in SocketRocket (Maybe Fixes #1196) (#1217)
* Rebased OWS fork of SocketRocket against upstream
* Pulling in SocketRocket directly from OWS Github rather than going
  through the motions of publishing a pod that only we use.
* Bump version

// FREEBIE
9 years ago
Michael Kirk 78a5355b04 Initialize latestContacts to empty dict (#1207)
Seeing intermittent segfaults on [latestContacts allKeys].
This could be because latestContacts is initialized async.

//FREEBIE
9 years ago
Michael Kirk 2565801c39 Fix new localizations (#1206)
* bump version
* pulled latest translations
* Register localizations with app.

- Persian (fa)
- Indonesian (id)
- Macedonian (Macedonia) (mk)
- Shona (sn)
- Galacian (gl)

(Project > Signal > Localizations > Add Localizations)

Generalized Macedonian locale since it seems like iOS doesn't support
the "Macedonia(Macedonia)" sub-locale

* disable farsi until proper RTL interface work is done

// FREEBIE
9 years ago
Michael Kirk a736e8de66 Fixes avatar not showing for single contact thread (#1202)
* requires update to SignalServiceKit
* updated Pod Dependencies
* bumped version

Fixes #1201

// FREEBIE
9 years ago
Michael Kirk 83de0d75b8 New translations (#1193)
* modify script to fetch all uploaded translations.

Otherwise we don't always get the latest translations.
This might be because we're only fetching "reviewed" translations, but
so-far-so-good with unreviewed translations, and we don't have a real
"reviewing" hierachy in place anyway. This policy might change in the
future, but at least now it's not ambiguous.

// FREEBIE

* latest translations
9 years ago
Michael Kirk d7c48578a9 Fix invite crashing without sms (#1192)
* Fixes "New Message" --> "Invite contact" exception for iPhone devices that do not support SMS messaging

* fix SMS invite on empty inbox

This code appears in two contexts - (1) in an empty inbox , where no other view
controller is presented, and (2) in compose interface where a
search controller is presented, and must first be dismissed.

* only check SMS sending ability directly, (not device model)

This is better because:
1. sometimes iPhones can't send SMS
2. Sometimes iPads/iPods can send SMS

* correct localization key

* bump build

// FREEBIE
9 years ago
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
9 years ago
Michael Kirk da6597118a Fix unable to send invite via sms (#1188)
* bump release

//FREEBIE

* fix invite over sms alert

Could not present the sms invite alert controller because we were
already presenting the UISearchController

FIXES: #1182

// FREEBIE
9 years ago
Michael Kirk 4537324fe5 Mark encryption as exempt, per Moxie's instruction. (#1173)
Bump release number

// FREEBIE
9 years ago