Fixes #713
This commit is contained in:
parent
fa1791a4d7
commit
82a9029c37
2
Podfile
2
Podfile
|
@ -18,6 +18,6 @@ pod 'SSKeychain'
|
|||
pod 'DJWActionSheet'
|
||||
|
||||
pod 'SocketRocket', :git => 'https://github.com/FredericJacobs/SocketRocket.git', :commit => '73d8a19'
|
||||
pod 'JSQMessagesViewController', :git => 'https://github.com/WhisperSystems/JSQMessagesViewController', :branch => 'JSignalQ'
|
||||
pod 'JSQMessagesViewController', :git => 'https://github.com/WhisperSystems/JSQMessagesViewController', :commit => '9be8f6ed65eb55368a5ff767f055158cf585065f'
|
||||
pod 'APDropDownNavToolbar', :git => 'https://github.com/corbett/APDropDownNavToolbar.git', :branch => 'master'
|
||||
pod 'UICKeyChainStore', :podspec => 'Podspecs/UICKeyChainStore.podspec'
|
||||
|
|
10
Podfile.lock
10
Podfile.lock
|
@ -34,7 +34,7 @@ PODS:
|
|||
- DJWActionSheet (1.0.4)
|
||||
- FFCircularProgressView (0.5)
|
||||
- HKDFKit (0.0.3)
|
||||
- JSQMessagesViewController (6.1.3):
|
||||
- JSQMessagesViewController (7.0.0):
|
||||
- JSQSystemSoundPlayer (~> 2.0.1)
|
||||
- JSQSystemSoundPlayer (2.0.1)
|
||||
- libPhoneNumber-iOS (0.8.4)
|
||||
|
@ -67,7 +67,7 @@ DEPENDENCIES:
|
|||
- AxolotlKit (~> 0.6.2)
|
||||
- DJWActionSheet
|
||||
- FFCircularProgressView (>= 0.1)
|
||||
- JSQMessagesViewController (from `https://github.com/WhisperSystems/JSQMessagesViewController`, branch `JSignalQ`)
|
||||
- JSQMessagesViewController (from `https://github.com/WhisperSystems/JSQMessagesViewController`, commit `9be8f6ed65eb55368a5ff767f055158cf585065f`)
|
||||
- libPhoneNumber-iOS (~> 0.8.2)
|
||||
- Mantle (~> 1.5)
|
||||
- OpenSSL (~> 1.0.201)
|
||||
|
@ -84,7 +84,7 @@ EXTERNAL SOURCES:
|
|||
:branch: master
|
||||
:git: https://github.com/corbett/APDropDownNavToolbar.git
|
||||
JSQMessagesViewController:
|
||||
:branch: JSignalQ
|
||||
:commit: 9be8f6ed65eb55368a5ff767f055158cf585065f
|
||||
:git: https://github.com/WhisperSystems/JSQMessagesViewController
|
||||
SocketRocket:
|
||||
:commit: 73d8a19
|
||||
|
@ -97,7 +97,7 @@ CHECKOUT OPTIONS:
|
|||
:commit: 98a606b343c0ccc6cca1cd243b296325716f21e7
|
||||
:git: https://github.com/corbett/APDropDownNavToolbar.git
|
||||
JSQMessagesViewController:
|
||||
:commit: bfb0c58785b33fa30ac3c88ef38477e49a674912
|
||||
:commit: 9be8f6ed65eb55368a5ff767f055158cf585065f
|
||||
:git: https://github.com/WhisperSystems/JSQMessagesViewController
|
||||
SocketRocket:
|
||||
:commit: 73d8a19
|
||||
|
@ -112,7 +112,7 @@ SPEC CHECKSUMS:
|
|||
DJWActionSheet: d88b302d7c29523e1e9fb9b62cfac46f59bb90d9
|
||||
FFCircularProgressView: 723b7a84c412b5d9d2a5531bc716b99965ad7192
|
||||
HKDFKit: 5998cf1bbb611e7ecc6bd3eaaef8c7a7da7be949
|
||||
JSQMessagesViewController: 4cc4ff3b26599e8743166b7e8e908528c8f01a80
|
||||
JSQMessagesViewController: 5e6beff1d5aeeea71c45cec4057b9c2c22c0aebd
|
||||
JSQSystemSoundPlayer: 55528c699a283aae2220d3ae7b8b527d2ecef4b4
|
||||
libPhoneNumber-iOS: dbfc7b4128510a4955df3e5a6f125393fc9ebc2f
|
||||
Mantle: d5fbaf30fbc58031223af13812c060e15934a1fe
|
||||
|
|
2
Pods
2
Pods
|
@ -1 +1 @@
|
|||
Subproject commit fd73394e70509ee4e86e3ae1677c44e4fed5cbc5
|
||||
Subproject commit 58eb38b760ad0c3af9daf2f497c07bf8a8683bc5
|
|
@ -3590,6 +3590,7 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
|
@ -3644,6 +3645,7 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
|
|
|
@ -37,15 +37,15 @@
|
|||
- (NSString *)description{
|
||||
switch (_messageType) {
|
||||
case TSInfoMessageTypeSessionDidEnd:
|
||||
return @"Secure session was reset.";
|
||||
return NSLocalizedString(@"SECURE_SESSION_RESET", nil);
|
||||
case TSInfoMessageTypeUnsupportedMessage:
|
||||
return @"Received unsupported attachment type.";
|
||||
return NSLocalizedString(@"UNSUPPORTED_ATTACHMENT", nil);
|
||||
case TSInfoMessageUserNotRegistered:
|
||||
return @"The user is not registered.";
|
||||
return NSLocalizedString(@"CONTACT_DETAIL_COMM_TYPE_INSECURE", nil);
|
||||
case TSInfoMessageTypeGroupQuit:
|
||||
return @"You have left the group.";
|
||||
return NSLocalizedString(@"GROUP_YOU_LEFT", nil);
|
||||
case TSInfoMessageTypeGroupUpdate:
|
||||
return _customMessage != nil ? _customMessage : @"Updated the group";
|
||||
return _customMessage != nil ? _customMessage : NSLocalizedString(@"GROUP_UPDATED", nil);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -302,6 +302,7 @@ typedef enum : NSUInteger {
|
|||
[groupUpdateButton setAttributedTitle:updateTitle forState:UIControlStateNormal];
|
||||
[groupUpdateButton addTarget:self action:@selector(updateGroup) forControlEvents:UIControlEventTouchUpInside];
|
||||
[groupUpdateButton.titleLabel setTextAlignment:NSTextAlignmentCenter];
|
||||
[groupUpdateButton.titleLabel setAdjustsFontSizeToFitWidth:YES];
|
||||
|
||||
UIBarButtonItem *groupUpdateBarButton = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:nil];
|
||||
groupUpdateBarButton.customView = groupUpdateButton;
|
||||
|
@ -316,6 +317,7 @@ typedef enum : NSUInteger {
|
|||
UIBarButtonItem *groupLeaveBarButton = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:nil];
|
||||
groupLeaveBarButton.customView = groupLeaveButton;
|
||||
groupLeaveBarButton.customView.userInteractionEnabled = YES;
|
||||
[groupLeaveButton.titleLabel setAdjustsFontSizeToFitWidth:YES];
|
||||
|
||||
UIButton* groupMembersButton = [[UIButton alloc] initWithFrame:CGRectMake(0,0,65,24)];
|
||||
NSMutableAttributedString *membersTitle = [[NSMutableAttributedString alloc] initWithString:NSLocalizedString(@"MEMBERS_BUTTON_TITLE", @"")];
|
||||
|
@ -326,6 +328,7 @@ typedef enum : NSUInteger {
|
|||
UIBarButtonItem *groupMembersBarButton = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:nil];
|
||||
groupMembersBarButton.customView = groupMembersButton;
|
||||
groupMembersBarButton.customView.userInteractionEnabled = YES;
|
||||
[groupMembersButton.titleLabel setAdjustsFontSizeToFitWidth:YES];
|
||||
|
||||
|
||||
self.navController.dropDownToolbar.items =@[spaceEdge, groupUpdateBarButton, spaceMiddleWords, groupLeaveBarButton, spaceMiddleWords, groupMembersBarButton, spaceEdge];
|
||||
|
|
|
@ -62,11 +62,11 @@
|
|||
@implementation TSMessageAdapter
|
||||
|
||||
+ (id<JSQMessageData>)messageViewDataWithInteraction:(TSInteraction*)interaction inThread:(TSThread*)thread{
|
||||
|
||||
|
||||
TSMessageAdapter *adapter = [[TSMessageAdapter alloc] init];
|
||||
adapter.messageDate = interaction.date;
|
||||
adapter.identifier = (NSUInteger)interaction.uniqueId;
|
||||
|
||||
|
||||
if ([thread isKindOfClass:[TSContactThread class]]) {
|
||||
adapter.thread = (TSContactThread*)thread;
|
||||
if ([interaction isKindOfClass:[TSIncomingMessage class]]) {
|
||||
|
@ -100,7 +100,7 @@
|
|||
|
||||
for (NSString *attachmentID in message.attachments) {
|
||||
TSAttachment *attachment = [TSAttachment fetchObjectWithUniqueID:attachmentID];
|
||||
|
||||
|
||||
if ([attachment isKindOfClass:[TSAttachmentStream class]]) {
|
||||
TSAttachmentStream *stream = (TSAttachmentStream*)attachment;
|
||||
if ([stream isImage]) {
|
||||
|
@ -154,7 +154,7 @@
|
|||
else if(adapter.infoMessageType == TSInfoMessageTypeGroupUpdate) {
|
||||
status = kGroupUpdate;
|
||||
}
|
||||
JSQCall* call = [[JSQCall alloc] initWithCallerId:@"" callerDisplayName:adapter.messageBody date:nil status:status];
|
||||
JSQCall* call = [[JSQCall alloc] initWithCallerId:@"" callerDisplayName:adapter.messageBody date:nil status:status displayString:@""];
|
||||
call.useThumbnail = NO; // disables use of iconography to represent group update actions
|
||||
return call;
|
||||
}
|
||||
|
@ -174,6 +174,8 @@
|
|||
|
||||
+ (JSQCall*)jsqCallForTSCall:(TSCall*)call thread:(TSContactThread*)thread{
|
||||
CallStatus status = 0;
|
||||
NSString *name = thread.name;
|
||||
NSString *detailString = @"";
|
||||
|
||||
switch (call.callType) {
|
||||
case RPRecentCallTypeOutgoing:
|
||||
|
@ -187,7 +189,22 @@
|
|||
break;
|
||||
}
|
||||
|
||||
JSQCall *jsqCall = [[JSQCall alloc] initWithCallerId:thread.contactIdentifier callerDisplayName:thread.name date:call.date status:status];
|
||||
switch (status) {
|
||||
case kCallMissed:
|
||||
detailString = [NSString stringWithFormat:NSLocalizedString(@"MSGVIEW_MISSED_CALL", nil), name];
|
||||
case kCallIncoming:
|
||||
detailString = [NSString stringWithFormat:NSLocalizedString(@"MSGVIEW_RECEIVED_CALL", nil), name];
|
||||
case kCallOutgoing:
|
||||
detailString = [NSString stringWithFormat:NSLocalizedString(@"MSGVIEW_YOU_CALLED", nil), name];
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
JSQCall *jsqCall = [[JSQCall alloc] initWithCallerId:thread.contactIdentifier
|
||||
callerDisplayName:thread.name
|
||||
date:call.date
|
||||
status:status
|
||||
displayString:detailString];
|
||||
return jsqCall;
|
||||
}
|
||||
|
||||
|
@ -223,7 +240,7 @@
|
|||
return self.messageBody;
|
||||
}
|
||||
|
||||
- (NSUInteger)hash{
|
||||
- (NSUInteger)messageHash{
|
||||
return self.identifier;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue