force the timeline to render as expired as soon as the stop button is pressed

This commit is contained in:
Mauro Romito
2026-04-03 15:24:15 +02:00
committed by Mauro
parent 524bef6d60
commit 2715ffdb17

View File

@@ -174,7 +174,7 @@ struct LiveLocationRoomTimelineView: View {
if isLive, timelineItem.isOutgoing {
Button {
context?.send(viewAction: .stopLiveLocationSharing)
stop()
} label: {
CompoundIcon(\.stop, size: .small, relativeTo: .compound.bodySMSemibold)
.foregroundStyle(.compound.iconOnSolidPrimary)
@@ -189,7 +189,12 @@ struct LiveLocationRoomTimelineView: View {
.background(blurBackground)
}
// MARK: - Private
private func stop() {
hasExpired = true
context?.send(viewAction: .stopLiveLocationSharing)
}
// MARK: - Constants
private let mapAspectRatio: Double = 3 / 2
private let mapMaxHeight: Double = 300