NetNewsWire/Frameworks/Database/UnreadCountDictionary.swift

31 lines
496 B
Swift

//
// UnreadCountDictionary.swift
// Database
//
// Created by Brent Simmons on 8/31/17.
// Copyright © 2017 Ranchero Software. All rights reserved.
//
import Foundation
import Data
public struct UnreadCountDictionary {
private var dictionary = [String: Int]()
subscript(_ feedID: String) -> Int? {
get {
return dictionary[feedID]
}
set {
dictionary[feedID] = newValue
}
}
public subscript(_ feed: Feed) -> Int? {
get {
return dictionary[feed.feedID]
}
}
}