<commit_before>//
//  AppDelegate.swift
//  JenkinsiOS
//
//  Created by Robert on 23.09.16.
//  Copyright © 2016 MobiLab Solutions. All rights reserved.
//

import UIKit
import Fabric
import Crashlytics

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?
    
    func applicationDidEnterBackground(_ application: UIApplication) {
        ApplicationUserManager.manager.save()
        AccountManager.manager.save()
    }

    func applicationWillTerminate(_ application: UIApplication) {
        ApplicationUserManager.manager.save()
        AccountManager.manager.save()
    }

    func applicationDidFinishLaunching(_ application: UIApplication) {
        Fabric.with([Crashlytics.self])
        ApplicationUserManager.manager.applicationUser.timesOpenedApp += 1
        saveIndefinitely()
        handleReviewReminder()
    }
    
    func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
        
        guard let components = URLComponents(url: url, resolvingAgainstBaseURL: false)
            else { return false }
        
        guard components.host == "present", let queryItems = components.queryItems
            else { return false }
        <commit_msg>Fix issue where the navigation bar would not be shown after moving into Mail.app<commit_after>//
//  AppDelegate.swift
//  JenkinsiOS
//
//  Created by Robert on 23.09.16.
//  Copyright © 2016 MobiLab Solutions. All rights reserved.
//

import UIKit
import Fabric
import Crashlytics

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?
    
    func applicationDidEnterBackground(_ application: UIApplication) {
        ApplicationUserManager.manager.save()
        AccountManager.manager.save()
    }

    func applicationWillTerminate(_ application: UIApplication) {
        ApplicationUserManager.manager.save()
        AccountManager.manager.save()
    }

    func applicationDidFinishLaunching(_ application: UIApplication) {
        Fabric.with([Crashlytics.self])
        ApplicationUserManager.manager.applicationUser.timesOpenedApp += 1
        saveIndefinitely()
        handleReviewReminder()
    }
    
    func applicationDidBecomeActive(_ application: UIApplication){
        (window?.rootViewController as? UINavigationController)?.setNavigationBarHidden(false, animated: true)
    }
    
    func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
        
        guard let components = URLComponents(url: url, resolvingAgainstBaseURL: false)
            else { return false }
        
        guard components.host == "present", let queryItems = components.queryItems
            else { return false }
        
{'fraction_non_alphanumeric': 0.08457183297947629, 'fraction_numerical': 0.00778485491861288, 'mean_word_length': 3.0617816091954024, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2617028', 'n_tokens_mistral': 766, 'n_tokens_neox': 720, 'n_words': 184}