force the timeline to render as expired as soon as the stop button is pressed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user