diff --git a/Kukai Mobile.xcodeproj/project.pbxproj b/Kukai Mobile.xcodeproj/project.pbxproj index 3cc0193e..6cbafa0b 100644 --- a/Kukai Mobile.xcodeproj/project.pbxproj +++ b/Kukai Mobile.xcodeproj/project.pbxproj @@ -2707,7 +2707,7 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/kukai-wallet/kukai-core-swift"; requirement = { - branch = develop; + branch = feature/simulate_operation; kind = branch; }; }; diff --git a/Kukai Mobile.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Kukai Mobile.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 8e6aeb1a..72e9f270 100644 --- a/Kukai Mobile.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Kukai Mobile.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -68,8 +68,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/kukai-wallet/kukai-core-swift", "state" : { - "branch" : "develop", - "revision" : "102e4e263710946b67e3fc403125b7d2f585a179" + "branch" : "feature/simulate_operation", + "revision" : "4913964dbb31cc37c3e70e5c4b5cb8f7846b1a58" } }, { diff --git a/Kukai Mobile/Localization/en.lproj/Localizable.strings b/Kukai Mobile/Localization/en.lproj/Localizable.strings index ddb26d03..5d8c0946 100644 --- a/Kukai Mobile/Localization/en.lproj/Localizable.strings +++ b/Kukai Mobile/Localization/en.lproj/Localizable.strings @@ -54,3 +54,4 @@ "error-beacon-not-supported"="Beacon QRCodes are not supported, only Wallet Connect. Please make sure you are using the kukai option. If you are, please contact the dApp support team and ask them to update their beacon version"; "error-collectible-media-generic"="Unable to play media at this time, please try again later"; "error-onramp-generic"="Unable to access this provider at this time, please try again later"; +"error-wc2-cant-open-more-modals"="An incoming wallet connect request was automatically rejected, as you are in the middle of an activity. Please return to one of the main tabs and try again."; diff --git a/Kukai Mobile/Modules/Collectibles/Cells/Detail/CollectibleDetailImageCell.swift b/Kukai Mobile/Modules/Collectibles/Cells/Detail/CollectibleDetailImageCell.swift index 40bcb0fd..a102b684 100644 --- a/Kukai Mobile/Modules/Collectibles/Cells/Detail/CollectibleDetailImageCell.swift +++ b/Kukai Mobile/Modules/Collectibles/Cells/Detail/CollectibleDetailImageCell.swift @@ -18,16 +18,6 @@ class CollectibleDetailImageCell: UICollectionViewCell { public var setup = false func setup(mediaContent: MediaContent, layoutOnly: Bool) { - activityIndicator.isHidden = true - - - /* - if mediaContent.isThumbnail { - activityIndicator.startAnimating() - } else { - activityIndicator.isHidden = true - } - */ // If landscape image, remove the existing square image constraint and repalce with smaller height aspect ratio image if mediaContent.width > mediaContent.height { @@ -38,8 +28,23 @@ class CollectibleDetailImageCell: UICollectionViewCell { // Load image if not only perfroming collectionview layout logic if !layoutOnly { - let maxSize: UInt = 1000000000 // 1000 - MediaProxyService.load(url: mediaContent.mediaURL, to: imageView, withCacheType: mediaContent.isThumbnail ? .temporary : .detail, fallback: UIImage.unknownThumb(), maxAnimatedImageSize: maxSize) + + // If its thumbnail, we don't want it to start animating and then jump back to the start in higher quality + // Set the thumbnail limit to bare minimum so it only loads the first frame, then loads the real image later + let maxSize: UInt = mediaContent.isThumbnail ? 1 : 1000000000 + MediaProxyService.load(url: mediaContent.mediaURL, to: imageView, withCacheType: .temporary, fallback: UIImage.unknownThumb(), maxAnimatedImageSize: maxSize) { [weak self] _ in + + // When imageView is empty, SDImageCache will display its own activity, but not when its filled + // So when we load thumbnail, we have to add our own to display so users know the full is laoding in + if mediaContent.isThumbnail { + self?.activityIndicator.isHidden = false + self?.activityIndicator.startAnimating() + + } else { + self?.activityIndicator.stopAnimating() + self?.activityIndicator.isHidden = true + } + } } setup = true diff --git a/Kukai Mobile/Modules/Home/HomeTabBarController.swift b/Kukai Mobile/Modules/Home/HomeTabBarController.swift index 2bf2c3a7..509405b3 100644 --- a/Kukai Mobile/Modules/Home/HomeTabBarController.swift +++ b/Kukai Mobile/Modules/Home/HomeTabBarController.swift @@ -512,6 +512,7 @@ extension HomeTabBarController: WalletConnectServiceDelegate { } } else { WalletConnectService.rejectCurrentRequest(completion: nil) + self.windowError(withTitle: "error".localized(), description: "error-wc2-cant-open-more-modals".localized()) } }