Commit Graph

450 Commits (c1879250d8e4cd205324339126534c673324da55)

Author SHA1 Message Date
Matthew Chen 0d5b5bc44c Respond to CR. 7 years ago
Matthew Chen 05b034e925 Clear out NSUserDefaults during backup restore. 7 years ago
Matthew Chen 67197ddf15 Rename any existing files and directories in restored directories. 7 years ago
Matthew Chen 2b528ad894 Don't use mainApplicationState in business logic. 7 years ago
Matthew Chen 59933ce1d6 Fix rebase breakage. 7 years ago
Matthew Chen 5ba8445f05 Fix rebase breakage. 7 years ago
Matthew Chen df53033caf Clean up ahead of PR. 7 years ago
Matthew Chen 0422e4252f Clean up ahead of PR. 7 years ago
Matthew Chen f6296f1fe2 Clean up ahead of PR. 7 years ago
Matthew Chen 16f7317579 Complete backup restore/import. 7 years ago
Matthew Chen 272a90d269 Add import back up UI. Begin work on import backup logic. 7 years ago
Matthew Chen 857ca56ab6 Rework progress mode of export backup UI. 7 years ago
Matthew Chen 980b3d25a7 Rework "export backup" UI. 7 years ago
Matthew Chen cb4b44b8f4 Lock databases during backup export. 7 years ago
Matthew Chen b77382f99c Fix security issues in the backup process. 7 years ago
Matthew Chen 2011dae8b6 Show share UI for backups. 7 years ago
Matthew Chen ea945558c8 Show share UI for backups. 7 years ago
Matthew Chen 2789c0f12c Write backup to encrypted zip. 7 years ago
Matthew Chen 8769fb07cf Write backup to encrypted zip. 7 years ago
Matthew Chen e77c3e6717 Retain changes from session database branch. 7 years ago
Matthew Chen 85686d3144 Continue TSStorageManager refactor. 8 years ago
Matthew Chen a29c4ce5d6 Pull out OWSStorage base class for TSStorageManager. 8 years ago
Matthew Chen 3643414da1 Respond to CR. 8 years ago
Matthew Chen 0c9d9ba679 Fix issues around cross process db changes. 8 years ago
Matthew Chen 0be63d2939 Add "send to last thread" option in debug logs. 8 years ago
Michael Kirk 64e90d29fd CR: extract method, more asserts and annotations
// FREEBIE
8 years ago
Michael Kirk 7ea4b85a2a Persist signal accounts (and their embedded Contact)
// FREEBIE
8 years ago
Michael Kirk d9cca77e23 update header references
// FREEBIE
8 years ago
Michael Kirk 0429836ff9 CR: rename keyWindow -> keyReferenceView, split long line
// FREEBIE
8 years ago
Michael Kirk eca19e5874 Reconcile MediaMessageView zoom behavior with AppExtension
Previously it was predicated on UIApplication.shared

// FREEBIE
8 years ago
Michael Kirk 89b9887f1d Make DeviceSleepManager extension compatible
// FREEBIE
8 years ago
Michael Kirk a58f1f385c Share a photo from photos app
Shows the conversation picker, and sends the attachment to that
conversation.

There's still a lot TODO

-[ ] resolve JSQ dependency
-[ ] properly wait for app to load
-[ ] dismiss share extension after send is complete
-[ ] support non jpeg file types
-[ ] Fix device sleep manager

