diff --git a/Permanent.xcodeproj/project.pbxproj b/Permanent.xcodeproj/project.pbxproj index 13fc8c72..4ec69645 100644 --- a/Permanent.xcodeproj/project.pbxproj +++ b/Permanent.xcodeproj/project.pbxproj @@ -6101,7 +6101,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS"; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.PermanentArchive; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -6134,7 +6134,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.PermanentArchive; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -6158,7 +6158,7 @@ "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = x86_64; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.1; - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.PermanentArchive.PermanentUITests; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -6183,7 +6183,7 @@ "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = x86_64; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.1; - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.PermanentArchive.PermanentUITests; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -6208,7 +6208,7 @@ "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = x86_64; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.1; - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.PermanentArchive.PermanentUITests; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -6233,7 +6233,7 @@ "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = x86_64; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.1; - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.PermanentArchive.PermanentUITests; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -6264,7 +6264,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = com.vsp.PermanentTests; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -6294,7 +6294,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = com.vsp.PermanentTests; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -6324,7 +6324,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = com.vsp.PermanentTests; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -6354,7 +6354,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = com.vsp.PermanentTests; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -6390,7 +6390,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.PermanentArchive.ShareExtension; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -6428,7 +6428,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.permanent.staging.ShareExtension; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -6466,7 +6466,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.PermanentArchive.ShareExtension; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -6504,7 +6504,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.permanent.staging.ShareExtension; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -6602,7 +6602,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; OTHER_SWIFT_FLAGS = "-D COCOAPODS -DSTAGING_ENVIRONMENT"; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.permanent.staging; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -6692,7 +6692,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; OTHER_SWIFT_FLAGS = "-D COCOAPODS -DSTAGING_ENVIRONMENT"; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.permanent.staging; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -6722,7 +6722,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.PermanentArchive.PushExtension; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -6751,7 +6751,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.permanent.staging.PushExtension; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -6780,7 +6780,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.PermanentArchive.PushExtension; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -6809,7 +6809,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.14.1; + MARKETING_VERSION = 1.14.2; PRODUCT_BUNDLE_IDENTIFIER = org.permanent.permanent.staging.PushExtension; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/Permanent/Common/Network/FilesEndpoint.swift b/Permanent/Common/Network/FilesEndpoint.swift index 5eb3a17c..ecd0fc76 100644 --- a/Permanent/Common/Network/FilesEndpoint.swift +++ b/Permanent/Common/Network/FilesEndpoint.swift @@ -414,9 +414,9 @@ class FilesEndpointPayloads { if let location = params.location, let locationJson = try? JSONEncoder().encode(location), let locationDict = try? JSONSerialization.jsonObject(with: locationJson, options: []) { - recordVO["locnVO"] = locationDict + recordVO["LocnVO"] = locationDict } - + return [ "RequestVO": [ @@ -428,7 +428,7 @@ class FilesEndpointPayloads { ] ] } - + static func updateMultipleRecordsRequest(params: UpdateMultipleRecordsParams) -> RequestParameters { let data = params.files.map { var recordVO: [String: Any] = [ @@ -436,11 +436,11 @@ class FilesEndpointPayloads { "archiveNbr": $0.archiveNo, "folder_linkId": $0.folderLinkId ] - + if let location = params.location, let locationJson = try? JSONEncoder().encode(location), let locationDict = try? JSONSerialization.jsonObject(with: locationJson, options: []) { - recordVO["locnVO"] = locationDict + recordVO["LocnVO"] = locationDict } if let description = params.description { diff --git a/Permanent/Common/Utility/LocationSetViewController.swift b/Permanent/Common/Utility/LocationSetViewController.swift index 04c7eee0..9215c579 100644 --- a/Permanent/Common/Utility/LocationSetViewController.swift +++ b/Permanent/Common/Utility/LocationSetViewController.swift @@ -82,6 +82,9 @@ class LocationSetViewController: BaseViewController { if let latitude = recordVO?.locnVO?.latitude, let longitude = recordVO?.locnVO?.longitude { setLocation(latitude, longitude) + } else { + let coordinate = Constants.API.Locations.initialLocation + setLocation(coordinate.latitude, coordinate.longitude) } navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(cancelButtonPressed(_:))) @@ -107,22 +110,26 @@ class LocationSetViewController: BaseViewController { }) } - func setLocation(_ latitude: Double, _ longitude: Double) { + func setLocation(_ latitude: Double, _ longitude: Double, preserveZoom: Bool = false) { let coordinate: CLLocationCoordinate2D = CLLocationCoordinate2D(latitude: CLLocationDegrees(latitude), longitude: CLLocationDegrees(longitude)) - - mapView.moveCamera(GMSCameraUpdate.setTarget(coordinate, zoom: 6)) - + + if preserveZoom { + mapView.animate(toLocation: coordinate) + } else { + mapView.moveCamera(GMSCameraUpdate.setTarget(coordinate, zoom: 6)) + } + if marker == nil { marker = GMSMarker() } marker.position = coordinate marker.map = mapView } - + func saveLocation(_ location: CLLocationCoordinate2D) { viewModel?.validateLocation(lat: location.latitude, long: location.longitude, completion: { status in if let locnVO = status { - self.setLocation(location.latitude, location.longitude) + self.setLocation(location.latitude, location.longitude, preserveZoom: true) self.pickedLocation = locnVO } else { self.view.showNotificationBanner(title: "There was a problem saving the location.".localized(), backgroundColor: .deepRed, textColor: .white) diff --git a/Permanent/Modules/FileOperations/Cells/FileCollectionViewCell.swift b/Permanent/Modules/FileOperations/Cells/FileCollectionViewCell.swift index 1df932b0..61ccef2a 100644 --- a/Permanent/Modules/FileOperations/Cells/FileCollectionViewCell.swift +++ b/Permanent/Modules/FileOperations/Cells/FileCollectionViewCell.swift @@ -69,6 +69,10 @@ class FileCollectionViewCell: UICollectionViewCell { fileNameLabel.font = TextFontStyle.style35.font fileNameLabel.textColor = .black + let fontLineHeight = TextFontStyle.style35.font.lineHeight + let heightConstraint = fileNameLabel.heightAnchor.constraint(greaterThanOrEqualToConstant: ceil(fontLineHeight)) + heightConstraint.priority = .defaultHigh + heightConstraint.isActive = true fileDateLabel.font = TextFontStyle.style12.font fileDateLabel.textColor = .lightGray fileImageView.clipsToBounds = true diff --git a/Permanent/Modules/FileOperations/View/File Browsing/FolderContentView.swift b/Permanent/Modules/FileOperations/View/File Browsing/FolderContentView.swift index cf238b26..cf5944ff 100644 --- a/Permanent/Modules/FileOperations/View/File Browsing/FolderContentView.swift +++ b/Permanent/Modules/FileOperations/View/File Browsing/FolderContentView.swift @@ -168,7 +168,7 @@ extension FolderContentView: UICollectionViewDelegateFlowLayout, SkeletonCollect } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { - let listItemSize = CGSize(width: collectionView.bounds.width - 12, height: 70) + let listItemSize = CGSize(width: collectionView.bounds.width - 12, height: 74) // Horizontal layout: |-6-cell-6-cell-6-|. 6*3/2 = 9 // Vertical size: 30 is the height of the title label let gridItemSize = CGSize(width: UIScreen.main.bounds.width / 2 - 9, height: UIScreen.main.bounds.width / 2 + 30) diff --git a/Permanent/Modules/FileOperations/ViewController/SearchViewController.swift b/Permanent/Modules/FileOperations/ViewController/SearchViewController.swift index 3da5f581..9bf24a12 100644 --- a/Permanent/Modules/FileOperations/ViewController/SearchViewController.swift +++ b/Permanent/Modules/FileOperations/ViewController/SearchViewController.swift @@ -248,7 +248,7 @@ extension SearchViewController: UICollectionViewDelegateFlowLayout, UICollection } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { - let listItemSize = CGSize(width: UIScreen.main.bounds.width, height: 70) + let listItemSize = CGSize(width: UIScreen.main.bounds.width, height: 74) return listItemSize } diff --git a/Permanent/Modules/Main/ViewController/MainViewController.swift b/Permanent/Modules/Main/ViewController/MainViewController.swift index 45fd407f..0e1a89fb 100644 --- a/Permanent/Modules/Main/ViewController/MainViewController.swift +++ b/Permanent/Modules/Main/ViewController/MainViewController.swift @@ -965,7 +965,7 @@ extension MainViewController: UICollectionViewDelegateFlowLayout, UICollectionVi } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { - let listItemSize = CGSize(width: UIScreen.main.bounds.width, height: 70) + let listItemSize = CGSize(width: UIScreen.main.bounds.width, height: 74) // Horizontal layout: |-6-cell-6-cell-6-|. 6*3/2 = 9 // Vertical size: 30 is the height of the title label let gridItemSize = CGSize(width: UIScreen.main.bounds.width / 2 - 9, height: UIScreen.main.bounds.width / 2 + 30)