2018-10-17 11:46:16 +02:00
|
|
|
//
|
|
|
|
// UserDefaults.swift
|
|
|
|
// CapCollector
|
|
|
|
//
|
|
|
|
// Created by Christoph on 16.10.18.
|
|
|
|
// Copyright © 2018 CH. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
final class Persistence {
|
|
|
|
|
|
|
|
static var recognizedCapCount: Int {
|
|
|
|
get {
|
|
|
|
return UserDefaults.standard.integer(forKey: "recognizedCaps")
|
|
|
|
}
|
|
|
|
set {
|
|
|
|
UserDefaults.standard.set(newValue, forKey: "recognizedCaps")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static var newImageCount: Int {
|
|
|
|
get {
|
|
|
|
return UserDefaults.standard.integer(forKey: "newImages")
|
|
|
|
}
|
|
|
|
set {
|
|
|
|
UserDefaults.standard.set(newValue, forKey: "newImages")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-15 13:19:19 +01:00
|
|
|
static var lastUploadedCapCount: Int {
|
2018-10-17 11:46:16 +02:00
|
|
|
get {
|
2019-03-15 13:19:19 +01:00
|
|
|
return UserDefaults.standard.integer(forKey: "lastUploadedCaps")
|
2018-10-17 11:46:16 +02:00
|
|
|
}
|
|
|
|
set {
|
2019-03-15 13:19:19 +01:00
|
|
|
UserDefaults.standard.set(newValue, forKey: "lastUploadedCaps")
|
2018-10-17 11:46:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-15 13:19:19 +01:00
|
|
|
static var lastUploadedImageCount: Int {
|
2018-10-17 11:46:16 +02:00
|
|
|
get {
|
2019-03-15 13:19:19 +01:00
|
|
|
return UserDefaults.standard.integer(forKey: "lastUploadedImages")
|
2018-10-17 11:46:16 +02:00
|
|
|
}
|
|
|
|
set {
|
2019-03-15 13:19:19 +01:00
|
|
|
UserDefaults.standard.set(newValue, forKey: "lastUploadedImages")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-17 11:10:07 +02:00
|
|
|
static var useMobileNet: Bool {
|
2019-03-15 13:19:19 +01:00
|
|
|
get {
|
2019-07-17 11:10:07 +02:00
|
|
|
return UserDefaults.standard.bool(forKey: "mobileNet")
|
2019-03-15 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
set {
|
2019-07-17 11:10:07 +02:00
|
|
|
UserDefaults.standard.set(newValue, forKey: "mobileNet")
|
2018-10-17 11:46:16 +02:00
|
|
|
}
|
|
|
|
}
|
2019-04-12 13:46:18 +02:00
|
|
|
|
|
|
|
static var folderNotCreated: [Int] {
|
|
|
|
get {
|
|
|
|
return UserDefaults.standard.array(forKey: "folders") as? [Int] ?? []
|
|
|
|
}
|
|
|
|
set {
|
|
|
|
UserDefaults.standard.set(newValue, forKey: "folders")
|
|
|
|
}
|
|
|
|
}
|
2018-10-17 11:46:16 +02:00
|
|
|
}
|