Skip to content

Commit

Permalink
Merge branch 'feature/bug_fixes' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmcl committed Jan 29, 2024
2 parents c79016b + 8724045 commit 13fbb49
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Kukai Mobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2707,7 +2707,7 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/kukai-wallet/kukai-core-swift";
requirement = {
branch = develop;
branch = feature/simulate_operation;
kind = branch;
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down
1 change: 1 addition & 0 deletions Kukai Mobile/Localization/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions Kukai Mobile/Modules/Home/HomeTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}

Expand Down

0 comments on commit 13fbb49

Please sign in to comment.