Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #1

Open
wants to merge 403 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
403 commits
Select commit Hold shift + click to select a range
a095230
Merge pull request #822 from layerhq/feature/layerkit-0.13.0
chipxsd May 8, 2015
481ba66
Updating version to 1.0.6
kabirmahal May 8, 2015
6fd5a7e
Updated right button action to allow default message override
kabirmahal May 13, 2015
840ad79
Updated documentation
kabirmahal May 13, 2015
95fecb2
Updated docs to be more explicit about user actions
kabirmahal May 13, 2015
7fb816d
Merge pull request #825 from layerhq/feature/APPS-1616-DefaultRightAc…
May 13, 2015
f4168c7
removed unused podfile source
kabirmahal May 14, 2015
17649ae
Merge pull request #827 from layerhq/PodfileFix
kabirmahal May 14, 2015
60f4147
Change "identitifier" to "identifier".
ccrazy88 May 14, 2015
2810a83
Add public property for avatar item
thomasgpeng May 18, 2015
c38f76d
Set new public property for avatar display
thomasgpeng May 18, 2015
aafbcb1
Merge pull request #832 from thomasgpeng/feature/public-avatar-property
kabirmahal May 19, 2015
be9a84c
Merge pull request #828 from ccrazy88/fix/conversation-view-method-typo
kabirmahal May 19, 2015
ae3aad7
Removed optional from ATLAvatarItem to ensure warnings occur earlier …
kabirmahal May 20, 2015
4f81741
Removed initial labels from image rendering for reuse
kabirmahal May 20, 2015
0552684
Updated push notification alert message to be more natural for non te…
kabirmahal May 20, 2015
08c2340
Updated if statement to use ternary operator
kabirmahal May 20, 2015
40f73fb
Updated ternary operator to be correct
kabirmahal May 20, 2015
a2f10d9
Merge pull request #834 from layerhq/bug/APPS-1579-AvatarItemChoices
May 20, 2015
0d8ffbc
Updated logic
kabirmahal May 20, 2015
95bd979
Merge pull request #835 from layerhq/feature/APPS-1672-PushText
May 20, 2015
9999777
Add reset function and conditionally set a downloaded image.
ccrazy88 May 21, 2015
ce29035
Merge pull request #837 from ccrazy88/ccrazy88/fix-avatar-view-reuse
blakewatters May 23, 2015
16f8c79
Change public reloading functions to reconfigure cells.
ccrazy88 May 26, 2015
ba3bb2a
Implmenting support for query configuration
kcoleman731 May 27, 2015
67df8a5
Updating header docs
kcoleman731 May 27, 2015
44320ab
Fixing rake script for running tests
kcoleman731 May 27, 2015
5bd0255
Implementing query customization
kcoleman731 May 28, 2015
734ca46
Updating changelog
kcoleman731 May 28, 2015
b25d933
Updating data source method signature
kcoleman731 May 28, 2015
9ce378b
Moving test scheme
kcoleman731 May 28, 2015
4404dc8
Merge pull request #844 from layerhq/feature/query-customization
May 28, 2015
0ef76b5
Fixes APPS-1725 crash related to changes not being a dictionary anymore.
chipxsd Jun 2, 2015
e67f732
Updating version to 1.0.8
chipxsd Jun 3, 2015
e5d0584
Merge pull request #850 from layerhq/bugfix/APPS-1725-CrashFromChanges
kabirmahal Jun 3, 2015
98008ee
moving dispatch queue creation to common init instead of viewDidLoad …
kabirmahal Jun 18, 2015
4f74869
Merge pull request #855 from layerhq/feature/APPS-1773-queueCrash
kabirmahal Jun 18, 2015
4384335
message input toolbar disables send button when not displaying right …
kabirmahal Jun 23, 2015
92bfa0d
Merge pull request #859 from layerhq/feature/disableRightButton
kabirmahal Jun 23, 2015
42ad5b3
Merge pull request #840 from ccrazy88/chrisna/reload-participants-fix
kabirmahal Jun 24, 2015
810d83c
Expose -initWithLayerClient: method to allow for sub-classing while c…
Rupert-RR May 27, 2015
baf7a6e
Added "designated initializer" declaration to prevent init method con…
Rupert-RR Jun 1, 2015
87f5094
Exposed init method on ConversationViewController and made it the des…
Rupert-RR Jun 2, 2015
b9eaad6
Align spacing to match child lines
Jun 25, 2015
0ee15f8
Tune up initializer header comment language
Jun 25, 2015
192514c
Merge branch 'Rupert-RR-expose-initialiser-for-ATLConversationListVie…
Jun 25, 2015
1df498f
Fixed searching in sample project
timominous Jun 25, 2015
8b44351
Merge pull request #865 from timominous/search-improvements
kabirmahal Jun 25, 2015
ccd9834
Removing initializer waringings
kcoleman731 Jun 25, 2015
89bf9f9
Removing deprecation warnings
kcoleman731 Jun 25, 2015
f5b9409
Merge pull request #868 from layerhq/bugfix/remove-warnings
kabirmahal Jun 25, 2015
25eb2d6
- correct placeholder alignment for ATLMessageComposeTextView in mess…
Jun 26, 2015
c8e6091
Merge pull request #869 from kartikthapar/818-ATLComposeTextView-Plac…
kabirmahal Jun 26, 2015
89991c7
Remove trailing whitespace.
ccrazy88 Jun 26, 2015
8a3693a
Enforce that only one long press mask can exist at a time.
ccrazy88 Jun 26, 2015
98921e8
Add special cases for UIMenuController placement if in a scroll view.
ccrazy88 Jun 26, 2015
9f94f27
Merge pull request #870 from ccrazy88/chrisna/add-uimenucontroller-fu…
kabirmahal Jun 26, 2015
6cd8ba9
Fix issues with custom font and color in media attachments.
sammcd Jun 26, 2015
a821cce
Update ATLMessageInputToolbar.m
sammcd Jun 26, 2015
a90112d
Merge pull request #872 from sammcd/patch-2
kabirmahal Jun 29, 2015
36545b5
Updating layerkit dependency
kabirmahal Jun 29, 2015
c34aeea
Updating version to 1.0.9
kabirmahal Jun 29, 2015
46253bd
Allow display of avatar for outgoign messages (current logged in user)
ntnmrndn Jun 30, 2015
3e76395
Updated changelog
kabirmahal Jun 30, 2015
849c741
Allow collectionview headers to display sender.name instead of defaul…
kabirmahal Jun 30, 2015
7f087b9
Updating API spec link.
Jun 30, 2015
8c84ab8
Adding KIF tests to check header values
kabirmahal Jun 30, 2015
f4439d9
Merge pull request #875 from layerhq/feature/SupportSystemMessages
Jun 30, 2015
964ec56
Fixing exception on media attachment insertion
kabirmahal Jul 1, 2015
e239536
Merge pull request #879 from layerhq/bugfix/mediaAttachments
chipxsd Jul 1, 2015
30c6177
Updating version to 1.0.10
kabirmahal Jul 1, 2015
20e1647
Updating changelog
kabirmahal Jul 1, 2015
dd0c11b
Ensure the animation queue will resume after suspended it to prevent …
Jul 2, 2015
3c0cb2f
Implemented caching and insertion of media attachments
kabirmahal Jul 2, 2015
25c98d6
Added KIF test that verifies caching of media attachments
kabirmahal Jul 2, 2015
fd239df
Merge pull request #882 from vinzen/feature/fix-conversationViewContr…
kabirmahal Jul 6, 2015
0e4a1f5
updated the Photo Action sheet protection to use a tag instead of a p…
andrewcopp Jul 6, 2015
4abd707
Merge pull request #812 from andrewcopp/feature/photoActionSheet
kabirmahal Jul 6, 2015
3746b8d
Reconfigured ATLMessageInputToolbar to check media attachment before …
kabirmahal Jul 7, 2015
10488c2
Updated failing tests to use correct UIImage instance
kabirmahal Jul 7, 2015
413199e
Added more test coverage for input toolbar caching
kabirmahal Jul 7, 2015
fe497c3
Updated documentation
kabirmahal Jul 7, 2015
1a03eda
Removed unnecessary public property and updated line break logic to m…
kabirmahal Jul 7, 2015
a8a7063
Merge pull request #883 from layerhq/feature/APPS-1843-CachingMediaAt…
Jul 8, 2015
cc655ab
Corrects spelling errors
Jul 9, 2015
97b8f77
Merge pull request #888 from layerhq/sean/fix-spelling-errors
kabirmahal Jul 10, 2015
2fed0b7
Finishing Touches to Outgoing Messages Avatar
andrewcopp Jul 14, 2015
5103456
Update ATLConversationViewController.m
andrewcopp Jul 14, 2015
04869af
Testing the User Avatar Functionality
andrewcopp Jul 14, 2015
99e5afe
Resolved conflict
kabirmahal Jul 14, 2015
d6cd9de
Merge pull request #894 from layerhq/andrewcopp-feature/OptionalyDisp…
kabirmahal Jul 14, 2015
b011020
Added optional ATLConverstionViewController delegate method to pass d…
kabirmahal Jul 15, 2015
5d60b36
Updated header document and updated podspec
kabirmahal Jul 15, 2015
b88bda4
Merge pull request #895 from layerhq/feature/APPS-1888-CustomizationD…
Jul 15, 2015
3acee23
New API for setting how often avatar items are displayed in a convers…
andrewcopp Jul 15, 2015
79cb450
exposed the conversation data source's query controller so that subcl…
andrewcopp Jul 7, 2015
e6e7f89
made the conversation view controllers extension of the LYRQueryContr…
andrewcopp Jul 7, 2015
84d560a
Signifying readwrite so we know we have a public readonly property
andrewcopp Jul 15, 2015
7e444ea
Tests to cover new avatar frequency functionality
andrewcopp Jul 15, 2015
1382776
Fixed tests to actually use set receivedAt dates
andrewcopp Jul 15, 2015
8372838
Merge pull request #896 from andrewcopp/feature/avatarItemFrequency
kabirmahal Jul 15, 2015
96d9f71
Merge pull request #887 from andrewcopp/feature/exposeQueryController
kabirmahal Jul 15, 2015
4dd86af
Fixed location data for cached location images
varkor Jul 21, 2015
085f401
Dismiss menu on any pan
varkor Jul 21, 2015
09c7ea1
Don't call sendLocationMessage if not necessary
andrewcopp Jul 21, 2015
995a7a2
Fix to unblock valid location messages
andrewcopp Jul 22, 2015
5f0d941
Another change to block whitespace messages
andrewcopp Jul 22, 2015
4f2a953
Merge pull request #900 from andrewcopp/bug/locationPermissions
kabirmahal Jul 22, 2015
424b196
Exposed NSTextCheckingTypes
andrewcopp Jul 22, 2015
4221286
More Link Types
andrewcopp Jul 22, 2015
f4979b4
Setting Default Link Types
andrewcopp Jul 22, 2015
127269c
Notifications for Tapping Phone Numbers
andrewcopp Jul 22, 2015
7d705eb
Only send notification if type is active
andrewcopp Jul 22, 2015
ea47b04
Test that Phone Number is underlined
andrewcopp Jul 22, 2015
36267be
More robust testing and documentation
andrewcopp Jul 22, 2015
5617c7a
Refactoring Names and Typos
andrewcopp Jul 22, 2015
d98a38c
Merge pull request #901 from andrewcopp/feature/phoneNumbers
kabirmahal Jul 22, 2015
abf1c3b
Added support for internationalization
kabirmahal Jul 22, 2015
ebfe4c0
Updated localized string macro name
kabirmahal Jul 22, 2015
158e344
Added internatinalization for conversation list and participant list …
kabirmahal Jul 23, 2015
f5b76d8
Updated internationalization with all text changes
kabirmahal Jul 23, 2015
9385603
Merge pull request #903 from layerhq/feature/APPS-1844-Internationali…
chipxsd Jul 23, 2015
80ff762
Updating Avatar Image View
kcoleman731 Jul 29, 2015
860d965
Fixing conflict
kcoleman731 Jul 29, 2015
b97d0a3
Removing unused properties
kcoleman731 Jul 29, 2015
c978332
Updating changelog
kcoleman731 Jul 29, 2015
1063646
Updating dependencies
kcoleman731 Jul 29, 2015
b5768f8
Removing unused var
kcoleman731 Jul 29, 2015
f62a1a1
Small changelog typo fix
kcoleman731 Jul 29, 2015
43c2d19
Merge pull request #908 from layerhq/feature/APPS-1944-avatar-image-f…
chipxsd Jul 30, 2015
e346787
Changed ios version number check to use constant check instead of NSF…
kabirmahal Aug 5, 2015
5c9ef5b
Removed excess tester wait methods
kabirmahal Aug 5, 2015
05a94e8
Merge pull request #914 from layerhq/feature/APPS-1955-iOS7ConstantSu…
chipxsd Aug 5, 2015
6a9217e
Ensure objectChanges is erased when actioned
amleszk Aug 7, 2015
7f75dfa
Added public menu controller actions array to bubble view
kabirmahal Aug 7, 2015
21d7cb3
Added utility method to return LYRMessage from menu controller action
kabirmahal Aug 8, 2015
a55dcff
Added type checking for menu controller actions
kabirmahal Aug 10, 2015
29de57e
Renamed function and updated documentation
kabirmahal Aug 10, 2015
bf9fd08
Merge branch 'master' of github.com:layerhq/Atlas-iOS into bugfix/saf…
amleszk Aug 10, 2015
ba6eb0d
Merge pull request #919 from Hinge/bugfix/safety_in_object_changes_3
kabirmahal Aug 10, 2015
e98997c
Fix constraint in Bubble View
garhiggins Aug 14, 2015
b828479
Adding in check for smaller than boundary images
kabirmahal Aug 14, 2015
30af2ac
Merge pull request #925 from layerhq/Mahal/SizingFix
Aug 14, 2015
0584f9b
Moved function to ATLConversationViewController
kabirmahal Aug 17, 2015
1361cab
Removed convenience method
kabirmahal Aug 17, 2015
58d840c
Merge pull request #918 from layerhq/feature/APPS-1968-menuController…
kabirmahal Aug 18, 2015
0999e72
Setting expandingpaginatedwindow to NO when returning early
kabirmahal Aug 18, 2015
76ba952
Merge pull request #927 from layerhq/bugfix/APPS-2006-AtlasBugScrolling
Aug 18, 2015
07aa85b
Image and gif loading now occurs on a non main thread, and then is br…
kabirmahal Aug 6, 2015
d0982a8
Added test to stub out gif loading
kabirmahal Aug 14, 2015
97ccfd4
Testing semaphore data load
kabirmahal Aug 17, 2015
b4b283c
Added unit test for ATLMessageCollectionViewCell
kabirmahal Aug 18, 2015
3a91851
Added test to verify collectionview will not update with image during…
kabirmahal Aug 18, 2015
7852890
Updated with licensing
kabirmahal Aug 18, 2015
5c34937
Updated weakself references
kabirmahal Aug 18, 2015
673d1e9
Added test and logic for image updates
kabirmahal Aug 18, 2015
9c2d2e7
Added object allocation check to allow location bypassing
kabirmahal Aug 18, 2015
31e0552
Merge pull request #929 from layerhq/bugfix/APPS-2008-sendinglocation
kabirmahal Aug 18, 2015
7b5c3d2
Merge pull request #915 from layerhq/feature/APPS-1967-backgroundLoading
chipxsd Aug 18, 2015
0ca151d
Added right accessory button font as UI_APPEARANCE_SELECTOR
kabirmahal Aug 19, 2015
8301320
Merge pull request #930 from layerhq/feature/APPS-messageInputToolbar…
kabirmahal Aug 19, 2015
337cd23
Merge pull request #899 from varkor/master
kabirmahal Aug 19, 2015
bc4d536
Merge pull request #924 from garhiggins/patch-1
kabirmahal Aug 19, 2015
c8b4440
Fixes bug which could cause images to paste with wrong orientation
kcoleman731 Aug 20, 2015
5601a98
Removing whitespace
kcoleman731 Aug 21, 2015
ac6a966
Merge pull request #935 from layerhq/bugfix/paste-image-rotation
kabirmahal Aug 21, 2015
ec0f3e5
Fix Conversation View's insets in popover
garhiggins Aug 31, 2015
41464d5
Updated atlas with new layerkit query controller initialization
kabirmahal Sep 2, 2015
4420b2f
Updated querycontroller mock
kabirmahal Sep 2, 2015
0a6db44
Updated changelog
kabirmahal Sep 2, 2015
d6bdcc9
Added in better error handling
kabirmahal Sep 2, 2015
055a7e2
Merge pull request #950 from layerhq/feature/LayerkitUpdates
chipxsd Sep 3, 2015
38b42fc
Fixed broken tests
kabirmahal Sep 3, 2015
21680a9
Merge pull request #952 from layerhq/Mahal/TestFixes
Sep 3, 2015
42b1aeb
Updating version to 1.0.11
kabirmahal Sep 3, 2015
363926e
Merge branch 'master' of github.com:layerhq/Atlas-iOS
kabirmahal Sep 3, 2015
c0892b5
Added a nil safety-check to shouldDisplayAvatarItemAtIndexPath
varkor Sep 7, 2015
1cc923a
Merge remote-tracking branch 'layerhq/master'
varkor Sep 7, 2015
5b41455
Merge pull request #955 from varkor/master
kabirmahal Sep 8, 2015
636fbf6
Clear menu items after menu dismiss
varkor Sep 10, 2015
f5d86fc
Prevented scrolling on a long-press
varkor Sep 10, 2015
496f70e
Prevent long-pressing blocking scrolling if there are no menu actions
varkor Sep 10, 2015
a9982d1
Added a transition to the highlighted message mask
varkor Sep 10, 2015
492a7f0
Merge remote-tracking branch 'layerhq/master'
varkor Sep 10, 2015
91e767c
Added video functionality
dinkk89 Jul 23, 2015
3c13357
Added new functionality
dinkk89 Jul 23, 2015
cf3dd98
Fixed cosmetic issues
dinkk89 Jul 23, 2015
0c799e8
Removal of duplicate code
dinkk89 Jul 23, 2015
43bbfb6
Comment fixes
dinkk89 Jul 23, 2015
5b05c97
Tweaking comment
Jul 23, 2015
3c4396e
Removing extra comments
Jul 23, 2015
ad588be
Refactored existing ATLMediaInputStream to ATLPhotoInputStream.
chipxsd Jul 27, 2015
c136fa9
A few instructions on how to implement an input stream for videos.
chipxsd Jul 27, 2015
0a667dd
ATLMediaInputStream now handles videos, added unit testcase
dinkk89 Jul 31, 2015
fde06af
removing unused code
dinkk89 Aug 1, 2015
16974d6
Sending live video
dinkk89 Aug 13, 2015
cd0501d
New unit tests added
dinkk89 Aug 12, 2015
1852a3a
Fixing formatting issues
dinkk89 Aug 14, 2015
db4cf8e
address comments
dinkk89 Aug 17, 2015
a9d4590
Removal of test code
dinkk89 Aug 17, 2015
deb414c
First pass of the ATLMediaInputStream API design.
chipxsd Aug 18, 2015
9db4fa5
A test utility function that renders a video file at a desired path.
chipxsd Aug 19, 2015
0ed14a6
Removed the clip trimming APIs for now.
chipxsd Aug 19, 2015
3b3eca9
Updated the ATLMediaAttachment factory method signature (the one with…
chipxsd Aug 19, 2015
1220303
Adhere's to the new API format
dinkk89 Aug 19, 2015
fb2a519
Removal of extra space
dinkk89 Aug 19, 2015
3d534f4
Implemented input photo streaming from a file.
chipxsd Aug 20, 2015
62a0f37
Updated the mediaInputStreamWithFileURL method description in documen…
chipxsd Aug 20, 2015
b35b1cb
Added image support for ATLMediaAttachment initWithFileURL
dinkk89 Aug 20, 2015
a43da6e
Progress Bar for downloading videos
dinkk89 Aug 20, 2015
7f9a0d4
Fixed Unit tests
dinkk89 Aug 21, 2015
cf90958
Media Attachment for files now takes media metadata straight from the…
chipxsd Aug 21, 2015
1986edc
Missing error handling and minor code cleanup.
chipxsd Aug 21, 2015
87affd7
Fixed the failing tests (conflicts I had from a rebase).
chipxsd Aug 21, 2015
5959f3b
We shouldn't pre-download every video clip if its message view bubble…
chipxsd Aug 27, 2015
e36b254
Dropped the unused code.
chipxsd Aug 31, 2015
1d44a80
Fixed circle of play button so it does not overlap with loading cirlce
dinkk89 Aug 31, 2015
047d3d8
Play button in bubble view now drawn with layers.
chipxsd Sep 3, 2015
1461c80
Replaced tabs with spaces.
chipxsd Sep 16, 2015
1d48cf6
Using the new push notification configuration in messages.
chipxsd Sep 16, 2015
e581b75
Getting the video from the image picker in the higest quality.
chipxsd Sep 17, 2015
9b8f8ed
Fixed the description in the ATLMediaAttachmentType.
chipxsd Sep 17, 2015
706db74
Respecting the video orientation when re-encoding the video and gener…
chipxsd Sep 17, 2015
271e100
Prioritizing media source from image picker.
chipxsd Sep 17, 2015
083b51d
Added a missing documentation block for a C function in ATLMediaAttac…
chipxsd Sep 17, 2015
794da43
Fixes input toolbar location button breakage.
chipxsd Sep 17, 2015
74cb40a
Fixed the broken test in ATLMediaAttachmentTests.
chipxsd Sep 17, 2015
24fe2c8
Reverted the push configuration back to the original dictionary.
chipxsd Sep 17, 2015
1bb188c
Merge pull request #905 from layerhq/feature/videoSupport
chipxsd Sep 17, 2015
15f5f57
Added in uisplitviewcontroller support for the input accessory view's…
kabirmahal Sep 17, 2015
f1d185e
Added test to verify frame change
kabirmahal Sep 17, 2015
9a62c24
Merge pull request #969 from layerhq/feature/OptimizeForSplitViewCont…
chipxsd Sep 17, 2015
f99237c
Respect marksMessagesAsRead property on ATLConversationViewController
dfinzer Sep 14, 2015
6ed5460
Merge pull request #965 from dfinzer/unread
kabirmahal Sep 18, 2015
5f45616
Prioritize photo asset over UIImage when using image picker.
chipxsd Sep 20, 2015
e683103
Merge pull request #976 from layerhq/bugfix/APPS-2007-PrioritizeAsset…
Sep 21, 2015
10c8486
fixes ios9 window bug
kabirmahal Sep 22, 2015
f3bf3c0
Merge pull request #977 from layerhq/bugfix/Mahal-blackinputbar
Sep 23, 2015
bdfb0b8
Merge remote-tracking branch 'layerhq/master'
varkor Sep 24, 2015
d97cd32
dismiss keyboard when left button tapped
neil477 Sep 22, 2015
3cf4b5f
Merge pull request #979 from Bluefieldscom/bugfix/actionsheetKeyboard…
kabirmahal Sep 28, 2015
498f6c2
Adding shouldDisplaySearchController property to ATLConversationListV…
kabirmahal Sep 30, 2015
6bbefe7
Added cell height caching and optimized cell rendering height code
kabirmahal Oct 1, 2015
219c895
Adding Atlas optimizates for cell height calculations
kabirmahal Oct 1, 2015
6f56185
Merge pull request #989 from layerhq/Mahal/ScrollingOptimizations
kabirmahal Oct 2, 2015
64c2fc5
Fixed auto layout breaking constraints for ios9
kabirmahal Oct 3, 2015
0d15cf7
Merge pull request #993 from layerhq/Mahal/AutoLayoutFixes
kabirmahal Oct 5, 2015
c880b57
Merge pull request #987 from layerhq/feature/APPS-2003-conversationSe…
kabirmahal Oct 5, 2015
5c27896
Merge pull request #945 from garhiggins/patch-3
kabirmahal Oct 6, 2015
2e05700
Merge pull request #960 from varkor/master
kabirmahal Oct 7, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: objective-c

script:
- rake test
- bundle exec rake test
129 changes: 129 additions & 0 deletions ATLMessageCollectionViewCellTests.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
//
// ATLMessageCollectionViewCellTests.m
// Atlas
//
// Created by Kabir Mahal on 8/17/15.
// Copyright (c) 2015 Layer. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import <AssetsLibrary/AssetsLibrary.h>
#import "ATLMessageCollectionViewCell.h"
#import "ATLTestClasses.h"
#import "ATLTestUtilities.h"
#define EXP_SHORTHAND
#import <Expecta/Expecta.h>
#import <OCMock/OCMock.h>
#import "LYRMessageMock.h"
#import "LYRMessagePartMock.h"

@interface ATLMessageCollectionViewCellTests : XCTestCase

@end

@implementation ATLMessageCollectionViewCellTests

- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}

