Skip to content

Commit

Permalink
fix color changing on CourseUpdate view
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanStepanok committed Sep 20, 2023
1 parent 9e87918 commit 5331d48
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Course/Course/Data/Model/Data_UpdatesResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down
4 changes: 2 additions & 2 deletions Course/Course/Domain/Model/CourseUpdate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?,
Expand Down Expand Up @@ -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()
Expand All @@ -122,13 +121,7 @@ public struct HandoutsUpdatesDetailView: View {
router.back()
}
Spacer(minLength: 84)

// .background(
// Theme.Colors.background
// .ignoresSafeArea()
// )
}

}
.navigationBarHidden(false)
.navigationBarBackButtonHidden(false)
Expand Down

0 comments on commit 5331d48

Please sign in to comment.