LiveLocationSharingViewerViewState: Add location sharing ended flag.

This commit is contained in:
SBiOSoftWhare 2022-07-28 09:25:30 +02:00
parent 7cfcced8c1
commit e86e419d8a

View file

@ -38,7 +38,7 @@ struct LiveLocationSharingViewerViewState: BindableState {
var annotations: [UserLocationAnnotation]
/// Map annotation to focus on
var highlightedAnnotation: UserLocationAnnotation?
var highlightedAnnotation: LocationAnnotation?
/// Live location list items
var listItemsViewData: [LiveLocationListItemViewData]
@ -49,6 +49,15 @@ struct LiveLocationSharingViewerViewState: BindableState {
!showLoadingIndicator
}
/// True to indicate that everybody stopped to share live location sharing in the room
var isAllLocationSharingEnded: Bool {
return listItemsViewData.isEmpty
}
var isBottomSheetVisible: Bool {
return isAllLocationSharingEnded == false
}
let errorSubject = PassthroughSubject<LocationSharingViewError, Never>()
var bindings = LocationSharingViewStateBindings()