// // AlertsPriorityServiceTableViewCell.swift // Earthquake Network // // Created by Busi Andrea on 04/10/2020. // Copyright © 2020 Earthquake Network. All rights reserved. // import UIKit class AlertsPriorityServiceTableViewCell: EQNBaseTableViewCell { @objc var smartphoneNetwork: EQNReteSmartphone? { didSet { updateUI() } } // MARK: - Internal @IBOutlet private weak var lastSubscriptionLabel: UILabel! // MARK: - Private private func updateUI() { guard let smartphoneNetwork = smartphoneNetwork, let minutes = Int(smartphoneNetwork.diff) else { return } let formattedTime = EQNUtility.formattedString(forTimeDifference: minutes) lastSubscriptionLabel.text = String(format: NSLocalizedString("inapp_adv", comment: ""), formattedTime) } }