// FREEBIE
8 years ago
Matthew Chen 94b5dfb1b5 Localize the debug log UI. 8 years ago
Matthew Chen a617724da7 Add "send to self" option to debug logs. 8 years ago
Matthew Chen 310cf1330d Continue conversion of app setup. 8 years ago
Matthew Chen 150f417a5e Clean up ahead of PR. 8 years ago
Matthew Chen 9da165b846 Continue conversion of app setup. 8 years ago
Matthew Chen ce899edf10 Respond to CR. 8 years ago
Matthew Chen b4e8df79da Migrate environment to SignalMessaging. 8 years ago
Matthew Chen a16058e477 Migrate environment to SignalMessaging. 8 years ago
Matthew Chen 6d87df88aa Migrate environment to SignalMessaging. 8 years ago
Matthew Chen c817aa51b3 Migrate environment to SignalMessaging. 8 years ago
Michael Kirk e3b0333b97 CR: Separate class files
// FREEBIE
8 years ago
Michael Kirk cd440b839f Consolidate search logic
// FREEBIE
8 years ago
Michael Kirk 71bafcc8f0 Search SignalAccounts by profile name
...and fixup some tests
8 years ago
Michael Kirk 2af818b3ba Make SignalMessaging AppExtension safe
// FREEBIE
8 years ago
Matthew Chen bf21d0c0ed Enable logging in SAE; rework log file management to include multiple log directories. 8 years ago
Matthew Chen 8cc33b3de1 Refine loading view of share extension. 8 years ago
Matthew Chen e7b32899cb Sketch out SAE load screen; make a number of infrastructure changes. 8 years ago
Matthew Chen d17ccadea2 Use AppContext to resolve share extension FIXMEs. 8 years ago
Matthew Chen e712e8bfc4 Use AppContext to resolve share extension FIXMEs. 8 years ago
Matthew Chen 4c31d99498 Respond to CR. 8 years ago
Matthew Chen 66fae5bd54 Clean up ahead of PR. 8 years ago
Michael Kirk a11d83187b WIP: Framework-friendly - compiles but crashes on launch
// FREEBIE
8 years ago
Matthew Chen 8acce3b5bd Simplify the unread indicator logic. 8 years ago
Matthew Chen 71f5ef5940 Improve handling of unread indicator edge cases. 8 years ago
Matthew Chen 2d241623b7 Improve handling of edge cases around unread indicator delimiting deleted message(s). 8 years ago
Matthew Chen 0ccddb696a Add workaround for bug in iOS 11.1 beta around hit area of custom back buttons.
// FREEBIE
8 years ago
Matthew Chen 19ba564f80 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen c6160a5a1e Rework the "update with..." methods to avoid re-saving deleted models. 8 years ago
Matthew Chen fc07c7c04f Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 593c684fcb Don't ask for camera permissions if app is not active.
// FREEBIE
8 years ago
Matthew Chen 5cc292fb6c Don't ask for camera permissions if app is not active.
// FREEBIE
8 years ago
Matthew Chen 5e61307ce3 Don't ask for microphone permissions if app is not active.
// FREEBIE
8 years ago
Matthew Chen f86882b5ff Don't ask for camera permissions if app is not active.
// FREEBIE
8 years ago
Matthew Chen 6e840ff956 Fix build warnings from XCode 9. 8 years ago
Matthew Chen f823ba8c14 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 05e57cf8bf Don't treat digits 0..9 as Jumbomoji.
// FREEBIE
8 years ago
Matthew Chen e3d8421b9e Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 0a926567ed Respond to CR.
// FREEBIE
8 years ago
Matthew Chen c6047b72b4 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 563eed6c6e Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 530b70d706 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 841a2333e3 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen eb3ca43256 Jumbomoji.
// FREEBIE
8 years ago
Matthew Chen 8cb3e5d35d Fix edge cases around oversize test messages.
// FREEBIE
8 years ago
Matthew Chen 9cc4521d07 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 227fd5280d Resize conversation view cells as necessary.
// FREEBIE
8 years ago
Matthew Chen f7bd813c9f Restore the date headers to the conversation view cells.
// FREEBIE
8 years ago
Michael Kirk 3080cb512b Compose View: collation index and group search
- Include table index for contacts
- Fix extra spacing in OWS table view
- Separate search results into contact/invite sections
- Include groups in search results when composing new message
- Compose Screen search matches on group member names

// FREEBIE
8 years ago
Michael Kirk df15c904bc Rework push registration
== Account Registration ==

Not complete until push tokens are uploaded

== Remote Notifications Registration ==

Extracted from PushManager

- wait for notification-settings registration to complete before
  requesting push tokens, otherwise it's possible token requests will
  be ignored.

- Less state required for push notification callbacks, specifically, we
  no longer need to ensure we've created a promise before the
  registration delegate methods get called.

- no more TOCFuture in Signal-iOS (still in SSK for now). It's not in
  cases of inexplicable behavior - one a recently, push notification
  premature free, in redphone, and more popular use, and I've seen two
  futures inexplicably being nil.  Instead, let's consolidate around
  PromiseKit for popularly used, maintained, strongly-typed futures.

- separate logic for registering for vanilla push/voip notifications
  (few dependencies) from responding to UILocalNotifications (lots of
  dependencies). Ultimately I'd like to consolidate the remaining
  UILocalNotifications logic with the existing NotificationsManager

== Misc ==

more debug logging
more uniform logging
remove stale logic around newly registered user

// FREEBIE
8 years ago
Matthew Chen 10c00501fd Fix the "is contact" test.
// FREEBIE
8 years ago
Matthew Chen 50ec55c313 Fix the "is contact" test.
// FREEBIE
8 years ago
Matthew Chen 29c4059049 Rework message metadata view.
// FREEBIE
8 years ago
Matthew Chen b3ab6d0602 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 3a39a1ba51 Format message statuses with date if possible.
// FREEBIE
8 years ago
Matthew Chen d557817bb4 Format message statuses with date if possible.
// FREEBIE
8 years ago
Matthew Chen 16d4256e99 Address deadlocks in profile manager.
// FREEBIE
8 years ago
Matthew Chen 11cadf4200 Send, receive & show read receipts to senders/from receivers.
* Send read receipts to senders.
* Honor "send read receipts" preference.
* Process read receipts from recipients.
* Refactor "mark as read" logic.
* Serialize and apply recipient read receipts received before sync transcript.
* Show recipient read receipts in conversation view.

// FREEBIE
8 years ago
Matthew Chen 7268bde506 Add stress group to debug UI.
// FREEBIE
8 years ago
Matthew Chen b28c4b74b2 Pull out TSMessageDecrypter class.
// FREEBIE
8 years ago
Matthew Chen 183f0f1ccd Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 2affcd934f Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 400f536e37 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 5be2014ec7 Create Flat UI rounded button class.
// FREEBIE
8 years ago
Matthew Chen 9dfebb2d4b Apply OWSFail() in more places.
// FREEBIE
8 years ago
Matthew Chen b95b5f69de Apply DataSource to message sender.
// FREEBIE
8 years ago
Matthew Chen df2bf63384 Fix back button width on iOS 11.
// FREEBIE
8 years ago
Matthew Chen 928525c31e Rename home view.
// FREEBIE
8 years ago
Michael Kirk 4e93bec230 black masking style for avatar cropper
- cancel/done buttons
- no navbar for modal edit
- vertically center image

// FREEBIE
8 years ago
Michael Kirk ae174d4a87 proper handling for multibyte characters
// FREEBIE
8 years ago
Matthew Chen cc048b3971 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen ef21c6d50c Ignore "GIF of death."
// FREEBIE
8 years ago
Matthew Chen 5fcf89dff1 Ignore "GIF of death."
// FREEBIE
8 years ago
Michael Kirk 526d5e33b9 Sync profile key to sibling devices when updating contact
// FREEBIE
8 years ago
Michael Kirk 1f3d2d1ed6 Send any profile key in contact sync
// FREEBIE
8 years ago
Michael Kirk f6720f9afa properly clear all cached avatar images
// FREEBIE
8 years ago
Matthew Chen ae1908c40c Show "share profile with group" banner.
// FREEBIE
8 years ago
Matthew Chen 14d472781f Respond to CR.
// FREEBIE
8 years ago
Matthew Chen a340c9ebdc Clean up ahead of CR.
// FREEBIE
8 years ago
Matthew Chen 4578a72ab2 Reorder where contact offers appear.
// FREEBIE
8 years ago
Matthew Chen a825fad47b Start reworking the contact offers.
// FREEBIE
8 years ago
Matthew Chen 98eb4693c5 Rework the contact offers.
// FREEBIE
8 years ago
Matthew Chen 5f2f8ec6d8 Start reworking the contact offers.
// FREEBIE
8 years ago
Matthew Chen 08347478a2 Implement alternative approach to veto-able back buttons.
// FREEBIE
8 years ago
Michael Kirk 7c386b1d1e CR: RTL, trim profile names, ensure not empty
- RTL support with localizable format strings
- Trim decrypted profile names
- more rigorous empty check

// FREEBIE
8 years ago
Matthew Chen 164bf19b47 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen d476bc286d * Add debug UI tools for clearing and logging the profile whitelist.
* Auto-add new contact threads to profile whitelist when local user sends first message to that thread.
* Ensure dynamic interactions have a non-negative timestamp even if the conversation was empty.
* Only call updateMessageMappingRangeOptions _after_ beginLongLivedReadTransaction and updating messageMappings.
* Improve documentation around how to avoid corrupt mappings in conversation view.
* Fix edge cases around large initial range sizes.
* Always treat dynamic interactions as read.
* Rebuild the “unseen” database views to remove dynamic interactions (see above).

// FREEBIE
8 years ago
Matthew Chen 90f959d0ab Respond to CR.
// FREEBIE
8 years ago
Matthew Chen cdb181eadc Sketch out profile header in app settings view.
// FREEBIE
8 years ago
Matthew Chen e01fbc247e Refine profile logic.
// FREEBIE
8 years ago
Matthew Chen 37ce388eb6 Add “add to profile whitelist” offer.
// FREEBIE
8 years ago
Michael Kirk ed4de7e8af Simplify code / pre-cache localNumber
Now that localNumber is read from a dedicated dbConnection we don't have
to worry about it blocking.

// FREEBIE
8 years ago
Matthew Chen a3b16812ec Add convenience category for YapDatabaseConnection.
// FREEBIE
8 years ago
Matthew Chen 904515994f Add more instrumentation to CallService.
// FREEBIE
8 years ago
Matthew Chen 31ab9a00da Add script to extract and gather analytics event names.
// FREEBIE
8 years ago
Michael Kirk 3f4dcecf15 ensure blocking keychange message has identityKey before proceeding
This is increasingly irrelevant due to recent safety number changes, but
legacy clients with old messages can still run into this.

FIXES: https://github.com/WhisperSystems/Signal-iOS/issues/2346

// FREEBIE
8 years ago
Matthew Chen 863fd27abe Respond to CR.
// FREEBIE
8 years ago
Michael Kirk a5f067936c migration to fix any half-registered users
// FREEBIE
8 years ago
Matthew Chen fdac0305cb Update analytics macros.
// FREEBIE
8 years ago
Matthew Chen 693e74e868 Adapt conversation settings view to RTL.
// FREEBIE
8 years ago
Michael Kirk fa42b4a45b Respect disappearing message timer from lockscreen
// FREEBIE
8 years ago
Michael Kirk a59eb25aef extract dismiss string -> CommonStrings.dismissButton
// FREEBIE
8 years ago
Michael Kirk 2067697ed4 Add comment and clearer tests per CR
// FREEBIE
8 years ago
Michael Kirk 4f1ee98489 scrub any data that slips through to logs
Similar to phone number scrubbing, we leave a short prefix of the data
to help with debugging without leaking much data.

// FREEBIE
8 years ago
Matthew Chen c9355630c7 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen d639d6557e Add owsFail free function for swift.
// FREEBIE
8 years ago
Michael Kirk f681712ea0 Code Cleanup
- make some logging clearer
- remove noisy unhelpful logging
- clearer method names

