From 943994fdb10150726d2c3e332dfe59910a06d6e2 Mon Sep 17 00:00:00 2001 From: mltokky Date: Fri, 16 Aug 2024 23:11:42 +0900 Subject: [PATCH] Impl session message in list view --- .../ic_info_fill.imageset/Contents.json | 12 ++++++++++++ .../Media.xcassets/ic_info_fill.imageset/info.svg | 8 ++++++++ .../CommonComponents/Timetable/TimetableCard.swift | 11 +++++++++++ 3 files changed, 31 insertions(+) create mode 100644 app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json create mode 100644 app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/info.svg diff --git a/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json b/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json new file mode 100644 index 000000000..adcd08a2b --- /dev/null +++ b/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "info.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/info.svg b/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/info.svg new file mode 100644 index 000000000..f6a9757ff --- /dev/null +++ b/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/info.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/app-ios/Sources/CommonComponents/Timetable/TimetableCard.swift b/app-ios/Sources/CommonComponents/Timetable/TimetableCard.swift index a89cb95ec..3afe811a2 100644 --- a/app-ios/Sources/CommonComponents/Timetable/TimetableCard.swift +++ b/app-ios/Sources/CommonComponents/Timetable/TimetableCard.swift @@ -72,6 +72,17 @@ public struct TimetableCard: View { .lineLimit(1) } } + if let timetableItemSession = timetableItem as? TimetableItem.Session, + let sessionMessage = timetableItemSession.message?.currentLangTitle, + !sessionMessage.isEmpty { + HStack(spacing: 8) { + Image(.icInfoFill) + Text(sessionMessage) + .textStyle(.bodySmall) + .multilineTextAlignment(.leading) + .foregroundStyle(AssetColors.Error.error.swiftUIColor) + } + } } .frame(maxWidth: .infinity) .padding(12)