Skip to content

Commit 6796b42

Browse files
committed
small fixes
1 parent 1330869 commit 6796b42

File tree

5 files changed

+117
-28
lines changed

5 files changed

+117
-28
lines changed

BeamWallet.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3959,7 +3959,7 @@
39593959
CODE_SIGN_ENTITLEMENTS = Resources/BeamWalletTestNet.entitlements;
39603960
CODE_SIGN_IDENTITY = "iPhone Developer";
39613961
CODE_SIGN_STYLE = Automatic;
3962-
CURRENT_PROJECT_VERSION = 1;
3962+
CURRENT_PROJECT_VERSION = 2;
39633963
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
39643964
DEVELOPMENT_TEAM = KNU2R94BJK;
39653965
ENABLE_BITCODE = NO;
@@ -4042,7 +4042,7 @@
40424042
CODE_SIGN_ENTITLEMENTS = Resources/BeamWalletTestNet.entitlements;
40434043
CODE_SIGN_IDENTITY = "iPhone Developer";
40444044
CODE_SIGN_STYLE = Automatic;
4045-
CURRENT_PROJECT_VERSION = 1;
4045+
CURRENT_PROJECT_VERSION = 2;
40464046
DEVELOPMENT_TEAM = KNU2R94BJK;
40474047
ENABLE_BITCODE = NO;
40484048
FRAMEWORK_SEARCH_PATHS = (

BeamWallet/Extensions/View.swift

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,3 +384,28 @@ extension UIView {
384384

385385
}
386386

387+
extension UIView {
388+
389+
public func removeAllConstraints() {
390+
var _superview = self.superview
391+
392+
while let superview = _superview {
393+
for constraint in superview.constraints {
394+
395+
if let first = constraint.firstItem as? UIView, first == self {
396+
superview.removeConstraint(constraint)
397+
}
398+
399+
if let second = constraint.secondItem as? UIView, second == self {
400+
superview.removeConstraint(constraint)
401+
}
402+
}
403+
404+
_superview = superview.superview
405+
}
406+
407+
// self.removeConstraints(self.constraints)
408+
// self.translatesAutoresizingMaskIntoConstraints = false
409+
}
410+
}
411+

BeamWallet/Model/Settings/SettingsViewModel.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class SettingsViewModel: NSObject {
5858
case imprt = 25
5959
case create_category = 26
6060
case open_category = 27
61+
case random_node = 28
6162
}
6263

6364
class SettingsItem {
@@ -151,7 +152,7 @@ class SettingsViewModel: NSObject {
151152
items.append(section_1)
152153
case .node:
153154
var section_0 = [SettingsItem]()
154-
section_0.append(SettingsItem(title: Localizable.shared.strings.random_node, detail: nil, isSwitch: Settings.sharedManager().connectToRandomNode, type: .node, hasArrow: false))
155+
section_0.append(SettingsItem(title: Localizable.shared.strings.random_node, detail: nil, isSwitch: Settings.sharedManager().connectToRandomNode, type: .random_node, hasArrow: false))
155156
section_0.append(SettingsItem(title: Localizable.shared.strings.ip_port, detail: Settings.sharedManager().nodeAddress, isSwitch: nil, type: .ip_port, hasArrow: true))
156157
items.append(section_0)
157158
case .privacy:

BeamWallet/ViewControllers/Main/Wallet/Transaction/TransactionShareView.swift

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,22 @@ class TransactionShareView: UIView {
2323

2424
@IBOutlet private weak var mainView: UIView!
2525

26+
@IBOutlet private weak var amountStackView: UIStackView!
27+
@IBOutlet private weak var statusView: UIView!
28+
@IBOutlet private weak var centeredStatusView: UIView!
29+
@IBOutlet private weak var topView: UIView!
30+
2631
@IBOutlet private weak var bgView: UIImageView!
2732
@IBOutlet private weak var titleLabel: UILabel!
2833
@IBOutlet private weak var dateLabel: UILabel!
2934

3035
@IBOutlet private weak var amountLabel: UILabel!
3136
@IBOutlet private weak var typeLabel: UILabel!
3237
@IBOutlet private weak var currencyIcon: UIImageView!
33-
3438
@IBOutlet private weak var statusIcon: UIImageView!
39+
40+
@IBOutlet private weak var centeredTypeLabel: UILabel!
41+
@IBOutlet private weak var centeredStatusIcon: UIImageView!
3542

3643
@IBOutlet private weak var senderTitleLabel: UILabel!
3744
@IBOutlet private weak var senderValueLabel: UILabel!
@@ -70,8 +77,16 @@ class TransactionShareView: UIView {
7077
}
7178

7279
private func setupView() {
73-
statusIcon.image = transaction.statusIcon()
80+
amountStackView.isHidden = Settings.sharedManager().isHideAmounts
7481

82+
if Settings.sharedManager().isHideAmounts {
83+
statusView.isHidden = true
84+
centeredStatusView.isHidden = false
85+
}
86+
87+
statusIcon.image = transaction.statusIcon()
88+
centeredStatusIcon.image = transaction.statusIcon()
89+
7590
currencyIcon.image = IconSymbolBeam()?.withRenderingMode(.alwaysTemplate)
7691
currencyIcon.tintAdjustmentMode = .normal
7792

@@ -84,6 +99,7 @@ class TransactionShareView: UIView {
8499
receiverValueLabel.text = transaction.receiverAddress
85100

86101
typeLabel.text = transaction.status.capitalizingFirstLetter()
102+
centeredTypeLabel.text = transaction.status.capitalizingFirstLetter()
87103

88104
if transaction.isSelf {
89105
senderTitleLabel.text = Localizable.shared.strings.my_send_address
@@ -119,6 +135,7 @@ class TransactionShareView: UIView {
119135
{
120136
typeLabel.textColor = UIColor.main.heliotrope
121137
}
138+
centeredTypeLabel.textColor = typeLabel.textColor
122139

123140
switch transaction.isIncome {
124141
case true:

0 commit comments

Comments
 (0)