From 3fed9f962470fc903ebf4d32d08155d2052670f5 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Sat, 15 Feb 2020 12:37:53 +0100 Subject: [PATCH] Functional --- .bazelrc | 10 ++++++++-- Wallet/Sources/AppDelegate.swift | 2 +- .../Display/Source/NavigationButtonNode.swift | 2 +- .../Display/Source/Nodes/ASImageNode.swift | 16 +++++++--------- submodules/TonBinding/Sources/TON.mm | 2 -- .../WalletUI/Sources/WalletWordCheckScreen.swift | 2 +- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.bazelrc b/.bazelrc index 5bb6fce5d6..d973e54886 100644 --- a/.bazelrc +++ b/.bazelrc @@ -3,5 +3,11 @@ build --strategy=SwiftCompile=standalone build --apple_platform_type=ios build --cxxopt='-std=c++14' build --copt='-w' -build --swiftcopt='-Xcc' --swiftcopt='-w' -build --features=swift.enable_batch_mode +build --swiftcopt='-Xcc' +build --swiftcopt='-w' +#build --features=swift.enable_batch_mode +build --features=swift.use_global_module_cache +build --spawn_strategy=local +build --swiftcopt=-wmo +build --swiftcopt='-num-threads' +build --swiftcopt='16' diff --git a/Wallet/Sources/AppDelegate.swift b/Wallet/Sources/AppDelegate.swift index 5d00edc19a..3faf48026b 100644 --- a/Wallet/Sources/AppDelegate.swift +++ b/Wallet/Sources/AppDelegate.swift @@ -828,6 +828,6 @@ struct MergedLocalWalletConfiguration: Codable, Equatable { private extension MergedLocalWalletConfiguration { static var `default`: MergedLocalWalletConfiguration { - return MergedLocalWalletConfiguration(configuration: LocalWalletConfiguration(source: .url("https://test.ton.org/config.json"), blockchainName: "testnet"), resolved: nil) + return MergedLocalWalletConfiguration(configuration: LocalWalletConfiguration(source: .url("https://test.ton.org/config.json"), blockchainName: "testnet2"), resolved: nil) } } diff --git a/submodules/Display/Source/NavigationButtonNode.swift b/submodules/Display/Source/NavigationButtonNode.swift index f8188e6204..8b73b4b8d4 100644 --- a/submodules/Display/Source/NavigationButtonNode.swift +++ b/submodules/Display/Source/NavigationButtonNode.swift @@ -172,7 +172,7 @@ private final class NavigationButtonItemNode: ImmediateTextNode { } override func updateLayout(_ constrainedSize: CGSize) -> CGSize { - let superSize = super.calculateSizeThatFits(constrainedSize) + let superSize = super.updateLayout(constrainedSize) if let node = self.node { let nodeSize = node.measure(constrainedSize) diff --git a/submodules/Display/Source/Nodes/ASImageNode.swift b/submodules/Display/Source/Nodes/ASImageNode.swift index 27daca0422..aba992dffe 100644 --- a/submodules/Display/Source/Nodes/ASImageNode.swift +++ b/submodules/Display/Source/Nodes/ASImageNode.swift @@ -5,17 +5,15 @@ import AsyncDisplayKit open class ASImageNode: ASDisplayNode { public var image: UIImage? { didSet { - if self.isNodeLoaded { - if let image = self.image { - let capInsets = image.capInsets - if capInsets.left.isZero && capInsets.top.isZero { - ASDisplayNodeSetResizableContents(self, image) - } else { - self.contents = self.image?.cgImage - } + if let image = self.image { + let capInsets = image.capInsets + if capInsets.left.isZero && capInsets.top.isZero { + self.contents = self.image?.cgImage } else { - self.contents = nil + ASDisplayNodeSetResizableContents(self, image) } + } else { + self.contents = nil } } } diff --git a/submodules/TonBinding/Sources/TON.mm b/submodules/TonBinding/Sources/TON.mm index e976d08a5c..5fcbc52b53 100644 --- a/submodules/TonBinding/Sources/TON.mm +++ b/submodules/TonBinding/Sources/TON.mm @@ -709,8 +709,6 @@ typedef enum { uint64_t requestId = _nextRequestId; _nextRequestId += 1; - __weak TON *weakSelf = self; - SQueue *queue = _queue; _requestHandlers[@(requestId)] = [[TONRequestHandler alloc] initWithCompletion:^(tonlib_api::object_ptr &object) { if (object->get_id() == tonlib_api::error::ID) { auto error = tonlib_api::move_object_as(object); diff --git a/submodules/WalletUI/Sources/WalletWordCheckScreen.swift b/submodules/WalletUI/Sources/WalletWordCheckScreen.swift index e66231cc9c..4d9144ed91 100644 --- a/submodules/WalletUI/Sources/WalletWordCheckScreen.swift +++ b/submodules/WalletUI/Sources/WalletWordCheckScreen.swift @@ -2894,7 +2894,7 @@ private final class WalletWordCheckScreenNode: ViewControllerTracingNode, UIScro let buttonFrame = CGRect(origin: CGPoint(x: floor((contentAreaSize.width - buttonWidth) / 2.0), y: max(contentHeight + buttonSpacing, availableAreaSize.height - bottomInset - buttonHeight)), size: CGSize(width: buttonWidth, height: buttonHeight)) transition.updateFrame(node: self.buttonNode, frame: buttonFrame) - self.buttonNode.updateLayout(width: buttonFrame.width, transition: transition) + let _ = self.buttonNode.updateLayout(width: buttonFrame.width, transition: transition) transition.animateView { self.scrollNode.view.contentInset = UIEdgeInsets(top: 0.0, left: 0.0, bottom: layout.insets(options: [.input]).bottom + 30.0, right: 0.0)