2020-11-18 03:49:12 +01:00
|
|
|
//
|
|
|
|
// WidgetData.swift
|
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Stuart Breckenridge on 18/11/20.
|
|
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
struct WidgetData: Codable {
|
|
|
|
|
|
|
|
let currentUnreadCount: Int
|
|
|
|
let currentTodayCount: Int
|
|
|
|
let currentStarredCount: Int
|
|
|
|
let unreadArticles: [LatestArticle]
|
|
|
|
let starredArticles: [LatestArticle]
|
|
|
|
let todayArticles: [LatestArticle]
|
|
|
|
let lastUpdateTime: Date
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
struct LatestArticle: Codable, Identifiable {
|
|
|
|
|
|
|
|
var id: String
|
|
|
|
let feedTitle: String
|
|
|
|
let articleTitle: String?
|
|
|
|
let articleSummary: String?
|
2022-07-07 09:14:09 +02:00
|
|
|
let feedIconPath: String? // Path to image data in shared container.
|
2020-11-18 03:49:12 +01:00
|
|
|
let pubDate: String
|
|
|
|
|
|
|
|
}
|