NetNewsWire/Frameworks/ArticlesDatabase/UnreadCountDictionary.swift

29 lines
476 B
Swift
Raw Normal View History

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
import Articles
2017-08-31 22:35:48 +02:00
public struct UnreadCountDictionary {
private var dictionary = [String: Int]()
public var isEmpty: Bool {
return dictionary.count < 1
}
2017-08-31 22:35:48 +02:00
public subscript(_ feedID: String) -> Int? {
2017-08-31 22:35:48 +02:00
get {
return dictionary[feedID]
}
set {
dictionary[feedID] = newValue
}
}
}