- (void)testThatAsynchronousGifLoadingDoesNotUpdateReusedCells
{
ATLMessageCollectionViewCell *cell = [[ATLMessageCollectionViewCell alloc] initWithFrame:CGRectZero];
ATLMessageBubbleView *bubbleView = cell.bubbleView;
id partialMock = OCMPartialMock(bubbleView);
[[[partialMock reject] ignoringNonObjectArgs] updateWithImage:[OCMArg any] width:1337];

NSBundle *parentBundle = [NSBundle bundleForClass:[self class]];
NSURL *url = [parentBundle URLForResource:@"boatgif" withExtension:@"gif"];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *gif = [UIImage imageWithData:data];

LYRMessagePartMock *part1 = [LYRMessagePartMock messagePartWithMIMEType:ATLMIMETypeImageGIF data:data];
data = part1.data;
NSDictionary *imageMetadata = @{ @"width": @(gif.size.width),
@"height": @(gif.size.height),
@"orientation": @(gif.imageOrientation) };
NSData *JSONData = [NSJSONSerialization dataWithJSONObject:imageMetadata options:NSJSONWritingPrettyPrinted error:nil];
LYRMessagePartMock *part2 = [LYRMessagePartMock messagePartWithMIMEType:ATLMIMETypeImageSize data:JSONData];
LYRMessageMock *messageMock1 = [LYRMessageMock newMessageWithParts:@[ part1, part2 ] senderID:[ATLUserMock userWithMockUserName:ATLMockUserNameKlemen].participantIdentifier];
LYRMessageMock *messageMock2 = [LYRMessageMock newMessageWithParts:@[ [LYRMessagePartMock messagePartWithMIMEType:@"text/plain" data:[@"test" dataUsingEncoding:NSUTF8StringEncoding]] ] senderID:[ATLUserMock userWithMockUserName:ATLMockUserNameKlemen].participantIdentifier];

dispatch_semaphore_t semaphore = dispatch_semaphore_create(2);

id partialmockedPart = OCMPartialMock(part1);
[[partialmockedPart expect] andForwardToRealObject];
[[partialmockedPart expect] andForwardToRealObject];
[[partialmockedPart expect] andForwardToRealObject];
[[partialmockedPart expect] andDo:^(NSInvocation *invocation) {
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
[invocation setReturnValue:(__bridge void *)(data)];
}];
[cell presentMessage:(LYRMessage *)messageMock1];
[cell prepareForReuse];
[cell presentMessage:(LYRMessage *)messageMock2];

dispatch_semaphore_signal(semaphore);

[partialMock verifyWithDelay:2.0f];
}

