Commit bb3d14a7 authored by Dominic Vedericho's avatar Dominic Vedericho
Browse files

Merge branch 'release/1.0.9'

parents d3182fc8 be9cf5bf
......@@ -3,7 +3,7 @@ Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "TapTalk"
s.version = "1.0.8"
s.version = "1.0.9"
s.summary = "TapTalk.io is a complete in-app chat SDK and messaging API. Its in-app chat feature give you and your user the best in-app chat experience, it provides you with UI Based implementation and code based implementation and fully customizable."
s.homepage = "https://taptalk.io"
......
No preview for this file type
......@@ -40,7 +40,7 @@ static NSString * const kAPIVersionString = @"v1";
#pragma mark - Custom Method
- (void)setBaseAPIURLString:(NSString *)urlString {
_APIBaseURL = [NSString stringWithFormat:@"%@/api", urlString];
_APIBaseURL = urlString;
}
- (NSString *)urlForType:(TAPAPIManagerType)type {
......
......@@ -124,10 +124,28 @@ NS_ASSUME_NONNULL_BEGIN
messageBody:(NSString *)messageBody
messageType:(NSInteger)messageType
messageData:(NSDictionary * _Nullable)messageData;
- (TAPProductModel *)constructTapTalkProductModelWithProductID:(NSString *)productID
productName:(NSString *)productName
productCurrency:(NSString *)productCurrency
productName:(NSString *)productName
productPrice:(NSString *)productPrice
productRating:(NSString *)productRating
productWeight:(NSString *)productWeight
productDescription:(NSString *)productDescription
productImageURL:(NSString *)productImageURL
buttonOption1Text:(NSString *)buttonOption1Text
buttonOption2Text:(NSString *)buttonOption2Text
buttonOption1Color:(NSString *)buttonOption1Color
buttonOption2Color:(NSString *)buttonOption2Color;
- (void)sendCustomMessageWithMessageModel:(TAPMessageModel *)customMessage
start:(void (^)(TAPMessageModel *message))start
success:(void (^)(TAPMessageModel *message))success
failure:(void (^)(NSError *error))failure;
- (void)sendProductMessageWithProductArray:(NSArray <TAPProductModel*> *)productArray
room:(NSString *)room
start:(void (^)(TAPMessageModel *message))start
success:(void (^)(TAPMessageModel *message))success
failure:(void (^)(NSError *error))failure;
- (void)deleteLocalMessageWithLocalID:(NSString *)localID
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure;
......
......@@ -94,6 +94,11 @@
- (void)chatManagerDidFinishSendEmitMessage:(TAPMessageModel *)message {
if ([self.blockDictionary objectForKey:message.localID]) {
NSDictionary *blockTypeDictionary = [self.blockDictionary objectForKey:message.localID];
if (blockTypeDictionary == nil || [blockTypeDictionary count] == 0) {
return;
}
void (^handler)(TAPMessageModel *) = [blockTypeDictionary objectForKey:@"successBlock"];
handler(message);
}
......@@ -111,6 +116,10 @@
CGFloat total = [totalString floatValue];
NSDictionary *blockTypeDictionary = [self.blockDictionary objectForKey:obtainedMessage.localID];
if (blockTypeDictionary == nil || [blockTypeDictionary count] == 0) {
return;
}
void (^handler)(CGFloat, CGFloat) = [blockTypeDictionary objectForKey:@"progressBlock"];
handler(progress, total);
}
......@@ -123,17 +132,28 @@
NSError *localizedError = [[TAPCoreErrorManager sharedManager] generateLocalizedError:obtainedError];
NSDictionary *blockTypeDictionary = [self.blockDictionary objectForKey:obtainedMessage.localID];
if (blockTypeDictionary == nil || [blockTypeDictionary count] == 0) {
return;
}
void (^handler)(NSError *) = [blockTypeDictionary objectForKey:@"failureBlock"];
handler(localizedError);
}
- (void)fileUploadManagerStartNotification:(NSNotification *)notification {
NSDictionary *notificationParameterDictionary = (NSDictionary *)[notification object];
if (notificationParameterDictionary == nil || [notificationParameterDictionary count] == 0) {
return;
}
TAPMessageModel *obtainedMessage = [notificationParameterDictionary objectForKey:@"message"];
}
- (void)fileUploadManagerFinishNotification:(NSNotification *)notification {
NSDictionary *notificationParameterDictionary = (NSDictionary *)[notification object];
if (notificationParameterDictionary == nil || [notificationParameterDictionary count] == 0) {
return;
}
TAPMessageModel *obtainedMessage = [notificationParameterDictionary objectForKey:@"message"];
}
......@@ -483,6 +503,34 @@
return constructedMessage;
}
- (TAPProductModel *)constructTapTalkProductModelWithProductID:(NSString *)productID
productName:(NSString *)productName
productCurrency:(NSString *)productCurrency
productPrice:(NSString *)productPrice
productRating:(NSString *)productRating
productWeight:(NSString *)productWeight
productDescription:(NSString *)productDescription
productImageURL:(NSString *)productImageURL
buttonOption1Text:(NSString *)buttonOption1Text
buttonOption2Text:(NSString *)buttonOption2Text
buttonOption1Color:(NSString *)buttonOption1Color
buttonOption2Color:(NSString *)buttonOption2Color {
TAPProductModel *product = [TAPProductModel new];
product.productDataID = productID;
product.productName = productName;
product.productCurrency = productCurrency;
product.productPrice = productPrice;
product.productRating = productRating;
product.productWeight = productWeight;
product.productDescription = productDescription;
product.productImageURL = productImageURL;
product.buttonOption1Text = buttonOption1Text;
product.buttonOption2Text = buttonOption2Text;
product.buttonOption1Color = buttonOption1Color;
product.buttonOption2Color = buttonOption2Color;
return product;
}
- (void)sendCustomMessageWithMessageModel:(TAPMessageModel *)customMessage
start:(void (^)(TAPMessageModel *message))start
success:(void (^)(TAPMessageModel *message))success
......@@ -495,6 +543,24 @@
start(customMessage);
}
- (void)sendProductMessageWithProductArray:(NSArray <TAPProductModel*> *)productArray
room:(NSString *)room
start:(void (^)(TAPMessageModel *message))start
success:(void (^)(TAPMessageModel *message))success
failure:(void (^)(NSError *error))failure {
NSMutableDictionary *dataDictionary = [NSMutableDictionary dictionary];
[dataDictionary setObject:productArray forKey:@"items"];
TAPMessageModel *constructedMessage = [self constructTapTalkMessageModelWithRoom:room messageBody:@"Product List" messageType:TAPChatMessageTypeProduct messageData:dataDictionary];
[[TAPChatManager sharedManager] sendProductMessage:constructedMessage];
void (^handlerSuccess)(TAPMessageModel *) = [success copy];
NSMutableDictionary *blockTypeDictionary = [[NSMutableDictionary alloc] init];
[blockTypeDictionary setObject:handlerSuccess forKey:@"successBlock"];
[self.blockDictionary setObject:blockTypeDictionary forKey:constructedMessage.localID];
start(constructedMessage);
}
- (void)deleteLocalMessageWithLocalID:(NSString *)localID
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure {
......
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger.png

615 Bytes | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger.png

282 Bytes | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger.png
  • 2-up
  • Swipe
  • Onion skin
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@2x.png

1.19 KB | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@2x.png

374 Bytes | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@2x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@2x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@2x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@2x.png
  • 2-up
  • Swipe
  • Onion skin
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@3x.png

1.64 KB | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@3x.png

541 Bytes | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@3x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@3x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@3x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconHamburger.imageset/TAPIconHamburger@3x.png
  • 2-up
  • Swipe
  • Onion skin
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard.png

902 Bytes | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard.png

518 Bytes | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard.png
  • 2-up
  • Swipe
  • Onion skin
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@2x.png

1.68 KB | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@2x.png

892 Bytes | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@2x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@2x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@2x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@2x.png
  • 2-up
  • Swipe
  • Onion skin
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@3x.png

2.02 KB | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@3x.png

1.12 KB | W: 0px | H: 0px

TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@3x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@3x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@3x.png
TapTalk/Supporting Files/Assets.xcassets/Assets/TAPIconKeyboard.imageset/TAPIconKeyboard@3x.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -39,6 +39,28 @@ NS_ASSUME_NONNULL_BEGIN
@param userInfo (NSDictionary *) other data or details of custom quote
*/
- (void)tapTalkMessageQuoteTappedWithUserInfo:(NSDictionary *)userInfo;
//Product List Bubble Cell
/**
Called when user click product bubble cell left option or single option button
@param product (TAPProductModel *) selected product data
@param room (TAPRoomModel *) selected room when user click the product
@param recipient (TAPUserModel *) recipient user data
@param isSingleOption (BOOL) indicating whether the option is single or double
*/
- (void)tapTalkProductListBubbleLeftOrSingleButtonTapped:(TAPProductModel *)product room:(TAPRoomModel *)room recipient:(TAPUserModel *)recipient isSingleOption:(BOOL)isSingleOption;
/**
Called when user click product bubble cell right option
@param product (TAPProductModel *) selected product data
@param room (TAPRoomModel *) selected room when user click the product
@param recipient (TAPUserModel *) recipient user data
@param isSingleOption (BOOL) indicating whether the option is single or double
*/
- (void)tapTalkProductListBubbleRightButtonTapped:(TAPProductModel *)product room:(TAPRoomModel *)room recipient:(TAPUserModel *)recipient isSingleOption:(BOOL)isSingleOption;
@end
@interface TapUI : NSObject
......
......@@ -3276,10 +3276,10 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
TAPProductModel *product = [TAPDataManager productModelFromDictionary:productDictionary];
TAPRoomModel *room = [TAPChatManager sharedManager].activeRoom;
// id<TapUIDelegate> tapUIDelegate = [TapUI sharedInstance].delegate;
// if ([tapUIDelegate respondsToSelector:@selector(tapTalkProductListBubbleLeftButtonTapped:room:recipient:isSingleOption:)]) {
// [tapUIDelegate tapTalkProductListBubbleLeftButtonTapped:product room:room recipient:otherUser isSingleOption:isSingleOption];
// }
id<TapUIDelegate> tapUIDelegate = [TapUI sharedInstance].delegate;
if ([tapUIDelegate respondsToSelector:@selector(tapTalkProductListBubbleLeftOrSingleButtonTapped:room:recipient:isSingleOption:)]) {
[tapUIDelegate tapTalkProductListBubbleLeftOrSingleButtonTapped:product room:room recipient:otherUser isSingleOption:isSingleOption];
}
}
- (void)productListBubbleDidTappedRightOptionWithData:(NSDictionary *)productDictionary isSingleOptionView:(BOOL)isSingleOption {
......@@ -3290,10 +3290,10 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
TAPProductModel *product = [TAPDataManager productModelFromDictionary:productDictionary];
TAPRoomModel *room = [TAPChatManager sharedManager].activeRoom;
// id<TapUIDelegate> tapUIDelegate = [TapUI sharedInstance].delegate;
// if ([tapUIDelegate respondsToSelector:@selector(tapTalkProductListBubbleRightButtonTapped:room:recipient:isSingleOption:)]) {
// [tapUIDelegate tapTalkProductListBubbleRightButtonTapped:product room:room recipient:otherUser isSingleOption:isSingleOption];
// }
id<TapUIDelegate> tapUIDelegate = [TapUI sharedInstance].delegate;
if ([tapUIDelegate respondsToSelector:@selector(tapTalkProductListBubbleRightButtonTapped:room:recipient:isSingleOption:)]) {
[tapUIDelegate tapTalkProductListBubbleRightButtonTapped:product room:room recipient:otherUser isSingleOption:isSingleOption];
}
}
#pragma mark TAPGrowingTextView
......@@ -3710,7 +3710,7 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
- (void)setupInputAccessoryView {
//Input Accessory Extension View
self.keyboardOptionButtonView.layer.cornerRadius = CGRectGetHeight(self.sendButtonView.frame) / 2.0f;
self.keyboardOptionButtonView.layer.cornerRadius = CGRectGetHeight(self.keyboardOptionButtonView.frame) / 2.0f;
self.keyboardOptionButtonView.clipsToBounds = YES;
self.sendButtonView.layer.cornerRadius = CGRectGetHeight(self.sendButtonView.frame) / 2.0f;
......@@ -4702,7 +4702,6 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
actionWithTitle:@"Cancel"
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
//Do some thing here
[self showInputAccessoryView];
[self checkKeyboard];
}];
......@@ -4778,7 +4777,6 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
actionWithTitle:@"Cancel"
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
//Do some thing here
[self showInputAccessoryView];
[self checkKeyboard];
}];
......@@ -5533,7 +5531,9 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
}
#ifdef DEBUG
//Note - this alert only shown at debug
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Failed", @"") message:error.domain preferredStyle:UIAlertControllerStyleAlert];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Failed", @"") message:errorMessage preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
}];
......@@ -5903,7 +5903,9 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
_isFirstLoadData = NO;
#ifdef DEBUG
//Note - this alert only shown at debug
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Failed", @"") message:error.domain preferredStyle:UIAlertControllerStyleAlert];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Failed", @"") message:errorMessage preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
}];
......@@ -6464,8 +6466,7 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
}
- (void)setKeyboardStateDefault {
_keyboardState = keyboardStateDefault;
_keyboardState = keyboardStateDefault;
self.keyboardOptionButtonView.backgroundColor = [[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconChatComposerBurgerMenuBackground];
UIImage *hamburgerIconImage = [UIImage imageNamed:@"TAPIconHamburger" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
self.keyboardOptionButtonImageView.image = [self.keyboardOptionButtonImageView.image setImageTintColor:[[TAPStyleManager sharedManager] getComponentColorForType:TAPComponentColorIconChatComposerBurgerMenu]];
......@@ -7794,7 +7795,9 @@ typedef NS_ENUM(NSInteger, TopFloatingIndicatorViewType) {
} failure:^(NSError *error) {
[self setDeleteRoomButtonAsLoading:NO animated:YES];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Delete Group Manually" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Delete Group Manually" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
......
......@@ -386,7 +386,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
} failureBlock:^(NSError *error) {
self.createGroupSubjectView.createButtonView.userInteractionEnabled = YES;
[self.createGroupSubjectView.createButtonView setAsLoading:NO animated:YES];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Upload Group Image" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Upload Group Image" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
else {
......@@ -406,7 +408,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
} failure:^(NSError *error) {
[self.createGroupSubjectView.createButtonView setAsLoading:NO animated:YES];
self.createGroupSubjectView.createButtonView.userInteractionEnabled = YES;
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Create Group" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Create Group" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
else if (self.tapCreateGroupSubjectControllerType == TAPCreateGroupSubjectViewControllerTypeUpdate) {
......@@ -443,7 +447,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
} failureBlock:^(NSError *error) {
self.createGroupSubjectView.createButtonView.userInteractionEnabled = YES;
[self.createGroupSubjectView.createButtonView setAsLoading:NO animated:YES];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Upload Group Image" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Upload Group Image" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
else {
......@@ -490,7 +496,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
} failureBlock:^(NSError *error) {
self.createGroupSubjectView.createButtonView.userInteractionEnabled = YES;
[self.createGroupSubjectView.createButtonView setAsLoading:NO animated:YES];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Upload Group Image" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Upload Group Image" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
else {
......@@ -517,7 +525,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
} failure:^(NSError *error) {
[self.createGroupSubjectView.createButtonView setAsLoading:NO animated:YES];
self.createGroupSubjectView.createButtonView.userInteractionEnabled = YES;
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Update Group" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Update Group" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
}
......
......@@ -119,7 +119,9 @@
} failure:^(NSError *error) {
[self.createGroupView showLoadingMembersView:NO];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Get Members" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Get Members" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
self.createGroupView.searchBarView.customPlaceHolderString = NSLocalizedString(@"Search for members", @"");
......@@ -490,7 +492,9 @@ trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath {
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Promote Admin" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Promote Admin" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}];
promoteAdminAction.image = [UIImage imageNamed:@"TAPSwipeActionPromote" inBundle:[TAPUtil currentBundle] compatibleWithTraitCollection:nil];
......@@ -1043,7 +1047,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
[self.createGroupView showBottomActionButtonViewExtension:NO withActiveButton:0];
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Demote Admin" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Demote Admin" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
else if ([popupIdentifier isEqualToString:@"Remove Member"]) {
......@@ -1058,7 +1064,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
[self showFinishLoadingStateWithType:TAPCreateGroupLoadingTypeRemoveMember];
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Remove Member" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Remove Member" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
else if ([popupIdentifier isEqualToString:@"Remove Members"]) {
......@@ -1076,7 +1084,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
[self showFinishLoadingStateWithType:TAPCreateGroupLoadingTypeRemoveMember];
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Remove Members" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Remove Members" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
}
......@@ -1163,7 +1173,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
self.createGroupView.searchBarView.userInteractionEnabled = YES;
self.createGroupView.contactsTableView.userInteractionEnabled = YES;
self.createGroupView.searchResultTableView.userInteractionEnabled = YES;
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Add Members" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Add Members" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
}
......@@ -1299,7 +1311,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
[self.createGroupView showBottomActionButtonViewExtension:NO withActiveButton:0];
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Promote Admin" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Promote Admin" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
......
......@@ -251,6 +251,11 @@
}
}
}
else {
if (message.room.type == RoomTypeGroup) {
messageString = [NSString stringWithFormat:@"%@: %@",message.user.fullname, messageString];
}
}
if (self.messageShownCounter % 2 == 1) {
//Odd message, show first notification view
......
......@@ -378,7 +378,9 @@
[self.myAccountView.usernameTextField setErrorInfoText:@"Unable to verify username, please check your connection and try again"];
}
else {
[self.myAccountView.usernameTextField setErrorInfoText:error.domain];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self.myAccountView.usernameTextField setErrorInfoText:errorMessage];
}
[self.myAccountView refreshViewPosition];
......
......@@ -659,7 +659,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Promote Admin" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Promote Admin" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
......@@ -924,7 +926,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Demote Admin" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Demote Admin" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
else if ([popupIdentifier isEqualToString:@"Remove Member"]) {
......@@ -946,7 +950,9 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Remove Member" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Remove Member" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
......@@ -974,11 +980,15 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Leave Group" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Leave Group" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Leave Group" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Leave Group" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
else if ([popupIdentifier isEqualToString:@"Delete Group"]) {
......@@ -1006,12 +1016,16 @@ minimumLineSpacingForSectionAtIndex:(NSInteger)section {
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Leave Group" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Leave Group" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
} failure:^(NSError *error) {
[self removeLoadingView];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Delete Group" title:NSLocalizedString(@"Failed", @"") detailInformation:error.domain leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Delete Group" title:NSLocalizedString(@"Failed", @"") detailInformation:errorMessage leftOptionButtonTitle:nil singleOrRightOptionButtonTitle:nil];
}];
}
}
......
......@@ -237,7 +237,9 @@
// }
//END DV Temp
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Failed", @"") message:error.domain preferredStyle:UIAlertControllerStyleAlert];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Failed", @"") message:errorMessage preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
}];
......@@ -247,7 +249,9 @@
}];
} failure:^(NSError *error) {
[self.registerView.continueButtonView setAsLoading:NO animated:YES];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Register" title:NSLocalizedString(@"Error", @"") detailInformation:error.domain leftOptionButtonTitle:@"" singleOrRightOptionButtonTitle:@""];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self showPopupViewWithPopupType:TAPPopUpInfoViewControllerTypeErrorMessage popupIdentifier:@"Error Register" title:NSLocalizedString(@"Error", @"") detailInformation:errorMessage leftOptionButtonTitle:@"" singleOrRightOptionButtonTitle:@""];
[self.registerView setContentEditable:YES];
}];
}
......@@ -396,7 +400,9 @@
[self.registerView.usernameTextField setErrorInfoText:@"Unable to verify username, please check your connection and try again"];
}
else {
[self.registerView.usernameTextField setErrorInfoText:error.domain];
NSString *errorMessage = [error.userInfo objectForKey:@"message"];
errorMessage = [TAPUtil nullToEmptyString:errorMessage];
[self.registerView.usernameTextField setErrorInfoText:errorMessage];
}
[self.registerView refreshViewPosition];
......
......@@ -778,7 +778,6 @@
//Handle room deletion
NSArray *loopedRoomListArray = [NSArray arrayWithArray:oldRoomListArray];
for (NSInteger index = 0; index < [loopedRoomListArray count]; index++) {
TAPRoomListModel *oldRoomList = [oldRoomListArray objectAtIndex:index];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment