Commit Graph

49 Commits

Author SHA1 Message Date
Anton Schukin 43e1f675fb ChatInputItemProtocol.selected and ChatInputItemProtocol.disabled properties became public 2016-07-27 10:01:47 +01:00
Anton Schukin f0198d77ce Use calculated properties instead of functions in default protocol implementation 2016-07-26 18:25:09 +01:00
Anton Schukin 946232bf21 Ignore tap if input item is disabled 2016-07-26 18:06:26 +01:00
Anton Schukin c17a99014b Move ChatInputItem selected and enabled properties to protocol extension 2016-07-26 17:55:42 +01:00
Anton Schukin a8ba3531b7 tabView renamed to inputButton for consistency 2016-07-26 17:50:17 +01:00
Anton Schukin 3fa9853321 TabInputButton renamed to ChatInputButton for consistency 2016-07-26 17:34:57 +01:00
Diego Sánchez d8a162cb0f Xcode 8.0 b3 + swift 2.3 support (#183)
* Fixes compilation for Xcode 8.0(beta 3)/Swift 2.3

* Adds NSCameraUsageDescription and NSPhotoLibraryUsageDescription to avoid crash on iOS 10 beta

* Runs swiftlint autocorrect
2016-07-18 23:28:11 +01:00
Diego Sánchez 359ebe1aa4 Merge branch 'dev' into improve-responsiveness-of-camera 2016-07-06 11:34:31 +01:00
Igor Kashkuta 6f0e82fb7d Fix jolty transitions between input items. (#174) 2016-07-06 11:16:51 +01:00
Diego Sanchez 8f9ce5df4e Improves responsiveness of camera when switching to/from full-screen camera view. 2016-07-05 23:14:22 +01:00
Igor Kashkuta 600da97e13 Revert "Preserve height of ChatInputItem if keyboard item was previously opened. (#170)" (#172)
This reverts commit b2fcf7b7fc.
2016-07-04 16:18:21 +01:00
Igor Kashkuta b2fcf7b7fc Preserve height of ChatInputItem if keyboard item was previously opened. (#170) 2016-06-30 20:30:36 +01:00
Diego Sánchez 7a0f8d8e58 Improvements to photo input item: (#168)
- Just one capture session per input component.
 - Avoids starting/stoping capture during collection reloads, which can make the live camera take longer to capture or even hang.
 - Moves creation/destruction of capture session to the background: when opening/closing the input component many times it was resulting in capture start / stop blocking the main thread for some seconds on iOS 8
 - Queues updates in the collection view: doing a reloadData right after reloadItemsAtIndexPaths (update video) results in the visible cells not being refreshed
2016-06-29 23:54:15 +01:00
Diego Sánchez 37dd3bd562 Minor performance improvements for TextBubble (#166)
* Minor performance improvements:
 - Avoids updating font and color in TextBubble if it's not needed: would make attributed text to update
 - Avoids updating views in selected setter if value didn't change (setter is called by the collection view as part of dequeuing)
 - Avoids creating dictionary of attributes all the time for date attributed string (for some reason this was appearing in profiling with some swift-to-objc conversions)

Uses enum as image key in text style for greater safety.

* Removes linter warnings
2016-06-27 23:03:32 +01:00
Diego Sánchez bc4c9d8a64 Fixes crash when deleting a emoji. (#162)
Issue related to Unicode and String vs NSString.

NSRange has length = 2 for the emoji while it represents a single character.
2016-06-23 15:21:21 +01:00
Diego Sánchez 5c3c84e6a6 Input bar customization enhancements (#154)
Adds more customizable options to the input bar

Bar with icons gets customizable height
Buttons get customizable intrinsic contentSize, so they can be bigger and easy to tap
Buttons get customizable images for any UIControlState
Send button gets customizable text colors for any UIControlState
2016-06-16 15:27:37 +01:00
Sergey Armodin 9538acf79d Make HorizontalStackScrollView public to make possible creating subclass of ChatInputBar with own xib (#153)
* Merge remote-tracking branch 'badoo/master' into dev

Make HorizontalStackScrollView public to make possible creating
subclass of ChatInputBar with own xib

* override fix
2016-06-14 16:00:42 +01:00
Diego Sánchez f442111937 Allows configuring a maximum number of characters for the input bar (#152) 2016-06-14 14:22:42 +01:00
Diego Sánchez 62757faa54 Fixes cell being configured with the wrong image coming from PHImageManager (#137) 2016-05-25 18:32:16 +01:00
Igor Kashkuta 31a441aebc Preserve old behavior with call to -shouldFocusOnItem function 2016-05-05 19:09:05 +01:00
Igor Kashkuta 4dcf4a4f4b Remove unused parameter 2016-05-05 19:03:12 +01:00
Igor Kashkuta 2069b367a4 Add ability to focus on chat input item programmatically. 2016-05-05 18:57:50 +01:00
Diego Sanchez f3e3556a20 Fixes some keyboard issues 2016-04-20 11:51:49 +01:00
Igor Kashkuta 3319ba9036 Aand add one more simplification with default value for optionals 2016-04-14 18:14:41 +01:00
Igor Kashkuta a5dbc88c68 Simplify code with optionals. 2016-04-14 18:07:54 +01:00
Igor Kashkuta e1b88baeac Use ?? instead of complex if statement. 2016-04-14 17:50:09 +01:00
Igor Kashkuta 67387f1d9d Add ability to disallow focus on InputItem for ChatInputBar. 2016-04-14 17:32:59 +01:00
Igor Kashkuta 4d4fbed64d Add ability to disallow the beginning of text editing for ChatInputBar. 2016-04-14 17:32:41 +01:00
Igor Kashkuta 9b4232bcb3 Rename isSendButtonEnabledForInputBar -> shouldEnableSendButton 2016-04-13 15:59:33 +01:00
Igor Kashkuta 3b449b352f Make the name for closure property more clear 2016-04-13 15:51:29 +01:00
Igor Kashkuta f62c619b80 Add ability to control Send button enabled state from external code. 2016-04-13 14:49:54 +01:00
Diego Sanchez eb84520fff Updates to Swift 2.2 2016-04-11 14:22:56 +01:00
Anton Schukin 9062c4cec0 Listening for photo library updates 2016-03-31 16:50:53 +01:00
Diego Sanchez 613074bdb9 Fixes leaking the view controller when keyboard is present 2016-03-30 20:04:22 +01:00
Diego Sánchez 3ed7385258 Merge pull request #86 from badoo/master
Updates dev with master
2016-03-24 23:28:16 +00:00
Viacheslav Radchenko e102878d88 Show placeholder cells in photo input if not enough photos 2016-03-24 19:00:14 +00:00
Viacheslav Radchenko f1f1f6465d Implement ChatInputItemProtocol directly, rather then through class extension 2016-03-22 17:21:40 +00:00
Diego Sanchez c1b7cb7553 Adopts changes in appearance on ChattoApp. The default values in appearance don't work for any app (unlocalized texts) so it's better to remove the default value and make existing apps get a compiler error. 2016-03-21 23:53:58 +00:00
Diego Sanchez 4cca18783a Fixes swiftlint warnings 2016-03-21 20:55:56 +00:00
Diego Sanchez 2c5b065d5c Improvements for custom styling
- Allows reusing default styles by injecting parameters
 - Insets and fonts for input component
2016-03-21 20:49:30 +00:00
Viacheslav Radchenko 0e35ad6ba9 Added block handlers 2016-03-17 15:17:49 +00:00
Viacheslav Radchenko a9b230fe50 Extend PhotosInputViewDeelgate with permission callbacks 2016-03-17 11:43:12 +00:00
Zhao Wang 1699199857 update self.dynamicType to static type to avoid potential issues of finding default images in NSBundle 2016-03-13 13:19:51 -07:00
Anton Schukin e6ae451a32 ChatInputBarDelegate becomes public 2016-03-05 12:57:00 +00:00
Anton Schukin e0b8dd89cd Adopted ChatInputBar delegation 2016-03-05 12:54:40 +00:00
Anton Schukin bd1fb5ada5 Implemented proper presenter 2016-03-05 12:39:21 +00:00
Diego Sanchez e297a86bf2 Fixes autolayout warnings 2016-02-02 22:58:12 +00:00
Diego Sanchez a0a071afa8 Fixes linter warnings and updates some rules. Also removes deprecated '++' and '--' 2016-01-27 22:04:32 +00:00
Diego Sanchez 2884160061 Chatto inception 2015-11-26 22:48:25 +00:00