diff --git a/Course/Course/Data/Model/Data_UpdatesResponse.swift b/Course/Course/Data/Model/Data_UpdatesResponse.swift index 88cdc883f..bb9824e7b 100644 --- a/Course/Course/Data/Model/Data_UpdatesResponse.swift +++ b/Course/Course/Data/Model/Data_UpdatesResponse.swift @@ -13,7 +13,7 @@ public extension DataLayer { public let id: Int public let date: String public let content: String - public let status: String + public let status: String? } typealias CourseUpdates = [CourseUpdate] } diff --git a/Course/Course/Domain/Model/CourseUpdate.swift b/Course/Course/Domain/Model/CourseUpdate.swift index 345d1e2a3..2ef09f210 100644 --- a/Course/Course/Domain/Model/CourseUpdate.swift +++ b/Course/Course/Domain/Model/CourseUpdate.swift @@ -11,9 +11,9 @@ public struct CourseUpdate { public let id: Int public let date: String public var content: String - public let status: String + public let status: String? - public init(id: Int, date: String, content: String, status: String) { + public init(id: Int, date: String, content: String, status: String?) { self.id = id self.date = date self.content = content diff --git a/Course/Course/Presentation/Handouts/HandoutsUpdatesDetailView.swift b/Course/Course/Presentation/Handouts/HandoutsUpdatesDetailView.swift index efc4b2e3d..57b12b542 100644 --- a/Course/Course/Presentation/Handouts/HandoutsUpdatesDetailView.swift +++ b/Course/Course/Presentation/Handouts/HandoutsUpdatesDetailView.swift @@ -18,7 +18,6 @@ public struct HandoutsUpdatesDetailView: View { private var handouts: String? private var announcements: [CourseUpdate]? private let title: String - @State private var height: [Int: CGFloat] = [:] public init( handouts: String?, @@ -100,12 +99,12 @@ public struct HandoutsUpdatesDetailView: View { type: .discovery, screenWidth: reader.size.width ) - HTMLFormattedText( - fixBrokenLinks(in: formattedAnnouncements), - isScrollEnabled: true, - textViewHeight: $height[index] - ) - .frame(height: height[index]) + HStack { + HTMLFormattedText(formattedAnnouncements) + Spacer() + } + + .id(UUID()) if index != announcements.count - 1 { Divider() @@ -122,13 +121,7 @@ public struct HandoutsUpdatesDetailView: View { router.back() } Spacer(minLength: 84) - -// .background( -// Theme.Colors.background -// .ignoresSafeArea() -// ) } - } .navigationBarHidden(false) .navigationBarBackButtonHidden(false)