// FREEBIE
8 years ago
Matthew Chen e3f2583b4a Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 0244e134f5 Block device from sleeping during certain activities.
// FREEBIE
8 years ago
Matthew Chen 9e5447f1d4 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen b400c0a327 Don’t show app upgrade nag unless we are at rest in home view or registration view.
// FREEBIE
8 years ago
Matthew Chen 944cd7beef Show app update nag on launch if necessary.
// FREEBIE
8 years ago
Michael Kirk a933fbf215 sync verifications with contact syncing
// FREEBIE
8 years ago
Matthew Chen d01a52758b Respond to CR.
// FREEBIE
8 years ago
Matthew Chen d4a6a35ee3 Avoid stale mapping in conversation view.
// FREEBIE
8 years ago
Matthew Chen e14b9b511d Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 8649b26033 Don’t auto-scroll after “loading more messages” unless we have “more unseen messages”.
// FREEBIE
8 years ago
Matthew Chen 3c28f15dbd Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 75ccff0e4f Improve debug tools for creating “fake” and “tiny attachment” messages.
// FREEBIE
8 years ago
Matthew Chen f71f33c2a6 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen c7426f9343 Avoid crashing on startup due to database view creation.
* Substitute unread view for unseen view until unseen view is ready.
* Register as many views as possible async.
* Perform blocking, safe migrations before async registration of views.
* Add debug settings view for internal app stats.
* Show blocking overlay until async registration of database views is complete.
* Convert version migrations to use AppVersions.

// FREEBIE
8 years ago
Matthew Chen b18e7cde34 Don’t show offers in conversation with self.
// FREEBIE
8 years ago
Matthew Chen 575d631123 Reduce number of database views.
// FREEBIE.
8 years ago
Matthew Chen 11ca51c95f Show verification state banner. Show verification state in conversation settings view.
// FREEBIE
8 years ago
Matthew Chen 5264602106 Move QR code scanning to a separate view.
// FREEBIE
8 years ago
Matthew Chen 58ebebc97f Move QR code scanning to a separate view.
// FREEBIE
8 years ago
Matthew Chen 1ef9ba0659 Clea up usage of fail macro.
// FREEBIE
8 years ago
Matthew Chen 90cdb6fcc6 Only show unread indicator if there is more than one message in the thread.
// FREEBIE
8 years ago
Matthew Chen b5f5599774 Fix edge cases in the unseen indicator.
// FREEBIE
8 years ago
Matthew Chen 22fc69bbb4 Decompose MessagesViewController, add “scroll to bottom button”, improve scrolling behavior.
// FREEBIE
8 years ago
Matthew Chen f49309bf66 Add incoming and outgoing message database views.
// FREEBIE
8 years ago
Matthew Chen 76df8431a8 Reset the unread indicator state if possible while app is in the background.
* Clean up timer usage.

// FREEBIE
8 years ago
Michael Kirk c55f7044a6 Use avatar view in group views
// FREEBIE
8 years ago
Matthew Chen 746d131a89 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen 02df277d19 Respond to CR.
* Add [TSInteraction compareForSorting].
* Add a separate database view for safety number changes.

