<commit_before>//
//  StoresTableViewController.swift
//  BlackNectar
//
//  Created by <NAME> on 11/28/16.
//  Copyright © 2017 BlackSource. All rights reserved.
//

import Archeota
import AromaSwiftClient
import CoreLocation
import Foundation
import Kingfisher
import MapKit
import MessageUI
import UIKit

class StoresTableViewController: UITableViewController, FilterDelegate, UIGestureRecognizerDelegate {
    
    var showFarmersMarkets: Bool {
        return UserPreferences.instance.showFarmersMarkets
    }
    
    var showStores: Bool {
        return UserPreferences.instance.showStores
    }
    
    var useMyLocation: Bool {
        return UserPreferences.instance.useMyLocation
    }
    
    var useZipCode: Bool {
        return UserPreferences.instance.useZipCode
    }
    
    var zipCode: String {
        return UserPreferences.instance.zipCode ?? ""
    }
    
    var isFirstTimeUser: Bool {
        
        get {
            
            return UserPreferences.instance.isFirstTimeUser
        }
        
        set(newValue) {
            
            UserPreferences.instance.isFirstTimeUser = newValue
        }
    }
    
    var stores: [Store] = []
    
    let async: OperationQueue = {
        
        let operationQueue = OperationQueue()
        operationQueue.maxConcurrentOperationCount = 10
        
        return operationQueue
        
    }()
    
    fileprivate let main = OperationQueue.main
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        setupRefreshControl()
        
        //tableView.rowHeight = UITableViewAutomaticDimension
        
        if isFirstTimeUser {
            goToWelcomeScreen()
        }
        else {
            UserLocation.instance.initialize()
            reloadStoreData()
        }
        
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
    }
    
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        
    }
    
}

//MARK: Filter Delegate 
extension StoresTableViewController {<commit_msg>Removes Unneeded Code<commit_after>//
//  StoresTableViewController.swift
//  BlackNectar
//
//  Created by <NAME> on 11/28/16.
//  Copyright © 2017 BlackSource. All rights reserved.
//

import Archeota
import AromaSwiftClient
import CoreLocation
import Foundation
import Kingfisher
import MapKit
import MessageUI
import UIKit

class StoresTableViewController: UITableViewController, FilterDelegate, UIGestureRecognizerDelegate {
    
    var showFarmersMarkets: Bool {
        return UserPreferences.instance.showFarmersMarkets
    }
    
    var showStores: Bool {
        return UserPreferences.instance.showStores
    }
    
    var useMyLocation: Bool {
        return UserPreferences.instance.useMyLocation
    }
    
    var useZipCode: Bool {
        return UserPreferences.instance.useZipCode
    }
    
    var zipCode: String {
        return UserPreferences.instance.zipCode ?? ""
    }
    
    var isFirstTimeUser: Bool {
        
        get {
            
            return UserPreferences.instance.isFirstTimeUser
        }
        
        set(newValue) {
            
            UserPreferences.instance.isFirstTimeUser = newValue
        }
    }
    
    var stores: [Store] = []
    
    let async: OperationQueue = {
        
        let operationQueue = OperationQueue()
        operationQueue.maxConcurrentOperationCount = 10
        
        return operationQueue
        
    }()
    
    fileprivate let main = OperationQueue.main
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        setupRefreshControl()
        
        if isFirstTimeUser {
            goToWelcomeScreen()
        }
        else {
            UserLocation.instance.initialize()
            reloadStoreData()
        }
        
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
    }
    
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        
    }
    
}

//MARK: Filter Delegate 
extension StoresTableViewController {
{'fraction_non_alphanumeric': 0.06518092499400911, 'fraction_numerical': 0.005751258087706686, 'mean_word_length': 1.9270687237026647, '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': '3310913', 'n_tokens_mistral': 1182, 'n_tokens_neox': 1109, 'n_words': 234}