//
//  HashtagSearchResultsViewController.swift
//  Tusker
//
//  Created by Shadowfacts on 1/24/21.
//  Copyright © 2021 Shadowfacts. All rights reserved.
//

import UIKit

class HashtagSearchResultsViewController: SearchResultsViewController {
    
    init(mastodonController: MastodonController) {
        super.init(mastodonController: mastodonController, scope: .hashtags)
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func performSearch(query: String?) {
        if let query = query, !query.starts(with: "#") {
            super.performSearch(query: "#\(query)")
        } else {
            super.performSearch(query: query)
        }
    }
    
}