// FREEBIE
8 years ago
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
8 years ago
Matthew Chen ada4880dc3 Add a database view for dynamic interactions.
// FREEBIE
8 years ago
Matthew Chen d28467aac6 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen df2ee6ba55 “Add to contacts” offer.
// FREEBIE
8 years ago
Matthew Chen bc63389d23 “Add to contacts” offer.
// FREEBIE
8 years ago
Matthew Chen 7b70fe674a “Add to contacts” offer.
// FREEBIE
8 years ago
Matthew Chen 14ebc58d52 Revise scrolling behavior of messages view.
// FREEBIE
8 years ago
Matthew Chen db07ea8a8e Persist attachment file paths.
// FREEBIE
8 years ago
Matthew Chen 16549bee1f Clean up ahead of PR.
// FREEBIE
8 years ago
Matthew Chen ac458cc7ad Add unread indicator.
// FREEBIE
8 years ago
Matthew Chen ea34cec0d9 Clean up ahead of PR.
// FREEBIE
8 years ago
Matthew Chen 96e155c75e Rework appearance of voice messages and audio attachments.
// FREEBIE
8 years ago
Matthew Chen 19b80d1f4b Rework the “disappearing messages” logic.
// FREEBIE
8 years ago
Michael Kirk 073c0d6639 Add/Edit contacts in group list
* properly populate phone fields
* Fix appearence for CNContactViewController
* "Add Contact" vs "Show Contact"

// FREEBIE
8 years ago
Matthew Chen e85aa045e1 Flag voice messages as such in protos.
// FREEBIE
8 years ago
Matthew Chen ad3a1a671a Merge remote-tracking branch 'origin/hotfix/2.11.3' 8 years ago
Michael Kirk a58a71f8f4 no contacts banner -> system settings 8 years ago
Matthew Chen 3f7d23e043 Fix two hotspots in contact parsing and contact syncing.
// FREEBIE
8 years ago
Matthew Chen 0c4351a908 Use SignalAccount class to sync contacts.
// FREEBIE
8 years ago
Michael Kirk d7c7fff679 Fix some compiler warnings
* explicit optional usage in strings
* remove some unused StringUtil code
* swiftlint affected files
* more concise optional casting (and avoid a `!`)

Compiler warnings: 343 -> 318

(Actually most of these are in external libs, but 115 remain in Signal/SSK)

// FREEBIE
8 years ago
Michael Kirk 2ec893d315 Ensure we're retaining all promises to completion
// FREEBIE
8 years ago
Michael Kirk a056c1e052 Check for signalContact vs. AB setup.
Same intent as previous check but more to the point, and doesn't
require tracking additional state.

// FREEBIE
8 years ago
Matthew Chen 4bc98dba58 Rework the scaling and cropping of group avatars.
// FREEBIE
8 years ago
Matthew Chen 26f69b0063 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen ad11c50c1b Reworking observation of Contact and SignalAccount changes.
// FREEBIE
8 years ago
Matthew Chen 994aec0d86 Add SignalAccount class.
// FREEBIE
8 years ago
Matthew Chen 6801963a1b Add SignalAccount class.
// FREEBIE
8 years ago
Matthew Chen 61f59067b6 Improve contact-related views.
* Add support for contacts with more than one Signal account using ContactAccount class.
* Use OWSTableViewController in contact-related views.
* Let users add non-contacts to groups.
* Improve the "new group" and "edit group" views.
* Add utility methods for displaying alerts.
* Warn users before discarding unsaved changes in "edit group" view.
* Pull out "contact view helper" to de-duplicate common logic among contact-related views.
* Pull out "group view helper" to de-duplicate common logic among group-related views.
* Pull out new base class for view used to add accounts to groups or the block list.

// FREEBIE
8 years ago
Michael Kirk a1eef6fde5 Remove invalid assert in case of legitimately stacking unicode
This assert was being falsely triggered by legitimate unicode.

The current state of affairs (unchanged by this PR) is that all
diacriticals will be stripped from a message that also contains e.g. 3
flags in a sequence.

// FREEBIE
8 years ago
Michael Kirk 26b94bf94b Always send a filename
// FREEBIE
8 years ago
Matthew Chen 89de686809 Fix the “navigation titles are black after sharing” issue.
// FREEBIE
8 years ago
Matthew Chen a4709c9218 Respond to CR.
// FREEBIE
8 years ago
Matthew Chen eb23252c6c Fix timer retain cycle.
// FREEBIE
8 years ago
Matthew Chen a29809e672 Respond to CR.
// FREEBIE
8 years ago