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 19, 2024
2 parents 62aec56 + c1d42ce commit 4b17adf
Show file tree
Hide file tree
Showing 61 changed files with 393 additions and 811 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,13 @@
"version" : "20.0.0"
}
},
{
"identity" : "kingfisher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/simonmcl/Kingfisher.git",
"state" : {
"revision" : "292ab48438344320e7e9bcf3da46f766c30f7070",
"version" : "1.0.0"
}
},
{
"identity" : "kukai-core-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kukai-wallet/kukai-core-swift",
"state" : {
"branch" : "develop",
"revision" : "3c5e492f50d062cdc199622d63e826e640baec25"
"revision" : "55c19abeb503e4e69c7a811d85e77d8199e74b9d"
}
},
{
Expand All @@ -99,6 +90,15 @@
"version" : "14.3.1"
}
},
{
"identity" : "sdwebimage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImage.git",
"state" : {
"revision" : "59730af512c06fb569c119d737df4c1c499e001d",
"version" : "5.18.10"
}
},
{
"identity" : "secp256k1.swift",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -135,15 +135,6 @@
"version" : "3.1.2"
}
},
{
"identity" : "svgkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/simonmcl/SVGKit",
"state" : {
"revision" : "3ca70eae8573b876e403be8a9bdbe784fd560c0b",
"version" : "3.0.3"
}
},
{
"identity" : "swift-qrcode-generator",
"kind" : "remoteSourceControl",
Expand Down
2 changes: 1 addition & 1 deletion Kukai Mobile/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {


// Setup any necessary settings, such as RAM limits
MediaProxyService.setupKingfisher()
MediaProxyService.setupImageLibrary()


// process special arguments coming from XCUITest to do things like show keyboard and reset app data
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "FavCorner.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
"template-rendering-intent" : "original"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "Social_Twitter_1color.svg",
"filename" : "Social_Twitter_color.svg",
"idiom" : "universal"
}
],
Expand Down

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "Social_Twitter_color.svg",
"filename" : "Social_Twitter_1color.svg",
"idiom" : "universal"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

16 changes: 13 additions & 3 deletions Kukai Mobile/Controls/ScanViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class ScanViewController: UIViewController, AVCaptureMetadataOutputObjectsDelega
}

@objc func textFieldDone() {
found(code: textfield.text ?? "")
checkForBeaconAndReport(stringToCheck: textfield.text ?? "")
}

func setupNav() {
Expand Down Expand Up @@ -329,13 +329,23 @@ class ScanViewController: UIViewController, AVCaptureMetadataOutputObjectsDelega
}

func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) {
captureSession.stopRunning()

if let metadataObject = metadataObjects.first {
guard let readableObject = metadataObject as? AVMetadataMachineReadableCodeObject else { return }
guard let stringValue = readableObject.stringValue else { return }
AudioServicesPlaySystemSound(SystemSoundID(kSystemSoundID_Vibrate))
found(code: stringValue)
checkForBeaconAndReport(stringToCheck: stringValue)
}
}

private func checkForBeaconAndReport(stringToCheck: String) {
if let data = stringToCheck.base58CheckDecodedData, let json = try? JSONSerialization.jsonObject(with: data) as? [String: String], let _ = json["relayServer"], let _ = json["publicKey"] {
self.windowError(withTitle: "error".localized(), description: "error-beacon-not-supported".localized())
self.textfield.text = ""

} else {
captureSession.stopRunning()
found(code: stringToCheck)
}
}

Expand Down
6 changes: 5 additions & 1 deletion Kukai Mobile/Controls/ThemeManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import UIKit
import KukaiCoreSwift
import os.log

/**
Expand Down Expand Up @@ -507,7 +508,10 @@ public class ThemeManager {
}

public func updateSystemInterfaceStyle() {
UIApplication.shared.currentWindow?.overrideUserInterfaceStyle = currentInterfaceStyle()
let current = currentInterfaceStyle()

UIApplication.shared.currentWindow?.overrideUserInterfaceStyle = current
MediaProxyService.isDarkMode = (current == .dark)
}

public func currentInterfaceStyle() -> UIUserInterfaceStyle {
Expand Down
5 changes: 0 additions & 5 deletions Kukai Mobile/Extensions/UIImageView+extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@
//

import UIKit
import Kingfisher
import KukaiCoreSwift

extension UIImageView {

func setImageToCurrentSize(url: URL?) {
self.kf.setImage(with: url, options: [.processor( DownsamplingImageProcessor(size: CGSize(width: self.frame.width, height: self.frame.height)) )])
}

func tint(color: UIColor) {
self.image = self.image?.withRenderingMode(.alwaysTemplate)
self.tintColor = color
Expand Down
2 changes: 1 addition & 1 deletion Kukai Mobile/Extensions/UIView+extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ extension UIView {
rotateAnimation.toValue = CGFloat(Double.pi * 2)
rotateAnimation.isRemovedOnCompletion = false
rotateAnimation.duration = duration
rotateAnimation.repeatCount=Float.infinity
rotateAnimation.repeatCount = Float.infinity
self.layer.add(rotateAnimation, forKey: nil)
}

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 @@ -50,3 +50,4 @@
"error-unsupported-sign"="Unsupported signature request";
"error-wc2-unrecoverable"="An unknown error occured with the connection. This operation can't continue. Please check the other application and try agian";
"error-wc2-cant-continue"="Unable to continue with this request due to system error";
"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";
Loading

0 comments on commit 4b17adf

Please sign in to comment.