Merge pull request #369 from James-Sangalli/remove-unused-fields-in-ticket-row

Remove unused fields in shared TicketRowView class
pull/370/head
James Sangalli 7 years ago committed by GitHub
commit d6153abdc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Trust/Market/ViewControllers/ImportTicketViewController.swift
  2. 18
      Trust/Market/ViewModels/ImportTicketViewControllerViewModel.swift
  3. 4
      Trust/Redeem/ViewControllers/RedeemTicketsQuantitySelectionViewController.swift
  4. 6
      Trust/Redeem/ViewControllers/TicketRedemptionViewController.swift
  5. 8
      Trust/Redeem/ViewModels/BaseTicketTableViewCellViewModel.swift
  6. 8
      Trust/Redeem/ViewModels/RedeemTicketsQuantitySelectionViewModel.swift
  7. 8
      Trust/Redeem/ViewModels/TicketRedemptionViewModel.swift
  8. 10
      Trust/Redeem/Views/TicketRowView.swift
  9. 4
      Trust/Sell/ViewControllers/EnterSellTicketsPriceQuantityViewController.swift
  10. 4
      Trust/Sell/ViewControllers/SetSellTicketsExpiryDateViewController.swift
  11. 8
      Trust/Sell/ViewModels/EnterSellTicketsPriceQuantityViewControllerViewModel.swift
  12. 8
      Trust/Sell/ViewModels/SetSellTicketsExpiryDateViewControllerViewModel.swift
  13. 4
      Trust/Tokens/Views/BaseTicketTableViewCell.swift
  14. 4
      Trust/Transfer/ViewControllers/ChooseTicketTransferModeViewController.swift
  15. 4
      Trust/Transfer/ViewControllers/SetTransferTicketsExpiryDateViewController.swift
  16. 4
      Trust/Transfer/ViewControllers/TransferTicketsQuantitySelectionViewController.swift
  17. 4
      Trust/Transfer/ViewControllers/TransferTicketsViaWalletAddressViewController.swift
  18. 8
      Trust/Transfer/ViewModels/ChooseTicketTransferModeViewControllerViewModel.swift
  19. 8
      Trust/Transfer/ViewModels/SetTransferTicketsExpiryDateViewControllerViewModel.swift
  20. 8
      Trust/Transfer/ViewModels/TransferTicketsQuantitySelectionViewModel.swift
  21. 4
      Trust/Transfer/ViewModels/TransferTicketsViaWalletAddressViewControllerViewModel.swift

