diff --git a/Podfile b/Podfile index e047a14bf..cd1966712 100644 --- a/Podfile +++ b/Podfile @@ -16,6 +16,7 @@ def sharedPods pod 'Firebase/Analytics', '~> 8.0.0' pod 'Firebase/Messaging', '~> 8.0.0' pod 'Firebase/Crashlytics', '~> 8.0.0' + pod 'Firebase/RemoteConfig', '~> 8.0.0' pod 'SnapKit', '~> 4.0.0' pod 'GooglePlaces', '~> 4.2.0' pod 'TTTAttributedLabel' diff --git a/Podfile.lock b/Podfile.lock index ca18bdfca..acab24fe1 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -30,6 +30,11 @@ PODS: - Firebase/Messaging (8.0.0): - Firebase/CoreOnly - FirebaseMessaging (~> 8.0.0) + - Firebase/RemoteConfig (8.0.0): + - Firebase/CoreOnly + - FirebaseRemoteConfig (~> 8.0.0) + - FirebaseABTesting (8.8.0): + - FirebaseCore (~> 8.0) - FirebaseAnalytics (8.0.0): - FirebaseAnalytics/AdIdSupport (= 8.0.0) - FirebaseCore (~> 8.0) @@ -84,6 +89,12 @@ PODS: - GoogleUtilities/Environment (~> 7.4) - GoogleUtilities/Reachability (~> 7.4) - GoogleUtilities/UserDefaults (~> 7.4) + - FirebaseRemoteConfig (8.0.0): + - FirebaseABTesting (~> 8.0) + - FirebaseCore (~> 8.0) + - FirebaseInstallations (~> 8.0) + - GoogleUtilities/Environment (~> 7.4) + - "GoogleUtilities/NSData+zlib (~> 7.4)" - GoogleAppMeasurement (8.0.0): - GoogleAppMeasurement/AdIdSupport (= 8.0.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.4) @@ -142,6 +153,7 @@ DEPENDENCIES: - Firebase/Analytics (~> 8.0.0) - Firebase/Crashlytics (~> 8.0.0) - Firebase/Messaging (~> 8.0.0) + - Firebase/RemoteConfig (~> 8.0.0) - GooglePlaces (~> 4.2.0) - IQKeyboardManager (~> 6.5) - kingpin (= 0.3.1) @@ -156,12 +168,14 @@ SPEC REPOS: - AWSCore - AWSS3 - Firebase + - FirebaseABTesting - FirebaseAnalytics - FirebaseCore - FirebaseCoreDiagnostics - FirebaseCrashlytics - FirebaseInstallations - FirebaseMessaging + - FirebaseRemoteConfig - GoogleAppMeasurement - GoogleDataTransport - GoogleMaps @@ -181,12 +195,14 @@ SPEC CHECKSUMS: AWSCore: 55c154ae27efc5c98bdc30a0eeea5a35d10a2ab5 AWSS3: 2272253b098d07803af8dd20ce6ce7302bcffb47 Firebase: 73c3e3b216ec1ecbc54d2ffdd4670c65c749edb1 + FirebaseABTesting: 981336dd14d84787e33466e4247f77ec2343f8d9 FirebaseAnalytics: dcb92c7c9ef4fa7ffac276e8f87bd4fc8c97f1b8 FirebaseCore: 3f09591d51292843e2a46f18358d60bf4e996255 FirebaseCoreDiagnostics: a31d987ba0fe16d59886a5dbadc2f1de871f88c8 FirebaseCrashlytics: 69cddb6bfa7656c5346e603bc85b029392252ee6 FirebaseInstallations: c4aab1005d6547b00a7529777fe52f5d4d45165b FirebaseMessaging: 1a33b4af3c8042ed6ddacb6c031894af2064bfab + FirebaseRemoteConfig: 055f6b5ba1751547596ded5032c4d5c6054ca501 GoogleAppMeasurement: c6bbc9753d046b5456dd4f940057fbad2c28419e GoogleDataTransport: 11e3a5f2c190327df1a4a5d7e7ae3d4d5b9c9e4c GoogleMaps: eb03e327edfd70b06de1e6e321653f73712df7ad @@ -201,6 +217,6 @@ SPEC CHECKSUMS: SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 TTTAttributedLabel: 8cffe8e127e4e82ff3af1e5386d4cd0ad000b656 -PODFILE CHECKSUM: a5bfdb803a8493719dc693c14e83e0feab207a69 +PODFILE CHECKSUM: e1e3407446476639377a5dedc009a2b48fbc77d1 -COCOAPODS: 1.10.1 +COCOAPODS: 1.11.2 diff --git a/Shared/Cells Xib/CellHomeExpertActionA.xib b/Shared/Cells Xib/CellHomeExpertActionA.xib new file mode 100644 index 000000000..aacce6d48 --- /dev/null +++ b/Shared/Cells Xib/CellHomeExpertActionA.xib @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Shared/Cells Xib/CellHomeExpertActionB.xib b/Shared/Cells Xib/CellHomeExpertActionB.xib new file mode 100644 index 000000000..d3dad5211 --- /dev/null +++ b/Shared/Cells Xib/CellHomeExpertActionB.xib @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Shared/Cells Xib/CellHomeExpertEventA.xib b/Shared/Cells Xib/CellHomeExpertEventA.xib new file mode 100644 index 000000000..22039818a --- /dev/null +++ b/Shared/Cells Xib/CellHomeExpertEventA.xib @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Shared/Cells Xib/CellHomeExpertEventB.xib b/Shared/Cells Xib/CellHomeExpertEventB.xib new file mode 100644 index 000000000..dfe69d0d0 --- /dev/null +++ b/Shared/Cells Xib/CellHomeExpertEventB.xib @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Shared/Classes/Controller/ActiveFeedItem/OTInviteSourceViewController.m b/Shared/Classes/Controller/ActiveFeedItem/OTInviteSourceViewController.m index 8fa9b3e29..08df59049 100644 --- a/Shared/Classes/Controller/ActiveFeedItem/OTInviteSourceViewController.m +++ b/Shared/Classes/Controller/ActiveFeedItem/OTInviteSourceViewController.m @@ -14,7 +14,19 @@ @implementation OTInviteSourceViewController - (void)viewDidLoad { [super viewDidLoad]; - [self updateUIElements]; + // [self updateUIElements]; + [self setupViews]; + [OTLogger logEvent:Show_Pop_Share]; +} + +-(void) setupViews { + self.inviteSubtitleLabel.text = [OTAppAppearance inviteSubtitleText:self.feedItem]; + + for (UIButton *button in self.buttons) { + button.layer.cornerRadius = 5; + button.layer.borderWidth = 1; + button.layer.borderColor = [[UIColor appOrangeColor] CGColor]; + } } - (void)updateUIElements { @@ -55,11 +67,15 @@ - (IBAction)inviteByPhone:(id)sender { } - (IBAction)action_share:(id)sender { + [OTLogger logEvent:Action_Pop_Share_Link]; + if(self.delegate) [self.delegate share]; } - (IBAction)action_share_entourage:(id)sender { + [OTLogger logEvent:Action_Pop_Share_Entourage]; + if(self.delegate) { [self.delegate shareEntourage]; [self dismissViewControllerAnimated:NO completion:nil]; diff --git a/Shared/Classes/Controller/EntourageEditor/OTEntourageEditorViewController.m b/Shared/Classes/Controller/EntourageEditor/OTEntourageEditorViewController.m index 88ef27cc1..fd8314c56 100644 --- a/Shared/Classes/Controller/EntourageEditor/OTEntourageEditorViewController.m +++ b/Shared/Classes/Controller/EntourageEditor/OTEntourageEditorViewController.m @@ -315,11 +315,10 @@ - (void)createEntourage:(UIButton *)sender completion:(void(^)(void))completion [SVProgressHUD show]; [[OTEncounterService new] sendEntourage:self.editTableSource.entourage withSuccess:^(OTEntourage *sentEntourage) { - self.entourage = sentEntourage; - [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationEntourageCreated object:nil]; - [SVProgressHUD showSuccessWithStatus:OTLocalizedString(@"entourageCreated")]; - - + self.entourage = sentEntourage; + [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationEntourageCreated object:nil]; + [SVProgressHUD dismiss]; + // [SVProgressHUD showSuccessWithStatus:OTLocalizedString(@"entourageCreated")]; if (self.isFromHomeNeo) { NSString * tag = [NSString stringWithFormat:Action_NeoFeedAct_Send_X,self.tagNameAnalytic]; @@ -328,23 +327,22 @@ - (void)createEntourage:(UIButton *)sender completion:(void(^)(void))completion else { [OTLogger logEvent:@"CreateEntourageSuccess"]; } - - dispatch_async(dispatch_get_main_queue(), ^{ - - if ([self.entourageEditorDelegate respondsToSelector:@selector(didEditEntourage:)]) { - [self.entourageEditorDelegate performSelector:@selector(didEditEntourage:) withObject:sentEntourage]; - if (completion) { - completion(); - } - } - }); - } failure:^(NSError *error) { - [SVProgressHUD showErrorWithStatus:OTLocalizedString(@"entourageNotCreated")]; - sender.enabled = YES; - if (completion) { - completion(); - } - }]; + + dispatch_async(dispatch_get_main_queue(), ^{ + if ([self.entourageEditorDelegate respondsToSelector:@selector(didEditEntourage:)]) { + [self.entourageEditorDelegate performSelector:@selector(didEditEntourage:) withObject:sentEntourage]; + if (completion) { + completion(); + } + } + }); + } failure:^(NSError *error) { + [SVProgressHUD showErrorWithStatus:OTLocalizedString(@"entourageNotCreated")]; + sender.enabled = YES; + if (completion) { + completion(); + } + }]; } - (void)updateEntourage:(UIButton *)sender completion:(void(^)(void))completion { diff --git a/Shared/Classes/Controller/FeedChangeOptions/OTChangeStateViewController.m b/Shared/Classes/Controller/FeedChangeOptions/OTChangeStateViewController.m index c0c7f7ca2..c920814c6 100644 --- a/Shared/Classes/Controller/FeedChangeOptions/OTChangeStateViewController.m +++ b/Shared/Classes/Controller/FeedChangeOptions/OTChangeStateViewController.m @@ -109,7 +109,7 @@ - (IBAction)close:(id)sender { } - (IBAction)edit:(id)sender { - [OTLogger logEvent:@"EditEntourageConfirm"]; + [OTLogger logEvent:Show_Modify_Entourage]; [self prepareForClosing]; [self dismissViewControllerAnimated:NO completion:^{ diff --git a/Shared/Classes/Controller/Home/OTHomeCollectionViewCells.swift b/Shared/Classes/Controller/Home/OTHomeCollectionViewCells.swift index ec6fc7d52..b4f4a77c2 100644 --- a/Shared/Classes/Controller/Home/OTHomeCollectionViewCells.swift +++ b/Shared/Classes/Controller/Home/OTHomeCollectionViewCells.swift @@ -18,7 +18,7 @@ class OTHomeCollectionViewCell: UICollectionViewCell { @IBOutlet weak var ui_title_location: UILabel! @IBOutlet weak var ui_picto_location: UIImageView! - @IBOutlet weak var ui_info_action_by: UILabel! + @IBOutlet weak var ui_info_action_by: UILabel? @IBOutlet weak var ui_button_profile: UIButton! @IBOutlet weak var ui_picto_check_profile: UIImageView! @IBOutlet weak var ui_title_profile: UILabel! @@ -44,7 +44,7 @@ class OTHomeCollectionViewCell: UICollectionViewCell { ui_title_action.text = OTLocalisationService.getLocalizedValue(forKey: item.groupType) ui_title_action.textColor = UIColor.appOrange() ui_info_show_more?.text = OTLocalisationService.getLocalizedValue(forKey: "show_more_event") - ui_info_action_by.text = OTLocalisationService.getLocalizedValue(forKey: "home_event_info_user") + ui_info_action_by?.text = OTLocalisationService.getLocalizedValue(forKey: "home_event_info_user") } else { ui_title_action.text = OTLocalisationService.getLocalizedValue(forKey: item.entourage_type) @@ -52,11 +52,11 @@ class OTHomeCollectionViewCell: UICollectionViewCell { if item.entourage_type == "contribution" { ui_title_action.textColor = UIColor.appBlue() - ui_info_action_by.text = OTLocalisationService.getLocalizedValue(forKey: "home_action_contrib_info_user") + ui_info_action_by?.text = OTLocalisationService.getLocalizedValue(forKey: "home_action_contrib_info_user") } else { ui_title_action.textColor = UIColor.appOrange() - ui_info_action_by.text = OTLocalisationService.getLocalizedValue(forKey: "home_action_info_user") + ui_info_action_by?.text = OTLocalisationService.getLocalizedValue(forKey: "home_action_info_user") } } @@ -113,6 +113,77 @@ class OTHomeCollectionViewCell: UICollectionViewCell { } } + func updateCellVariant(item:OTEntourage,delegate:CellClickDelegate?) { + self.delegate = delegate + self.item = item + + let cat = getCat(type: item.type, category: item.category) + + ui_title_action.text = cat.title_list + ui_info_show_more?.text = OTLocalisationService.getLocalizedValue(forKey: "show_more") + + ui_title_description.text = item.title + ui_title_profile.text = item.author.displayName + + //Picto + if let pictoStr = OTAppAppearance.iconName(forEntourageItem: item, isAnnotation: false) { + ui_picto_action.image = UIImage.init(named: pictoStr) + } + + let distance = HomeCellUtils.getDistance(item: item) + var distanceStr = "" + + if distance < 1000000 { + distanceStr = HomeCellUtils.formattedItemDistance(distance: distance) + if distanceStr.count > 0 { + distanceStr = String.init(format: "%@ - ", distanceStr) + } + } + if item.postalCode.count == 0 && distanceStr.count == 0 { + distanceStr = " " + } + ui_title_location.text = String.init(format: "%@%@", distanceStr,item.postalCode) + + + if OTAppConfiguration.shouldShowCreatorImagesForNewsFeedItems() { + ui_button_profile.setupAsProfilePicture(fromUrl: item.author.avatarUrl) + ui_button_profile.isHidden = false + + if item.author.partner == nil { + ui_picto_check_profile.isHidden = true + } + else { + ui_picto_check_profile.isHidden = false + ui_picto_check_profile.setup(fromUrl: item.author.partner.smallLogoUrl, withPlaceholder: "badgeDefault") + } + } + else { + ui_button_profile.isHidden = true + ui_picto_check_profile.isHidden = true + } + } + + func getCat(type:String,category:String) -> OTCategory { + var cat = OTCategory.init() + if let _array = OTCategoryFromJsonService.getData() as? [OTCategoryType] { + + for item in _array { + if item.type == type { + for _item2 in item.categories { + if let _cat = _item2 as? OTCategory { + if _cat.category == category { + cat = _cat + break + } + } + } + break + } + } + } + return cat + } + @IBAction func action_show_profile(_ sender: UIButton) { self.delegate?.showDetailUser(userId: item.author.uID) } @@ -130,19 +201,21 @@ class OTHomeEventCollectionViewCell: UICollectionViewCell { @IBOutlet weak var ui_picto_location: UIImageView! @IBOutlet weak var ui_title_nb_people: UILabel! - @IBOutlet weak var ui_info_show_more: UILabel! + @IBOutlet weak var ui_info_show_more: UILabel? override func awakeFromNib() { super.awakeFromNib() self.contentView.layer.cornerRadius = 8.0 self.contentView.layer.masksToBounds = true + + ui_info_show_more?.text = OTLocalisationService.getLocalizedValue(forKey: "show_more") } func updateCell(item:OTEntourage) { ui_title_description.text = item.title - ui_title_event_date.text = HomeCellUtils.formatEventDate(item: item) + ui_title_event_date.text = HomeCellUtils.formatEventDate(item: item).uppercased() if item.isOnline.boolValue { ui_title_location.text = OTLocalisationService.getLocalizedValue(forKey: "info_feed_item_event_online") @@ -171,8 +244,8 @@ class OTHomeEventCollectionViewCell: UICollectionViewCell { ui_title_nb_people?.text = "\(nbPeople) \(OTLocalisationService.getLocalizedValue(forKey: "participants")!)" } - if let url = item.entourage_event_url_image_portrait { - ui_image_event.setup(fromUrl: url, withPlaceholder: "ic_placeholder_event_feed") + if let url = item.entourage_event_url_image_landscape { + ui_image_event.setup(fromUrl: url, withPlaceholder: "ic_placeholder_event_horizontal") } } } @@ -237,7 +310,7 @@ class OTHomeCellOther: UICollectionViewCell { self.isShowZone = isShowZone self.ui_image_bottom?.isHidden = true self.ui_image?.isHidden = false - self.contentView.backgroundColor = UIColor.clear + self.contentView.backgroundColor = UIColor.appOrange() } func populateCell(title:String,buttonMoreTxt:String) { ui_title.text = title diff --git a/Shared/Classes/Controller/Home/OTHomeExpertViewController.swift b/Shared/Classes/Controller/Home/OTHomeExpertViewController.swift index bd10c4a60..db41f61e7 100644 --- a/Shared/Classes/Controller/Home/OTHomeExpertViewController.swift +++ b/Shared/Classes/Controller/Home/OTHomeExpertViewController.swift @@ -7,12 +7,26 @@ // import UIKit +import FirebaseRemoteConfig +import AVFoundation + +enum VariantCell { + case Original + case VariantA + case VariantB +} + class OTHomeExpertViewController: UIViewController { let CELL_HEADLINES_HEIGHT:CGFloat = 330 - let CELL_EVENTS_HEIGHT:CGFloat = 280 - let CELL_ACTIONS_HEIGHT:CGFloat = 298 + let CELL_EVENTS_HEIGHT_ORIGINAL:CGFloat = 280 + let CELL_EVENTS_HEIGHT_VARIANT_A:CGFloat = 320 + let CELL_EVENTS_HEIGHT_VARIANT_B:CGFloat = 284 + + let CELL_ACTIONS_HEIGHT_ORIGINAL:CGFloat = 298 + let CELL_ACTIONS_HEIGHT_VARIANT_A:CGFloat = 286 + let CELL_ACTIONS_HEIGHT_VARIANT_B:CGFloat = 248 @IBOutlet weak var ui_tableview: UITableView! @IBOutlet weak var ui_button_tour: UIButton! @@ -33,6 +47,8 @@ class OTHomeExpertViewController: UIViewController { var isFromProfile = false + var variantType:VariantCell = .Original + override func viewDidLoad() { super.viewDidLoad() @@ -61,7 +77,42 @@ class OTHomeExpertViewController: UIViewController { OTLogger.logEvent(View_Start_ExpertFeed) - getFeed() + let remoteValue = RemoteConfig.remoteConfig()["cell_home_expert_type"] + switch(remoteValue.numberValue) { + case 0: + self.variantType = .Original + case 1: + self.variantType = .VariantA + case 2 : + self.variantType = .VariantB + default: + break + } + + let defaultDuration:TimeInterval = 60 * 60 * 24 //TODO: -remettre les bonnes valuers après tests preprod- sinon 0 + RemoteConfig.remoteConfig().fetch(withExpirationDuration: defaultDuration) { Status, error in + if error == nil { + RemoteConfig.remoteConfig().activate { changed, error in + let remoteCell = RemoteConfig.remoteConfig()["cell_home_expert_type"] + + switch(remoteCell.numberValue) { + case 0: + self.variantType = .Original + case 1: + self.variantType = .VariantA + case 2 : + self.variantType = .VariantB + default: + break + } + + self.getFeed() + } + } + else { + self.getFeed() + } + } } override func viewWillAppear(_ animated: Bool) { @@ -273,13 +324,31 @@ extension OTHomeExpertViewController: UITableViewDelegate, UITableViewDataSource cell = tableView.dequeueReusableCell(withIdentifier: "CollectionCellAnnouncesEmpty", for: indexPath) as! OTHomeCellCollectionView } else if arrayFeedEmpty[indexPath.row].type == .Events { - cell = tableView.dequeueReusableCell(withIdentifier: "collectionCellEventsEmpty", for: indexPath) as! OTHomeCellCollectionView + var identifierVariant = "" + switch self.variantType { + case .Original: + identifierVariant = "collectionCellEventsEmpty" + case .VariantA: + identifierVariant = "collectionCellEventsEmptyA" + case .VariantB: + identifierVariant = "collectionCellEventsEmptyB" + } + cell = tableView.dequeueReusableCell(withIdentifier: identifierVariant, for: indexPath) as! OTHomeCellCollectionView } else { - cell = tableView.dequeueReusableCell(withIdentifier: "CollectionCellActionsEmpty", for: indexPath) as! OTHomeCellCollectionView + var identifierVariant = "" + switch self.variantType { + case .Original: + identifierVariant = "CollectionCellActionsEmpty" + case .VariantA: + identifierVariant = "CollectionCellActionsEmptyA" + case .VariantB: + identifierVariant = "CollectionCellActionsEmptyB" + } + cell = tableView.dequeueReusableCell(withIdentifier: identifierVariant, for: indexPath) as! OTHomeCellCollectionView } - cell.populateCell(card: arrayFeedEmpty[indexPath.row],clickDelegate: self, isLoading: isLoading) + cell.populateCell(card: arrayFeedEmpty[indexPath.row],clickDelegate: self, isLoading: isLoading,variantType:self.variantType) return cell } @@ -296,13 +365,32 @@ extension OTHomeExpertViewController: UITableViewDelegate, UITableViewDataSource cell = tableView.dequeueReusableCell(withIdentifier: "CollectionCellAnnounces", for: indexPath) as! OTHomeCellCollectionView } else if arrayFeed[indexPath.row].type == .Events { - cell = tableView.dequeueReusableCell(withIdentifier: "collectionCellEvents", for: indexPath) as! OTHomeCellCollectionView + var identifierVariant = "" + switch self.variantType { + case .Original: + identifierVariant = "collectionCellEvents" + case .VariantA: + identifierVariant = "collectionCellEventsA" + case .VariantB: + identifierVariant = "collectionCellEventsB" + } + + cell = tableView.dequeueReusableCell(withIdentifier: identifierVariant, for: indexPath) as! OTHomeCellCollectionView } else { - cell = tableView.dequeueReusableCell(withIdentifier: "CollectionCellActions", for: indexPath) as! OTHomeCellCollectionView + var identifierVariant = "" + switch self.variantType { + case .Original: + identifierVariant = "CollectionCellActions" + case .VariantA: + identifierVariant = "CollectionCellActionsA" + case .VariantB: + identifierVariant = "CollectionCellActionsB" + } + cell = tableView.dequeueReusableCell(withIdentifier: identifierVariant, for: indexPath) as! OTHomeCellCollectionView } - cell.populateCell(card: arrayFeed[indexPath.row],clickDelegate: self, isLoading: isLoading) + cell.populateCell(card: arrayFeed[indexPath.row],clickDelegate: self, isLoading: isLoading,variantType:self.variantType) return cell } @@ -313,9 +401,27 @@ extension OTHomeExpertViewController: UITableViewDelegate, UITableViewDataSource return CELL_HEADLINES_HEIGHT } if arrayFeedEmpty[indexPath.row].type == .Events { - return CELL_EVENTS_HEIGHT + var cell_height:CGFloat + switch self.variantType { + case .Original: + cell_height = CELL_EVENTS_HEIGHT_ORIGINAL + case .VariantA: + cell_height = CELL_EVENTS_HEIGHT_VARIANT_A + case .VariantB: + cell_height = CELL_EVENTS_HEIGHT_VARIANT_B + } + return cell_height + } + var cell_height:CGFloat + switch self.variantType { + case .Original: + cell_height = CELL_ACTIONS_HEIGHT_ORIGINAL + case .VariantA: + cell_height = CELL_ACTIONS_HEIGHT_VARIANT_A + case .VariantB: + cell_height = CELL_ACTIONS_HEIGHT_VARIANT_B } - return CELL_ACTIONS_HEIGHT + return cell_height } if indexPath.row == arrayFeed.count && self.isNeighbour { @@ -326,9 +432,28 @@ extension OTHomeExpertViewController: UITableViewDelegate, UITableViewDataSource return CELL_HEADLINES_HEIGHT } if arrayFeed[indexPath.row].type == .Events { - return CELL_EVENTS_HEIGHT + var cell_height:CGFloat + switch self.variantType { + case .Original: + cell_height = CELL_EVENTS_HEIGHT_ORIGINAL + case .VariantA: + cell_height = CELL_EVENTS_HEIGHT_VARIANT_A + case .VariantB: + cell_height = CELL_EVENTS_HEIGHT_VARIANT_B + } + return cell_height + } + + var cell_height:CGFloat + switch self.variantType { + case .Original: + cell_height = CELL_ACTIONS_HEIGHT_ORIGINAL + case .VariantA: + cell_height = CELL_ACTIONS_HEIGHT_VARIANT_A + case .VariantB: + cell_height = CELL_ACTIONS_HEIGHT_VARIANT_B } - return CELL_ACTIONS_HEIGHT + return cell_height } //MARK: Delegate click Cells @@ -343,6 +468,19 @@ extension OTHomeExpertViewController: UITableViewDelegate, UITableViewDataSource func selectCollectionViewCell(item:Any,type:HomeCardType, position:Int) { let posStr = "\(position+1)" var logString = "" + + //MARK: Use for AB Testing precision variant Analytics + var tagAB = "" + switch self.variantType { + case .Original: + tagAB = "Action__ExpertFeed__Show_O" + case .VariantA: + tagAB = "Action__ExpertFeed__Show_A" + case .VariantB: + tagAB = "Action__ExpertFeed__Show_B" + } + + if let _item = item as? OTEntourage { if _item.groupType == "outing" { if type == .Headlines { @@ -350,6 +488,8 @@ extension OTHomeExpertViewController: UITableViewDelegate, UITableViewDataSource } else { logString = "\(Action_expertFeed_Event)\(posStr)" + OTLogger.logEvent("Action__ExpertFeed__Show") //MARK: Use for AB Testing + OTLogger.logEvent(tagAB) //MARK: Use for AB Testing precision variant Analytics } let sb = UIStoryboard.init(name: "PublicFeedDetailNew", bundle: nil) let vc = sb.instantiateInitialViewController() as! OTDetailActionEventViewController @@ -363,6 +503,8 @@ extension OTHomeExpertViewController: UITableViewDelegate, UITableViewDataSource } else { logString = "\(Action_expertFeed_Action)\(posStr)" + OTLogger.logEvent("Action__ExpertFeed__Show") //MARK: Use for AB Testing + OTLogger.logEvent(tagAB) //MARK: Use for AB Testing precision variant Analytics } let sb = UIStoryboard.init(name: "PublicFeedDetailNew", bundle: nil) let vc = sb.instantiateInitialViewController() as! OTDetailActionEventViewController diff --git a/Shared/Classes/Controller/Home/OTHomeMainViewController.swift b/Shared/Classes/Controller/Home/OTHomeMainViewController.swift index 8fb907217..912c3f05e 100644 --- a/Shared/Classes/Controller/Home/OTHomeMainViewController.swift +++ b/Shared/Classes/Controller/Home/OTHomeMainViewController.swift @@ -7,6 +7,7 @@ // import UIKit +import SVProgressHUD class OTHomeMainViewController: UIViewController { @@ -19,6 +20,11 @@ class OTHomeMainViewController: UIViewController { var isExpertMode = false var isFromProfile = false + var timerClosePop:Timer? + let timerCount = 5 //seconds + var countdownClosePop = 5 //seconds + var alertPopInfo:OTCustomInfoPop? + override func viewDidLoad() { super.viewDidLoad() @@ -180,6 +186,49 @@ class OTHomeMainViewController: UIViewController { } } + func showFeedInfoDetail(feedItem:OTFeedItem) { + SVProgressHUD.dismiss() + if let tabvc = self.tabBarController { + alertPopInfo = OTCustomInfoPop(frame: tabvc.view.frame) + + var message = "" + var title = "" + if feedItem.isOuting() { + message = OTLocalisationService.getLocalizedValue(forKey: "infoPopCreateEvent") + title = OTLocalisationService.getLocalizedValue(forKey: "infoPopCreateEventTitle") + } + else { + if (feedItem as! OTEntourage).isAskForHelp() { + message = OTLocalisationService.getLocalizedValue(forKey: "infoPopCreateAsk") + title = OTLocalisationService.getLocalizedValue(forKey: "infoPopCreateAskTitle") + } + else { + message = OTLocalisationService.getLocalizedValue(forKey: "infoPopCreateContrib") + title = OTLocalisationService.getLocalizedValue(forKey: "infoPopCreateContribTitle") + } + } + + alertPopInfo?.setupTitle(title: title, subtitle: message) + alertPopInfo?.delegate = self + tabvc.view.addSubview(alertPopInfo!) + tabvc.view.bringSubviewToFront(alertPopInfo!) + } + + self.selectedFeedItem = feedItem + + countdownClosePop = timerCount + timerClosePop = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(updateCountdown), userInfo: nil, repeats: true) + } + + @objc func updateCountdown() { + if countdownClosePop > 0 { + countdownClosePop = countdownClosePop - 1 + } + else { + close() + } + } + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "ActiveFeedItemDetailsSegue" { @@ -202,3 +251,15 @@ class OTHomeMainViewController: UIViewController { } } } + +//MARK: - ClosepopDelegate - +extension OTHomeMainViewController: ClosePopDelegate { + func close() { + alertPopInfo?.removeFromSuperview() + alertPopInfo = nil + timerClosePop?.invalidate() + DispatchQueue.main.async { + self.performSegue(withIdentifier: "pushDetailFeedNew", sender: self) + } + } +} diff --git a/Shared/Classes/Controller/Home/OTHomeNeoActionViewController.swift b/Shared/Classes/Controller/Home/OTHomeNeoActionViewController.swift index d8d1a60f9..b2f8b942b 100644 --- a/Shared/Classes/Controller/Home/OTHomeNeoActionViewController.swift +++ b/Shared/Classes/Controller/Home/OTHomeNeoActionViewController.swift @@ -52,8 +52,6 @@ extension OTHomeNeoActionViewController: UITableViewDataSource,UITableViewDelega func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - - if indexPath.row == 6 { if let url = OTSafariService.redirectUrl(withIdentifier: SLUG_ACTION_SCB) { OTSafariService.launchInAppBrowser(with: url) @@ -155,10 +153,18 @@ extension OTHomeNeoActionViewController : EntourageEditorDelegate { func didEdit(_ entourage: OTEntourage!) { temporaryNavController?.dismiss(animated: true, completion: { self.temporaryNavController = nil - self.showAllActions() + self.showDetailEntourage(entourage) }) } + func showDetailEntourage(_ entourage: OTEntourage!) { + let sb = UIStoryboard.init(name: "PublicFeedDetailNew", bundle: nil) + if let vc = sb.instantiateInitialViewController() as? OTDetailActionEventViewController { + vc.feedItem = entourage + self.navigationController?.pushViewController(vc, animated: true) + } + } + func showAllEvents() { let sb = UIStoryboard.init(name: "Main2", bundle: nil) let vc = sb.instantiateViewController(withIdentifier: "OTMain0") as! OTFeedsViewController diff --git a/Shared/Classes/Controller/Home/OTHomeTableViewCells.swift b/Shared/Classes/Controller/Home/OTHomeTableViewCells.swift index 6ef005b7d..59d9bc1b8 100644 --- a/Shared/Classes/Controller/Home/OTHomeTableViewCells.swift +++ b/Shared/Classes/Controller/Home/OTHomeTableViewCells.swift @@ -48,11 +48,27 @@ class OTHomeCellCollectionView: UITableViewCell,UICollectionViewDelegateFlowLayo weak var delegate:CellClickDelegate? = nil let cell_headline_size = CGSize(width: 200, height: 264) - let cell_event_size = CGSize(width: 292, height: 214) - let cell_event_zone_size = CGSize(width: 200, height: 214) - let cell_action_size = CGSize(width: 200, height: 232) - let cell_empty_event_size = CGSize(width: 140, height: 214) - let cell_empty_action_size = CGSize(width: 140, height: 232) + + let cell_event_size_Original = CGSize(width: 292, height: 214) + let cell_event_size_VariantA = CGSize(width: 200, height: 260) + let cell_event_size_VariantB = CGSize(width: 200, height: 224) + + let cell_event_zone_size_Original = CGSize(width: 200, height: 214) + let cell_event_zone_size_VariantA = CGSize(width: 200, height: 260) + let cell_event_zone_size_VariantB = CGSize(width: 200, height: 224) + + let cell_empty_event_size_Original = CGSize(width: 140, height: 214) + let cell_empty_event_size_VariantA = CGSize(width: 140, height: 260) + let cell_empty_event_size_VariantB = CGSize(width: 140, height: 224) + + let cell_action_size_Original = CGSize(width: 200, height: 232) + let cell_action_size_VariantA = CGSize(width: 200, height: 218) + let cell_action_size_VariantB = CGSize(width: 200, height: 180) + + let cell_empty_action_size_Original = CGSize(width: 140, height: 232) + let cell_empty_action_size_VariantA = CGSize(width: 140, height: 218) + let cell_empty_action_size_VariantB = CGSize(width: 140, height: 180) + let cell_spacing:CGFloat = 15.0 let minimumItemsToShowMore = 2 let spacing_coll_start:CGFloat = 25 @@ -64,12 +80,25 @@ class OTHomeCellCollectionView: UITableViewCell,UICollectionViewDelegateFlowLayo var isLoading = false + var variantType:VariantCell = .Original + override func awakeFromNib() { super.awakeFromNib() self.ui_collectionview.showsHorizontalScrollIndicator = false self.ui_collectionview.dataSource = self self.ui_collectionview.delegate = self + + //MARK: Use for AB Testing + let nibA = UINib(nibName: "CellHomeExpertEventA", bundle: nil) + ui_collectionview.register(nibA, forCellWithReuseIdentifier: "cellCollEventA") + let nibB = UINib(nibName: "CellHomeExpertEventB", bundle: nil) + ui_collectionview.register(nibB, forCellWithReuseIdentifier: "cellCollEventB") + + let nibActionA = UINib(nibName: "CellHomeExpertActionA", bundle: nil) + ui_collectionview.register(nibActionA, forCellWithReuseIdentifier: "cellCollActionA") + let nibActionB = UINib(nibName: "CellHomeExpertActionB", bundle: nil) + ui_collectionview.register(nibActionB, forCellWithReuseIdentifier: "cellCollActionB") } func changeFlowLayout() { @@ -79,10 +108,28 @@ class OTHomeCellCollectionView: UITableViewCell,UICollectionViewDelegateFlowLayo flowLayout.itemSize = cell_headline_size } else if cards.type == .Events { - flowLayout.itemSize = cell_event_size + var _size:CGSize + switch self.variantType { + case .Original: + _size = cell_event_size_Original + case .VariantA: + _size = cell_event_size_VariantA + case .VariantB: + _size = cell_event_size_VariantB + } + flowLayout.itemSize = _size } else { - flowLayout.itemSize = cell_action_size + var _size:CGSize + switch self.variantType { + case .Original: + _size = cell_action_size_Original + case .VariantA: + _size = cell_action_size_VariantA + case .VariantB: + _size = cell_action_size_VariantB + } + flowLayout.itemSize = _size } flowLayout.minimumLineSpacing = cell_spacing @@ -90,11 +137,13 @@ class OTHomeCellCollectionView: UITableViewCell,UICollectionViewDelegateFlowLayo self.ui_collectionview.collectionViewLayout = flowLayout } - func populateCell(card:HomeCard,clickDelegate:CellClickDelegate, isLoading:Bool) { + func populateCell(card:HomeCard,clickDelegate:CellClickDelegate, isLoading:Bool, variantType:VariantCell) { self.cards = card self.delegate = clickDelegate self.isLoading = isLoading + self.variantType = variantType + if card.type != .Headlines { self.isSpecialCells = cards.arrayCards.count <= minimalCellForSpecialCell } @@ -170,7 +219,16 @@ extension OTHomeCellCollectionView: UICollectionViewDataSource,UICollectionViewD return cell } - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cellColl", for: indexPath) as! OTHomeEventCollectionViewCell + var cellName = "" + switch self.variantType { + case .Original: + cellName = "cellCollEvent" + case .VariantA: + cellName = "cellCollEventA" + case .VariantB: + cellName = "cellCollEventB" + } + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: cellName, for: indexPath) as! OTHomeEventCollectionViewCell let item = cards.arrayCards[indexPath.row] if let item = item as? OTEntourage { @@ -211,10 +269,25 @@ extension OTHomeCellCollectionView: UICollectionViewDataSource,UICollectionViewD return cell } - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cellColl", for: indexPath) as! OTHomeCollectionViewCell + var cellName = "" + switch self.variantType { + case .Original: + cellName = "cellCollAction" + case .VariantA: + cellName = "cellCollActionA" + case .VariantB: + cellName = "cellCollActionB" + } + + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: cellName, for: indexPath) as! OTHomeCollectionViewCell if let _entourage = cards.arrayCards[indexPath.row] as? OTEntourage { - cell.updateCell(item: _entourage,delegate: delegate) + if self.variantType == .Original { + cell.updateCell(item: _entourage,delegate: delegate) + } + else { + cell.updateCellVariant(item: _entourage,delegate: delegate) + } } return cell @@ -254,24 +327,62 @@ extension OTHomeCellCollectionView: UICollectionViewDataSource,UICollectionViewD return cell_headline_size } else if cards.type == .Events { + var specialSize:CGSize + var emptySize:CGSize + var normalSize:CGSize + switch self.variantType { + case .Original: + specialSize = cell_event_zone_size_Original + emptySize = cell_empty_event_size_Original + normalSize = cell_event_size_Original + case .VariantA: + specialSize = cell_event_zone_size_VariantA + emptySize = cell_empty_event_size_VariantA + normalSize = cell_event_size_VariantA + case .VariantB: + specialSize = cell_event_zone_size_VariantB + emptySize = cell_empty_event_size_VariantB + normalSize = cell_event_size_VariantB + } + if isSpecialCells && indexPath.row == cards.arrayCards.count { - return cell_event_zone_size + return specialSize } if indexPath.row == cards.arrayCards.count { - return cell_empty_event_size + return emptySize } - return cell_event_size + + return normalSize } else { + var specialSize:CGSize + var emptySize:CGSize + var normalSize:CGSize + switch self.variantType { + case .Original: + specialSize = cell_action_size_Original + emptySize = cell_empty_action_size_Original + normalSize = cell_action_size_Original + case .VariantA: + specialSize = cell_action_size_VariantA + emptySize = cell_empty_action_size_VariantA + normalSize = cell_action_size_VariantA + case .VariantB: + specialSize = cell_action_size_VariantB + emptySize = cell_empty_action_size_VariantB + normalSize = cell_action_size_VariantB + } + if isSpecialCells && indexPath.row == cards.arrayCards.count { - return cell_action_size + return specialSize } if indexPath.row == cards.arrayCards.count { - return cell_empty_action_size + return emptySize } - return cell_action_size + + return normalSize } } } diff --git a/Shared/Classes/Controller/OTConfirmCloseViewController.m b/Shared/Classes/Controller/OTConfirmCloseViewController.m index 65ebe4140..dfa36cab8 100644 --- a/Shared/Classes/Controller/OTConfirmCloseViewController.m +++ b/Shared/Classes/Controller/OTConfirmCloseViewController.m @@ -14,6 +14,7 @@ #import "OTConsts.h" #import "OTMailSenderBehavior.h" #import "OTCloseReason.h" +#import "Analytics_keys.h" @interface OTConfirmCloseViewController () @@ -54,6 +55,8 @@ - (void)viewDidLoad { } [self setupViews]; + + [OTLogger logEvent:Show_Pop_Close]; } -(void) setupViews { @@ -87,12 +90,12 @@ -(void) setupViews { #pragma mark - User interaction - (IBAction)doSuccessfulClose { - [OTLogger logEvent:@"SuccessfulClosePopup"]; + [OTLogger logEvent:Action_Pop_Close_Success]; [self closeFeedItemWithReason:OTCloseReasonSuccesClose]; } - (IBAction)doBlockedClose { - [OTLogger logEvent:@"BlockedClosePopup"]; + [OTLogger logEvent:Action_Pop_Close_Failed]; [self closeFeedItemWithReason:OTCloseReasonBlockedClose]; } diff --git a/Shared/Classes/Controller/PublicFeedItem/OTDetailActionEventViewController.swift b/Shared/Classes/Controller/PublicFeedItem/OTDetailActionEventViewController.swift index ae98d4204..602f9994b 100644 --- a/Shared/Classes/Controller/PublicFeedItem/OTDetailActionEventViewController.swift +++ b/Shared/Classes/Controller/PublicFeedItem/OTDetailActionEventViewController.swift @@ -170,7 +170,7 @@ class OTDetailActionEventViewController: UIViewController { } @objc func startChangeStatus() { - OTLogger.logEvent("OpenEntourageOptionsOverlay") + OTLogger.logEvent(Show_Menu_Options) self.performSegue(withIdentifier: "SegueChangeState", sender: self) } diff --git a/Shared/Classes/Controller/Settings/OTMenuProfileViewController.swift b/Shared/Classes/Controller/Settings/OTMenuProfileViewController.swift index b39c34e9d..53b80c9b0 100644 --- a/Shared/Classes/Controller/Settings/OTMenuProfileViewController.swift +++ b/Shared/Classes/Controller/Settings/OTMenuProfileViewController.swift @@ -11,7 +11,6 @@ import Firebase import SVProgressHUD class OTMenuProfileViewController: UIViewController { - @IBOutlet weak var ui_tableview: UITableView? var uuidInfo = "*****" diff --git a/Shared/Classes/Settings/Analytics_keys.h b/Shared/Classes/Settings/Analytics_keys.h index 90869fd2b..6887fbdaf 100644 --- a/Shared/Classes/Settings/Analytics_keys.h +++ b/Shared/Classes/Settings/Analytics_keys.h @@ -315,4 +315,16 @@ #define Action_ListActions_Switch_Contrib @"Action__ListActions__Switch_Contrib" #define Action_ListActions_Show_Detail @"Action__ListActions__Show_Detail" +//POP Share / modify / close entourage +#define Show_Pop_Share @"View__Pop_Share__Show" +#define Action_Pop_Share_Link @"Action__Pop_Share__Link" +#define Action_Pop_Share_Entourage @"Action__Pop_Share__On_Entourage" + +#define Show_Menu_Options @"View__Menu_Options__Show" +#define Show_Modify_Entourage @"View__Modify_Entourage__Show" + +#define Show_Pop_Close @"View__Pop_Close_Entourage__Show" +#define Action_Pop_Close_Success @"Action__Pop_Close_Entourage__Success" +#define Action_Pop_Close_Failed @"Action__Pop_Close_Entourage__Fail" + #endif /* Analytics_keys_h */ diff --git a/Shared/Classes/Settings/OTAppConfiguration.m b/Shared/Classes/Settings/OTAppConfiguration.m index 683f0ce24..a8cf63f6d 100644 --- a/Shared/Classes/Settings/OTAppConfiguration.m +++ b/Shared/Classes/Settings/OTAppConfiguration.m @@ -221,6 +221,22 @@ - (void)configureFirebase [FIRAnalytics setUserPropertyString:[OTAuthService currentUserAuthenticationLevel] forName:@"AuthenticationLevel"]; [FIRMessaging messaging].delegate = (id)[UIApplication sharedApplication].delegate; + + [self configureRemoteConfig]; +} + +-(void) configureRemoteConfig { + [[FIRInstallations installations] authTokenForcingRefresh:true + completion:^(FIRInstallationsAuthTokenResult *result, NSError *error) { + if (error != nil) { + NSLog(@"Error fetching Installation token %@", error); + return; + } + [[NSUserDefaults standardUserDefaults]setObject:[result authToken] forKey:@"token_abtest"]; + }]; + + NSDictionary * defaultValues = @{@"cell_home_expert_type" : @0}; + [[FIRRemoteConfig remoteConfig] setDefaults:defaultValues]; } - (void)configureAnalyticsWithOptions:(NSDictionary *)launchOptions diff --git a/Shared/Classes/Utils/Behaviors/FeedItems/OTStatusChangedBehavior.m b/Shared/Classes/Utils/Behaviors/FeedItems/OTStatusChangedBehavior.m index 9297e788e..076915626 100644 --- a/Shared/Classes/Utils/Behaviors/FeedItems/OTStatusChangedBehavior.m +++ b/Shared/Classes/Utils/Behaviors/FeedItems/OTStatusChangedBehavior.m @@ -13,6 +13,7 @@ #import "OTMainViewController.h" #import "OTCloseReason.h" #import "OTTour.h" +#import "Analytics_keys.h" #define ACTION_DELAY 0.3f @@ -29,7 +30,7 @@ - (void)configureWith:(OTFeedItem *)feedItem { } - (IBAction)startChangeStatus { - [OTLogger logEvent:@"OpenEntourageOptionsOverlay"]; + [OTLogger logEvent:Show_Menu_Options]; [self.owner performSegueWithIdentifier:@"SegueChangeState" sender:self]; } diff --git a/Shared/Classes/View/OTCustomInfoPop.swift b/Shared/Classes/View/OTCustomInfoPop.swift new file mode 100644 index 000000000..fbdd25bcc --- /dev/null +++ b/Shared/Classes/View/OTCustomInfoPop.swift @@ -0,0 +1,55 @@ +// +// OTCustomInfoPop.swift +// entourage +// +// Created by Jerome on 09/11/2021. +// Copyright © 2021 Entourage. All rights reserved. +// + +import UIKit + +class OTCustomInfoPop: UIView { + @IBOutlet weak var contentView: UIView! + @IBOutlet weak var ui_container_view: UIView! + + @IBOutlet weak var ui_top_title: UILabel! + @IBOutlet weak var ui_button: UIButton! + @IBOutlet weak var ui_title: UILabel! + + weak var delegate:ClosePopDelegate? + + override init(frame: CGRect) { + super.init(frame: frame) + setupInitial() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setupInitial() + } + + func setupInitial() { + contentView = loadViewFromNib() + contentView.frame = self.bounds + contentView.autoresizingMask = [.flexibleWidth, .flexibleHeight] + addSubview(contentView) + ui_button.setTitle("", for: .normal) + + ui_container_view.layer.cornerRadius = 8 + } + + func loadViewFromNib() -> UIView { + let bundle = Bundle(for: type(of: self)) + let nib = UINib(nibName: "OTCustomInfoPop", bundle: bundle) + return nib.instantiate(withOwner: self, options: nil).first as! UIView + } + + func setupTitle(title:String,subtitle:String) { + ui_top_title.text = title + ui_title.text = subtitle + } + + @IBAction func action_close(_ sender: Any) { + delegate?.close() + } +} diff --git a/Shared/Classes/View/OTCustomInfoPop.xib b/Shared/Classes/View/OTCustomInfoPop.xib new file mode 100644 index 000000000..2d00df662 --- /dev/null +++ b/Shared/Classes/View/OTCustomInfoPop.xib @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Shared/OTMainTabbarViewController.swift b/Shared/OTMainTabbarViewController.swift index 9a4d2023f..957c29681 100644 --- a/Shared/OTMainTabbarViewController.swift +++ b/Shared/OTMainTabbarViewController.swift @@ -335,7 +335,7 @@ extension OTMainTabbarViewController: EntourageEditorDelegate { func didEdit(_ entourage: OTEntourage!) { if let _vc = self.homeVC.children[0] as? OTHomeMainViewController { plusVC.dismiss(animated: true) { - _vc.showFeedInfo(feedItem: entourage) + _vc.showFeedInfoDetail(feedItem: entourage) } } else { @@ -343,7 +343,7 @@ extension OTMainTabbarViewController: EntourageEditorDelegate { showHomeVC() plusVC.dismiss(animated: true) { if let _vc = self.homeVC.children[0] as? OTHomeMainViewController { - _vc.showFeedInfo(feedItem: entourage) + _vc.showFeedInfoDetail(feedItem: entourage) } } } diff --git a/Shared/Resources/Localizable.strings b/Shared/Resources/Localizable.strings index 424c7d0a3..203522c38 100644 --- a/Shared/Resources/Localizable.strings +++ b/Shared/Resources/Localizable.strings @@ -1144,3 +1144,10 @@ "myActionsCreated" = "Mes actions solidaires créées"; "MyActionEmptyAsk" = "Actuellement vous n'avez pas de demandes publiées sur l'application ;)"; "MyActionEmptyContrib" = "Actuellement vous n'avez pas de dons publiés sur l'application ;)"; + +"infoPopCreateContrib" = "Félicitations !\nVotre contribution a bien été créée."; +"infoPopCreateAsk" = "Félicitations !\nVotre demande a bien été créée."; +"infoPopCreateEvent" = "Félicitations !\nVotre événement a bien été créé."; +"infoPopCreateContribTitle" = "Action solidaire\ncréée"; +"infoPopCreateAskTitle" = "Action solidaire\ncréée"; +"infoPopCreateEventTitle" = "Événement créé"; diff --git a/Shared/Storyboards/ActiveFeedItem.storyboard b/Shared/Storyboards/ActiveFeedItem.storyboard index 18ff068b3..164f9f55c 100644 --- a/Shared/Storyboards/ActiveFeedItem.storyboard +++ b/Shared/Storyboards/ActiveFeedItem.storyboard @@ -1,9 +1,9 @@ - + - + @@ -88,7 +88,7 @@ - + @@ -115,7 +115,7 @@ - + @@ -194,7 +194,7 @@ - + @@ -320,7 +320,7 @@ - + @@ -402,7 +402,7 @@ - + @@ -474,7 +474,7 @@ - + @@ -591,13 +591,13 @@ - + - - + - - + - - + - - - - + + + + + - - + + + + + - - - - - - - - - - + + + + + + + + + + + + @@ -2610,7 +2636,7 @@ - + @@ -2628,7 +2654,7 @@ - + @@ -2645,6 +2671,7 @@ + diff --git a/Shared/Storyboards/EntourageEditor.storyboard b/Shared/Storyboards/EntourageEditor.storyboard index e7753978f..4a23da04d 100755 --- a/Shared/Storyboards/EntourageEditor.storyboard +++ b/Shared/Storyboards/EntourageEditor.storyboard @@ -1,9 +1,9 @@ - + - + diff --git a/Shared/Storyboards/FeedChangeOptions.storyboard b/Shared/Storyboards/FeedChangeOptions.storyboard index 355748cf0..c555df5c0 100644 --- a/Shared/Storyboards/FeedChangeOptions.storyboard +++ b/Shared/Storyboards/FeedChangeOptions.storyboard @@ -1,9 +1,9 @@ - + - + diff --git a/Shared/Storyboards/GuideSolidarity.storyboard b/Shared/Storyboards/GuideSolidarity.storyboard index 734a747ee..53bf09a97 100644 --- a/Shared/Storyboards/GuideSolidarity.storyboard +++ b/Shared/Storyboards/GuideSolidarity.storyboard @@ -1,9 +1,9 @@ - + - + @@ -55,7 +55,7 @@ - + @@ -131,7 +131,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -351,20 +351,20 @@ - + - + - + - + - - + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -3205,49 +3639,269 @@ de demandes - - + + - - + + - - + + - + - - + + - - + + - - - + + + - - + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -3270,52 +3924,52 @@ de demandes - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -3586,11 +4664,11 @@ d’événements - + - + @@ -3611,14 +4689,14 @@ d’événements - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/Shared/Storyboards/Main2.storyboard b/Shared/Storyboards/Main2.storyboard index b8bee1d4f..85826c05c 100644 --- a/Shared/Storyboards/Main2.storyboard +++ b/Shared/Storyboards/Main2.storyboard @@ -1,9 +1,9 @@ - + - + diff --git a/Shared/Storyboards/PublicFeedDetailNew.storyboard b/Shared/Storyboards/PublicFeedDetailNew.storyboard index fef00a2f1..4e8ad9f39 100644 --- a/Shared/Storyboards/PublicFeedDetailNew.storyboard +++ b/Shared/Storyboards/PublicFeedDetailNew.storyboard @@ -1,9 +1,9 @@ - + - + @@ -447,7 +447,7 @@