From 5852413092b796eacc9db12a88ecb10b5115ac92 Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Sat, 28 Sep 2024 13:56:45 +0900 Subject: [PATCH] =?UTF-8?q?Smart=20Stack=E9=80=9A=E9=81=8E=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RideSessionActivity.swift | 70 ++++++++++++------- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/ios/RideSessionActivity/RideSessionActivity.swift b/ios/RideSessionActivity/RideSessionActivity.swift index 8ab7cf677..560601dbe 100644 --- a/ios/RideSessionActivity/RideSessionActivity.swift +++ b/ios/RideSessionActivity/RideSessionActivity.swift @@ -401,33 +401,55 @@ struct SmartStackLiveActivityContentView: View { .multilineTextAlignment(.leading) .opacity(0.75) } - - Text( - getRunningStateText( - approaching: context.state.approaching, - stopped: context.state.stopped, - isNextLastStop: context.state.isNextLastStop + + if context.state.passingStationName.isEmpty { + Text( + getRunningStateText( + approaching: context.state.approaching, + stopped: context.state.stopped, + isNextLastStop: context.state.isNextLastStop + ) ) - ) - .font(.callout) - .bold() - .multilineTextAlignment(.leading) - - Text( - context.state.stopped + .font(.callout) + .bold() + .multilineTextAlignment(.leading) + + Text( + context.state.stopped ? context.state.stationName : context.state.nextStationName - ) - .font(.headline) - .bold() - .multilineTextAlignment(.leading) - Text( - context.state.stopped + ) + .font(.headline) + .bold() + .multilineTextAlignment(.leading) + Text( + context.state.stopped ? context.state.stationNumber : context.state.nextStationNumber - ) - .font(.caption) - .bold() - .opacity(0.75) - .multilineTextAlignment(.leading) + ) + .font(.caption) + .bold() + .opacity(0.75) + .multilineTextAlignment(.leading) + } else { + Text("pass") + .font(.callout) + .bold() + .multilineTextAlignment(.leading) + + Text( + context.state.passingStationName + ) + .font(.headline) + .bold() + .multilineTextAlignment(.leading) + + Text( + context.state.passingStationNumber + ) + .font(.caption) + .bold() + .opacity(0.75) + .multilineTextAlignment(.leading) + } } .frame( minWidth: 0,