Skip to content

Commit

Permalink
revert max button
Browse files Browse the repository at this point in the history
  • Loading branch information
DRadmir committed May 31, 2024
1 parent c65ab84 commit 321c3a5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
10 changes: 5 additions & 5 deletions fearless.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -563,7 +563,7 @@
8428765F24ADE0BB00D91AD8 /* UserSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8428765E24ADE0BB00D91AD8 /* UserSettings.swift */; };
8428766724ADF22000D91AD8 /* TransformAnimator+Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8428766624ADF22000D91AD8 /* TransformAnimator+Common.swift */; };
8428766924ADF27D00D91AD8 /* AuthorizationPresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8428766824ADF27D00D91AD8 /* AuthorizationPresentable.swift */; };
8428766B24ADF51D00D91AD8 /* UIViewController+Modal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8428766A24ADF51D00D91AD8 /* UIViewController+Modal.swift */; };
8428766B24ADF51D00D91AD8 /* UIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8428766A24ADF51D00D91AD8 /* UIViewController.swift */; };
8428768324AE046300D91AD8 /* LanguageSelectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8428766D24AE046200D91AD8 /* LanguageSelectionViewController.swift */; };
8428768424AE046300D91AD8 /* LanguageSelectionInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8428766E24AE046200D91AD8 /* LanguageSelectionInteractor.swift */; };
8428768524AE046300D91AD8 /* LanguageSelectionProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8428766F24AE046200D91AD8 /* LanguageSelectionProtocols.swift */; };
Expand Down Expand Up @@ -3648,7 +3648,7 @@
8428765E24ADE0BB00D91AD8 /* UserSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSettings.swift; sourceTree = "<group>"; };
8428766624ADF22000D91AD8 /* TransformAnimator+Common.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TransformAnimator+Common.swift"; sourceTree = "<group>"; };
8428766824ADF27D00D91AD8 /* AuthorizationPresentable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthorizationPresentable.swift; sourceTree = "<group>"; };
8428766A24ADF51D00D91AD8 /* UIViewController+Modal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Modal.swift"; sourceTree = "<group>"; };
8428766A24ADF51D00D91AD8 /* UIViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewController.swift; sourceTree = "<group>"; };
8428766D24AE046200D91AD8 /* LanguageSelectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LanguageSelectionViewController.swift; sourceTree = "<group>"; };
8428766E24AE046200D91AD8 /* LanguageSelectionInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LanguageSelectionInteractor.swift; sourceTree = "<group>"; };
8428766F24AE046200D91AD8 /* LanguageSelectionProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LanguageSelectionProtocols.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -9458,7 +9458,7 @@
F409672526B29B04008CD244 /* UIScrollView+ScrollToPage.swift */,
8490144E24A93E2E008F705E /* UIImage+Drawing.swift */,
849014C424AA890D008F705E /* UIFont+Style.swift */,
8428766A24ADF51D00D91AD8 /* UIViewController+Modal.swift */,
8428766A24ADF51D00D91AD8 /* UIViewController.swift */,
84EBC55E24F71D6A00459D15 /* UITableViewCell+ReorderColor.swift */,
84CCBFBB2509709500180F4F /* UIBarButtonItem+Style.swift */,
84D331AE2519E8080078D044 /* TriangularedView+Style.swift */,
Expand Down Expand Up @@ -16638,7 +16638,7 @@
84B64E412704569D00914E88 /* RelaychainStakingLocalSubscriptionHandler.swift in Sources */,
848FFE9525E6DF2200652AA5 /* PagedKeysRequest.swift in Sources */,
FAABC4732845C7F4002CF40E /* ValidatorListFilterParachainViewModelState.swift in Sources */,
8428766B24ADF51D00D91AD8 /* UIViewController+Modal.swift in Sources */,
8428766B24ADF51D00D91AD8 /* UIViewController.swift in Sources */,
FAAC292C2ADCF3BB00063962 /* WalletConnectConfirmationCoordinator.swift in Sources */,
84F30E9725FD3C5300039D09 /* EventEmittingStorageSubscription.swift in Sources */,
AEAC68FE26EA3C2A00346599 /* CoingeckoPriceSource.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,14 @@ extension UIViewController {

return presentingController
}

func hideKeyboardWhenTappedAround() {
let tap = UITapGestureRecognizer(target: self, action: #selector(UIViewController.dismissKeyboard))
tap.cancelsTouchesInView = false
view.addGestureRecognizer(tap)
}

@objc func dismissKeyboard() {
view.endEditing(true)
}
}
1 change: 1 addition & 0 deletions fearless/Common/View/UIFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ final class UIFactory: UIFactoryProtocol {

let maxTitle = R.string.localizable.commonMax(preferredLanguages: locale.rLanguages)
let actions: [ViewSelectorAction] = [
ViewSelectorAction(title: maxTitle.uppercased(), selector: #selector(toolBar.actionSelect100)),
ViewSelectorAction(title: "75%", selector: #selector(toolBar.actionSelect75)),
ViewSelectorAction(title: "50%", selector: #selector(toolBar.actionSelect50)),
ViewSelectorAction(title: "25%", selector: #selector(toolBar.actionSelect25))
Expand Down
12 changes: 7 additions & 5 deletions fearless/Modules/CrossChain/CrossChainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ final class CrossChainViewController: UIViewController, ViewHolder, HiddableBarW
// MARK: - Private methods

private func configure() {
hideKeyboardWhenTappedAround()

rootView.amountView.selectHandler = { [weak self] in
self?.output.didTapSelectAsset()
}
Expand All @@ -101,11 +103,11 @@ final class CrossChainViewController: UIViewController, ViewHolder, HiddableBarW
self?.output.didTapPasteButton()
}

let locale = localizationManager?.selectedLocale ?? Locale.current
let accessoryView = UIFactory
.default
.createAmountAccessoryView(for: self, locale: locale)
rootView.amountView.textField.inputAccessoryView = accessoryView
// let locale = localizationManager?.selectedLocale ?? Locale.current
// let accessoryView = UIFactory
// .default
// .createAmountAccessoryView(for: self, locale: locale)
// rootView.amountView.textField.inputAccessoryView = accessoryView
rootView.amountView.textField.delegate = self
rootView.searchView.textField.delegate = self
updatePreviewButton()
Expand Down

0 comments on commit 321c3a5

Please sign in to comment.