Skip to content

Commit

Permalink
Merge pull request #256 from ivpn/task/update-account-screen
Browse files Browse the repository at this point in the history
Update account screen
  • Loading branch information
jurajhilje authored May 16, 2022
2 parents e8a57c0 + eccdcfa commit 34058c1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 127 deletions.
8 changes: 0 additions & 8 deletions IVPNClient/Scenes/AccountScreen/AccountViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,6 @@ class AccountViewController: UITableViewController {
extension AccountViewController {

override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 && serviceType == .standard {
return 220
}

if indexPath.row == 0 && serviceType == .pro {
return 150
}

return 71
}

Expand Down
12 changes: 0 additions & 12 deletions IVPNClient/Scenes/AccountScreen/View/AccountView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ class AccountView: UITableView {
@IBOutlet weak var subscriptionLabel: UILabel!
@IBOutlet weak var activeUntilLabel: UILabel!
@IBOutlet weak var logOutActionButton: UIButton!
@IBOutlet weak var planLabel: UILabel!
@IBOutlet weak var planDescriptionHeightConstraint: NSLayoutConstraint!
@IBOutlet weak var addMoreTimeButton: UIButton!

// MARK: - Properties -
Expand All @@ -49,17 +47,7 @@ class AccountView: UITableView {
statusLabel.backgroundColor = viewModel.statusColor
subscriptionLabel.text = viewModel.subscriptionText
activeUntilLabel.text = viewModel.activeUntilText
planLabel.textColor = .white
addMoreTimeButton.isHidden = Application.shared.serviceStatus.isLegacyAccount()

switch serviceType {
case .standard:
break
case .pro:
planLabel.text = "Login to the website to change subscription plan"
planLabel.font = .systemFont(ofSize: 12, weight: .regular)
planDescriptionHeightConstraint.constant = 58
}
}

func initQRCode(viewModel: AccountViewModel) {
Expand Down
Loading

0 comments on commit 34058c1

Please sign in to comment.