<commit_before>//
//  TKUIResultsSectionFooterView.swift
//  TripKit
//
//  Created by <NAME> on 15.06.18.
//  Copyright © 2018 SkedGo Pty Ltd. All rights reserved.
//

import UIKit

import RxSwift

class TKUIResultsSectionFooterView: UITableViewHeaderFooterView {
  
  static let reuseIdentifier = "TKUIResultsSectionFooterView"
  
  @IBOutlet weak var costLabel: UILabel!
  @IBOutlet weak var button: UIButton!
  
  var disposeBag = DisposeBag()
  
  override init(reuseIdentifier: String?) {
    super.init(reuseIdentifier: reuseIdentifier)
    didInit()
  }
  
  required init?(coder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
  }
  
  private func didInit() {
    contentView.backgroundColor = .tkBackground
    
    let costLabel = UILabel()
    costLabel.contentMode = .left
    costLabel.numberOfLines = 1
    costLabel.text = nil
    costLabel.textColor = .tkLabelSecondary
    costLabel.font = TKStyleManager.customFont(forTextStyle: .footnote)
    costLabel.translatesAutoresizingMaskIntoConstraints = false
    costLabel.setContentHuggingPriority(UILayoutPriority(251), for: .horizontal)
    costLabel.setContentCompressionResistancePriority(UILayoutPriority(750), for: .horizontal)
    self.costLabel = costLabel
    
    let button = UIButton(type: .system)
    if #available(iOSApplicationExtension 11.0, *) {
      button.contentHorizontalAlignment = .trailing
    } else {
      button.contentHorizontalAlignment = .right
    }
    // TODO: Localise or should we use "Loc.MoreResults"?
    button.setTitle("More", for: .normal)<commit_msg>version check should apply to iOS, not app extension<commit_after>//
//  TKUIResultsSectionFooterView.swift
//  TripKit
//
//  Created by <NAME> on 15.06.18.
//  Copyright © 2018 SkedGo Pty Ltd. All rights reserved.
//

import UIKit

import RxSwift

class TKUIResultsSectionFooterView: UITableViewHeaderFooterView {
  
  static let reuseIdentifier = "TKUIResultsSectionFooterView"
  
  @IBOutlet weak var costLabel: UILabel!
  @IBOutlet weak var button: UIButton!
  
  var disposeBag = DisposeBag()
  
  override init(reuseIdentifier: String?) {
    super.init(reuseIdentifier: reuseIdentifier)
    didInit()
  }
  
  required init?(coder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
  }
  
  private func didInit() {
    contentView.backgroundColor = .tkBackground
    
    let costLabel = UILabel()
    costLabel.contentMode = .left
    costLabel.numberOfLines = 1
    costLabel.text = nil
    costLabel.textColor = .tkLabelSecondary
    costLabel.font = TKStyleManager.customFont(forTextStyle: .footnote)
    costLabel.translatesAutoresizingMaskIntoConstraints = false
    costLabel.setContentHuggingPriority(UILayoutPriority(251), for: .horizontal)
    costLabel.setContentCompressionResistancePriority(UILayoutPriority(750), for: .horizontal)
    self.costLabel = costLabel
    
    let button = UIButton(type: .system)
    if #available(iOS 11.0, *) {
      button.contentHorizontalAlignment = .trailing
    } else {
      button.contentHorizontalAlignment = .right
    }
    // TODO: Localise or should we use "Loc.MoreResults"?
    button.setTitle("More", for: .normal)
{'fraction_non_alphanumeric': 0.09273813266268469, 'fraction_numerical': 0.012574662055957246, 'mean_word_length': 3.7421758569299555, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2401042', 'n_tokens_mistral': 1020, 'n_tokens_neox': 960, 'n_words': 219}