Skip to content

Commit

Permalink
Merge pull request #1031 from DroidKaigi/feature/cancel_session_ios
Browse files Browse the repository at this point in the history
Fix bug that canceled special session's message is not showed
  • Loading branch information
ry-itto authored Sep 10, 2024
2 parents 92f49c7 + da6e363 commit 2ecf6bb
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 2ecf6bb

Please sign in to comment.