LiveLocationSharingViewerViewState: Add location sharing ended flag.

This commit is contained in:
SBiOSoftWhare
2022-07-28 09:25:30 +02:00
parent e5603415a3
commit a6c43cf4f6
@@ -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]
@@ -48,6 +48,15 @@ struct LiveLocationSharingViewerViewState: BindableState {
var shareButtonEnabled: Bool {
!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>()