- (void)testThatAsynchronousImageLoadingDoesNotUpdateReusedCells
{
ATLMessageCollectionViewCell *cell = [[ATLMessageCollectionViewCell alloc] initWithFrame:CGRectZero];
ATLMessageBubbleView *bubbleView = cell.bubbleView;
id partialMock = OCMPartialMock(bubbleView);
[[[partialMock reject] ignoringNonObjectArgs] updateWithImage:[OCMArg any] width:1337];

UIImage *image = ATLTestAttachmentMakeImageWithSize(CGSizeMake(800, 800));
NSData *data = UIImageJPEGRepresentation(image, 1.0f);

LYRMessagePartMock *part1 = [LYRMessagePartMock messagePartWithMIMEType:ATLMIMETypeImageJPEG data:data];
data = part1.data;
NSDictionary *imageMetadata = @{ @"width": @(image.size.width),
@"height": @(image.size.height),
@"orientation": @(image.imageOrientation) };
NSData *JSONData = [NSJSONSerialization dataWithJSONObject:imageMetadata options:NSJSONWritingPrettyPrinted error:nil];
LYRMessagePartMock *part2 = [LYRMessagePartMock messagePartWithMIMEType:ATLMIMETypeImageSize data:JSONData];
LYRMessageMock *messageMock1 = [LYRMessageMock newMessageWithParts:@[ part1, part2 ] senderID:[ATLUserMock userWithMockUserName:ATLMockUserNameKlemen].participantIdentifier];
LYRMessageMock *messageMock2 = [LYRMessageMock newMessageWithParts:@[ [LYRMessagePartMock messagePartWithMIMEType:@"text/plain" data:[@"test" dataUsingEncoding:NSUTF8StringEncoding]] ] senderID:[ATLUserMock userWithMockUserName:ATLMockUserNameKlemen].participantIdentifier];

dispatch_semaphore_t semaphore = dispatch_semaphore_create(2);

id partialmockedPart = OCMPartialMock(part1);
[[partialmockedPart expect] andForwardToRealObject];
[[partialmockedPart expect] andForwardToRealObject];
[[partialmockedPart expect] andForwardToRealObject];
[[partialmockedPart expect] andDo:^(NSInvocation *invocation) {
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
[invocation setReturnValue:(__bridge void *)(data)];
}];
[cell presentMessage:(LYRMessage *)messageMock1];
[cell prepareForReuse];
[cell presentMessage:(LYRMessage *)messageMock2];

dispatch_semaphore_signal(semaphore);

[partialMock verifyWithDelay:2.0f];
}

@end
4 changes: 2 additions & 2 deletions Atlas.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Atlas"
s.version = '1.0.0'
s.version = '1.0.11'
s.summary = "Atlas is a library of communications user interface components integrated with LayerKit."
s.homepage = 'https://atlas.layer.com/'
s.social_media_url = 'http://twitter.com/layer'
Expand All @@ -18,5 +18,5 @@ Pod::Spec.new do |s|
s.header_mappings_dir = 'Code'
s.ios.frameworks = %w{UIKit CoreLocation MobileCoreServices}
s.ios.deployment_target = '7.0'
s.dependency 'LayerKit'
s.dependency 'LayerKit', '>= 0.16.0'
end
Loading