Skip to content

Commit

Permalink
Fix bug that not display session message
Browse files Browse the repository at this point in the history
  • Loading branch information
shin-usu committed Sep 10, 2024
1 parent 2daf030 commit da6e363
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app-ios/Sources/CommonComponents/Timetable/TimetableCard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@ public struct TimetableCard: View {
.lineLimit(1)
}
}
if let timetableItemSession = timetableItem as? TimetableItem.Session,
let sessionMessage = timetableItemSession.message?.currentLangTitle,
!sessionMessage.isEmpty {

let message: String? = switch timetableItem {
case let session as TimetableItem.Session: session.message?.currentLangTitle
case let special as TimetableItem.Special: special.message?.currentLangTitle
default: nil
}
if let message, !message.isEmpty {
HStack(spacing: 8) {
Image(.icInfoFill)
Text(sessionMessage)
Text(message)
.textStyle(.bodySmall)
.multilineTextAlignment(.leading)
.foregroundStyle(AssetColors.Error.error.swiftUIColor)
Expand Down

0 comments on commit da6e363

Please sign in to comment.