Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoang Pham committed Oct 23, 2024
1 parent 9cb2778 commit 24ed27e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import UIKit

public struct UpsaleVisibilityChoiceModel: Hashable {
// let category: UpsaleVisibilityResponse.Category?
let title: String
let description: String?
let specificationUrn: String?
Expand All @@ -17,14 +16,4 @@ public struct UpsaleVisibilityChoiceModel: Hashable {
self.specificationUrn = specificationUrn
self.icon = icon
}

// init() {
// self.init(
// category: response.category,
// title: response.heading,
// price: response.price?.actual,
// description: response.description,
// specificationUrn: response.specificationUrn
// )
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ struct ExtraVisibilityProductView: View {
title: "adIn.userAdManagement.upsale.extra.title",
buttonTitle: "adIn.userAdManagement.upsale.extra.button.title",
productModels: [UpsaleVisibilityChoiceModel(
// category: .bump,
title: "Anbefalte annonser",
price: "119 kr",
description: "Økt synlighet blant lignende annonser - 7 dager",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ public struct SelectedProductsModel: Hashable {
let innerProducts: [UpsaleVisibilityModel]?
let product: UpsaleVisibilityModel?

// init(response: UpsaleVisibilityResponse.SelectedProduct) {
// if let selectedProducts = response.selectedProducts {
// self.name = response.name
// self.innerProducts = selectedProducts.map { UpsaleVisibilityModel(response: $0) }
// } else {
// self.product = UpsaleVisibilityModel(response: response)
// }
// }

public init(name: String?, innerProducts: [UpsaleVisibilityModel]?, product: UpsaleVisibilityModel?) {
self.name = name
self.product = product
Expand All @@ -24,25 +15,12 @@ public struct SelectedProductsModel: Hashable {
public struct UpsaleVisibilityModel: Hashable {
let title: String
let description: String?
// var category: UpsaleVisibilityResponse.Category?
let durationRemaining: CGFloat?
let icon: UIImage?

// init() {
// self.title = response.name
// // Backend srvice(s) require time to update these fields.
// // To mitigate this we try to present any of the received fields with `salesFrontDescription` having the highest priority.
// self.description = response.salesFrontDescription ??
// response.formattedDurationRemaining ??
// response.formattedStart
// self.category = response.category
// self.durationRemaining = CGFloat((response.percentageDurationRemaining ?? 100) / 100)
// }

public init(title: String, description: String?, durationRemaining: CGFloat?, icon: UIImage?) {
self.title = title
self.description = description
// self.category = category
self.durationRemaining = durationRemaining
self.icon = icon
}
Expand Down

0 comments on commit 24ed27e

Please sign in to comment.