@ -158,10 +158,8 @@ class ImportTicketViewController: UIViewController {
ticketView.stateLabel.isHidden = true
ticketView.ticketCountLabel.text = viewModel.ticketCount
ticketView.titleLabel.text = viewModel.title
ticketView.venueLabel.text = viewModel.venue
ticketView.dateLabel.text = viewModel.date
ticketView.seatRangeLabel.text = viewModel.seatRange
ticketView.cityLabel.text = viewModel.city
ticketView.categoryLabel.text = viewModel.category
ticketView.timeLabel.text = viewModel.time

@ -66,24 +66,6 @@ struct ImportTicketViewControllerViewModel {
}
}
var title: String {
guard let ticketHolder = ticketHolder else { return "" }
if case let .validating = state {
return ""
} else {
return ticketHolder.name
}
}
var seatRange: String {
guard let ticketHolder = ticketHolder else { return "" }
if case let .validating = state {
return ""
} else {
return ticketHolder.seatRange
}
}
var city: String {
guard let ticketHolder = ticketHolder else { return "" }
if case let .validating = state {

@ -140,14 +140,10 @@ class RedeemTicketsQuantitySelectionViewController: UIViewController {
ticketView.ticketCountLabel.text = viewModel.ticketCount
ticketView.titleLabel.text = viewModel.title
ticketView.venueLabel.text = viewModel.venue
ticketView.dateLabel.text = viewModel.date
ticketView.seatRangeLabel.text = viewModel.seatRange
ticketView.cityLabel.text = viewModel.city
ticketView.categoryLabel.text = viewModel.category

@ -155,14 +155,8 @@ class TicketRedemptionViewController: UIViewController {
ticketView.ticketCountLabel.text = viewModel.ticketCount
ticketView.titleLabel.text = viewModel.title
ticketView.venueLabel.text = viewModel.venue
ticketView.dateLabel.text = viewModel.date
ticketView.seatRangeLabel.text = viewModel.seatRange
ticketView.cityLabel.text = viewModel.city
ticketView.categoryLabel.text = viewModel.category

@ -15,14 +15,6 @@ struct BaseTicketTableViewCellViewModel {
return "x\(ticketHolder.tickets.count)"
}
var title: String {
return ticketHolder.name
}
var seatRange: String {
return ticketHolder.seatRange
}
var city: String {
return ticketHolder.city
}

@ -54,14 +54,6 @@ struct RedeemTicketsQuantitySelectionViewModel {
return "x\(ticketHolder.tickets.count)"
}
var title: String {
return ticketHolder.name
}
var seatRange: String {
return ticketHolder.seatRange
}
var city: String {
return ticketHolder.city
}

@ -33,14 +33,6 @@ struct TicketRedemptionViewModel {
return "x\(ticketHolder.tickets.count)"
}
var title: String {
return ticketHolder.name
}
var seatRange: String {
return ticketHolder.seatRange
}
var city: String {
return ticketHolder.city
}

@ -7,12 +7,8 @@ class TicketRowView: UIView {
let background = UIView()
let stateLabel = UILabel()
let ticketCountLabel = UILabel()
//TODO not used anymore?
let titleLabel = UILabel()
let venueLabel = UILabel()
let dateLabel = UILabel()
//TODO not used anymore?
let seatRangeLabel = UILabel()
let categoryLabel = UILabel()
let matchLabel = UILabel()
let dateImageView = UIImageView()
@ -121,18 +117,12 @@ class TicketRowView: UIView {
ticketCountLabel.textColor = viewModel.countColor
ticketCountLabel.font = viewModel.ticketCountFont
titleLabel.textColor = viewModel.titleColor
titleLabel.font = viewModel.titleFont
venueLabel.textColor = viewModel.titleColor
venueLabel.font = viewModel.venueFont
dateLabel.textColor = viewModel.subtitleColor
dateLabel.font = viewModel.subtitleFont
seatRangeLabel.textColor = viewModel.subtitleColor
seatRangeLabel.font = viewModel.subtitleFont
categoryLabel.textColor = viewModel.titleColor
categoryLabel.font = viewModel.titleFont

@ -298,14 +298,10 @@ class EnterSellTicketsPriceQuantityViewController: UIViewController {
ticketView.ticketCountLabel.text = viewModel.ticketCount
ticketView.titleLabel.text = viewModel.title
ticketView.venueLabel.text = viewModel.venue
ticketView.dateLabel.text = viewModel.date
ticketView.seatRangeLabel.text = viewModel.seatRange
ticketView.cityLabel.text = viewModel.city
ticketView.categoryLabel.text = viewModel.category

@ -294,14 +294,10 @@ class SetSellTicketsExpiryDateViewController: UIViewController {
ticketView.ticketCountLabel.text = viewModel.ticketCountString
ticketView.titleLabel.text = viewModel.title
ticketView.venueLabel.text = viewModel.venue
ticketView.dateLabel.text = viewModel.date
ticketView.seatRangeLabel.text = viewModel.seatRange
ticketView.cityLabel.text = viewModel.city
ticketView.categoryLabel.text = viewModel.category

@ -50,14 +50,6 @@ struct EnterSellTicketsPriceQuantityViewControllerViewModel {
return "x\(ticketHolder.tickets.count)"
}
var title: String {
return ticketHolder.name
}
var seatRange: String {
return ticketHolder.seatRange
}
var city: String {
return ticketHolder.city
}

@ -41,14 +41,6 @@ struct SetSellTicketsExpiryDateViewControllerViewModel {
return "x\(ticketHolder.tickets.count)"
}
var title: String {
return ticketHolder.name
}
var seatRange: String {
return ticketHolder.seatRange
}
var city: String {
return ticketHolder.city
}

@ -43,14 +43,10 @@ class BaseTicketTableViewCell: UITableViewCell {
rowView.ticketCountLabel.text = viewModel.ticketCount
rowView.titleLabel.text = viewModel.title
rowView.venueLabel.text = viewModel.venue
rowView.dateLabel.text = viewModel.date
rowView.seatRangeLabel.text = viewModel.seatRange
rowView.cityLabel.text = ", \(viewModel.city)"
rowView.categoryLabel.text = viewModel.category

@ -124,14 +124,10 @@ class ChooseTicketTransferModeViewController: UIViewController {
ticketView.ticketCountLabel.text = viewModel.ticketCount
ticketView.titleLabel.text = viewModel.title
ticketView.venueLabel.text = viewModel.venue
ticketView.dateLabel.text = viewModel.date
ticketView.seatRangeLabel.text = viewModel.seatRange
ticketView.cityLabel.text = viewModel.city
ticketView.categoryLabel.text = viewModel.category

@ -255,14 +255,10 @@ class SetTransferTicketsExpiryDateViewController: UIViewController {
ticketView.ticketCountLabel.text = viewModel.ticketCount
ticketView.titleLabel.text = viewModel.title
ticketView.venueLabel.text = viewModel.venue
ticketView.dateLabel.text = viewModel.date
ticketView.seatRangeLabel.text = viewModel.seatRange
ticketView.cityLabel.text = viewModel.city
ticketView.categoryLabel.text = viewModel.category

@ -136,14 +136,10 @@ class TransferTicketsQuantitySelectionViewController: UIViewController {
ticketView.ticketCountLabel.text = viewModel.ticketCount
ticketView.titleLabel.text = viewModel.title
ticketView.venueLabel.text = viewModel.venue
ticketView.dateLabel.text = viewModel.date
ticketView.seatRangeLabel.text = viewModel.seatRange
ticketView.cityLabel.text = viewModel.city
ticketView.categoryLabel.text = viewModel.category

@ -119,14 +119,10 @@ class TransferTicketsViaWalletAddressViewController: UIViewController {
ticketView.ticketCountLabel.text = viewModel.ticketCount
ticketView.titleLabel.text = viewModel.title
ticketView.venueLabel.text = viewModel.venue
ticketView.dateLabel.text = viewModel.date
ticketView.seatRangeLabel.text = viewModel.seatRange
ticketView.cityLabel.text = viewModel.city
ticketView.categoryLabel.text = viewModel.category

@ -36,14 +36,6 @@ struct ChooseTicketTransferModeViewControllerViewModel {
return "x\(ticketHolder.tickets.count)"
}
var title: String {
return ticketHolder.name
}
var seatRange: String {
return ticketHolder.seatRange
}
var city: String {
return ticketHolder.city
}

@ -32,14 +32,6 @@ struct SetTransferTicketsExpiryDateViewControllerViewModel {
return "x\(ticketHolder.tickets.count)"
}
var title: String {
return ticketHolder.name
}
var seatRange: String {
return ticketHolder.seatRange
}
var city: String {
return ticketHolder.city
}

@ -48,14 +48,6 @@ struct TransferTicketsQuantitySelectionViewModel {
return "x\(ticketHolder.tickets.count)"
}
var title: String {
return ticketHolder.name
}
var seatRange: String {
return ticketHolder.seatRange
}
var city: String {
return ticketHolder.city
}

@ -32,10 +32,6 @@ struct TransferTicketsViaWalletAddressViewControllerViewModel {
return "x\(ticketHolder.tickets.count)"
}
var title: String {
return ticketHolder.name
}
var seatRange: String {
return ticketHolder.seatRange
}

Loading…
Cancel
Save