2017-08-31 22:35:48 +02:00
|
|
|
//
|
|
|
|
// UnreadCountDictionary.swift
|
|
|
|
// Database
|
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 8/31/17.
|
|
|
|
// Copyright © 2017 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2018-07-24 03:29:08 +02:00
|
|
|
import Articles
|
2017-08-31 22:35:48 +02:00
|
|
|
|
|
|
|
public struct UnreadCountDictionary {
|
|
|
|
|
|
|
|
private var dictionary = [String: Int]()
|
2017-12-03 20:57:53 +01:00
|
|
|
|
|
|
|
public var isEmpty: Bool {
|
|
|
|
return dictionary.count < 1
|
|
|
|
}
|
2017-08-31 22:35:48 +02:00
|
|
|
|
2018-07-28 21:16:14 +02:00
|
|
|
public subscript(_ feedID: String) -> Int? {
|
2017-08-31 22:35:48 +02:00
|
|
|
get {
|
|
|
|
return dictionary[feedID]
|
|
|
|
}
|
|
|
|
set {
|
|
|
|
dictionary[feedID] = newValue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|