[CHANGE] Fetch news when NewsView appears

This commit is contained in:
Fabian Thies
2022-12-12 19:16:36 +01:00
parent 4a3343fe61
commit 294ba12391
2 changed files with 28 additions and 0 deletions

View File

@@ -98,3 +98,11 @@ extension URL: Identifiable {
// NewsItemView()
// }
//}
extension NewsItemView: Equatable {
/// Prevent re-rendering of the view if the parameters didn't change
static func == (lhs: NewsItemView, rhs: NewsItemView) -> Bool {
lhs.newsItem.identifier == rhs.newsItem.identifier
}
}