Skip to content

Commit

Permalink
1/28/2015
Browse files Browse the repository at this point in the history
  • Loading branch information
FredericJacobs committed Jan 28, 2015
1 parent 8bf6fdd commit a824d24
Show file tree
Hide file tree
Showing 64 changed files with 15,837 additions and 15,310 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ - (UICollectionViewCell *)collectionView:(JSQMessagesCollectionView *)collection
NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString:allText
attributes:attrs];
if([call date]!=nil) {
// Not a group meta message
NSDictionary *subAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
regularFont, NSFontAttributeName, nil];
const NSRange range = NSMakeRange([text length],[[call dateText] length]);
Expand All @@ -495,7 +496,10 @@ - (UICollectionViewCell *)collectionView:(JSQMessagesCollectionView *)collection
} else {
callCell.incomingCallImageView.image = [call thumbnailImage];
}

}
else {
// A group meta message
callCell.incomingCallImageView.image = [call thumbnailImage];
}

callCell.cellLabel.attributedText = attributedText;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ typedef enum : NSUInteger {
kCallOutgoing = 1,
kCallIncoming = 2,
kCallMissed = 3,
kGroupUpdateJoin = 4,
kGroupUpdateLeft = 5,
kGroupUpdate = 6
} CallStatus;



@interface JSQCall : NSObject <JSQMessageData, NSCoding, NSCopying>

/*
Expand Down Expand Up @@ -45,6 +49,11 @@ typedef enum : NSUInteger {
*/
@property (nonatomic) TSMessageAdapterType messageType;

/*
* User can configure whether a thumbnail is used in the display of this cell or not
*/
@property (nonatomic) BOOL useThumbnail;


#pragma mark - Initialization

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,35 @@ -(NSString*)dateText
return [dateFormatter stringFromDate:_date];
}

-(UIImage*)thumbnailImage
{
return nil;
-(UIImage*)thumbnailImage {
// This relies on those assets being in the project
if(!_useThumbnail) {
return nil;
}
switch (_status) {
case kCallOutgoing:
return [UIImage imageNamed:@"statCallOutgoing--blue"];
break;
case kCallIncoming:
case kCallMissed:
return [UIImage imageNamed:@"statCallIncoming--blue"];
break;
case kGroupUpdate:
return [UIImage imageNamed:@"statRefreshedGroup--blue"];
break;
case kGroupUpdateLeft:
return [UIImage imageNamed:@"statLeftGroup--blue"];
break;
case kGroupUpdateJoin:
return [UIImage imageNamed:@"statJoinedGroup--blue"];
break;
default:
return nil;
break;
}
}


#pragma mark - NSObject

-(BOOL)isEqual:(id)object
Expand Down
18 changes: 9 additions & 9 deletions Manifest.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ PODS:
- JSQMessagesViewController (6.1.1):
- JSQSystemSoundPlayer (~> 2.0.0)
- JSQSystemSoundPlayer (2.0.1)
- libPhoneNumber-iOS (0.7.5)
- Mantle (1.5.1):
- Mantle/extobjc (= 1.5.1)
- Mantle/extobjc (1.5.1)
- libPhoneNumber-iOS (0.7.6)
- Mantle (1.5.4):
- Mantle/extobjc (= 1.5.4)
- Mantle/extobjc (1.5.4)
- OpenSSL (1.0.200)
- PastelogKit (1.2):
- CocoaLumberjack (~> 1.9)
- ProtocolBuffers (1.9.3)
- ProtocolBuffers (1.9.7)
- SCWaveformView (1.0.0)
- SocketRocket (0.3.1-beta2)
- SQLCipher/common (3.1.0)
Expand Down Expand Up @@ -97,7 +97,7 @@ CHECKOUT OPTIONS:
:commit: cf63307d5e3833b16caa9a07f3b5ea06359913f9
:git: https://github.com/corbett/APDropDownNavToolbar.git
JSQMessagesViewController:
:commit: c8262eee36cf84eded334062dc80e1f2a1c495ab
:commit: 26fb5cbcf4a2bf15b6f384d29028b15a5e1a62f5
:git: https://github.com/WhisperSystems/JSQMessagesViewController
SocketRocket:
:commit: 954750c018
Expand All @@ -114,11 +114,11 @@ SPEC CHECKSUMS:
HKDFKit: 5998cf1bbb611e7ecc6bd3eaaef8c7a7da7be949
JSQMessagesViewController: 554430bbaeb0b2dbed8d4aaa2bdf64559e67f353
JSQSystemSoundPlayer: 55528c699a283aae2220d3ae7b8b527d2ecef4b4
libPhoneNumber-iOS: 16b9556d7fdf4819eabeb7b7356fea3373fa47f9
Mantle: d7c5ac734579ec751c58fecbf56189853056c58c
libPhoneNumber-iOS: d4316d494d4997c40a6059faf35a970d7f4eb1c0
Mantle: d5fbaf30fbc58031223af13812c060e15934a1fe
OpenSSL: 4c7be3eca71139f52984542d8c4c0752154d26c3
PastelogKit: 8bab71b1d187617a83e7124cffe9eb1a600e6695
ProtocolBuffers: e80f9e4fc401aec9d3c30be70db87fcd5f1cb880
ProtocolBuffers: 37fdd327d36856f965ea9029b5ec0c7120e3a452
SCWaveformView: 55f0cd6e80df1a46ff70892bc4041f5b7d8ad43c
SocketRocket: 9cbe08469513356cddc0afcab1ff160bd190296a
SQLCipher: 981110217eb93c2779c34fb59e646a1c1da918d8
Expand Down
8 changes: 8 additions & 0 deletions Mantle/Mantle/Mantle.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
// Copyright (c) 2012 GitHub. All rights reserved.
//

#import <Foundation/Foundation.h>

//! Project version number for Mantle.
FOUNDATION_EXPORT double MantleVersionNumber;

//! Project version string for Mantle.
FOUNDATION_EXPORT const unsigned char MantleVersionString[];

#import <Mantle/MTLJSONAdapter.h>
#import <Mantle/MTLManagedObjectAdapter.h>
#import <Mantle/MTLModel.h>
Expand Down
2 changes: 2 additions & 0 deletions Mantle/Mantle/extobjc/EXTRuntimeExtensions.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#import "EXTRuntimeExtensions.h"

#import <Foundation/Foundation.h>

mtl_propertyAttributes *mtl_copyPropertyAttributes (objc_property_t property) {
const char * const attrString = property_getAttributes(property);
if (!attrString) {
Expand Down
6 changes: 1 addition & 5 deletions Mantle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ To add Mantle to your application:
application.

If you would prefer to use [CocoaPods](http://cocoapods.org), there are some
[Mantle podspecs](https://github.com/CocoaPods/Specs/tree/master/Mantle) that
[Mantle podspecs](https://github.com/CocoaPods/Specs/tree/master/Specs/Mantle) that
have been generously contributed by third parties.

If you’re instead developing Mantle on its own, use the `Mantle.xcworkspace` file.
Expand All @@ -505,7 +505,3 @@ Mantle is released under the MIT license. See
## More Info

Have a question? Please [open an issue](https://github.com/Mantle/Mantle/issues/new)!

Mantle also has a chat room on [Slack](https://slack.com/). If you'd like
to join, just [provide your email address](https://github.com/Mantle/Mantle/pull/357)
and we'll happily send you an invite!
Loading

0 comments on commit a824d24

Please sign in to comment.