Checking inactive state before loading to handle timed out live without location
This commit is contained in:
parent
b0c1ca87df
commit
370b6a81bc
|
@ -111,8 +111,8 @@ class LiveLocationShareMessageItemFactory @Inject constructor(
|
|||
private fun getViewState(liveLocationShareSummaryData: LiveLocationShareSummaryData?): LiveLocationShareViewState {
|
||||
return when {
|
||||
liveLocationShareSummaryData?.isActive == null -> LiveLocationShareViewState.Unkwown
|
||||
liveLocationShareSummaryData.isActive && liveLocationShareSummaryData.lastGeoUri.isNullOrEmpty() -> LiveLocationShareViewState.Loading
|
||||
liveLocationShareSummaryData.isActive.not() || isLiveTimedOut(liveLocationShareSummaryData) -> LiveLocationShareViewState.Inactive
|
||||
liveLocationShareSummaryData.isActive && liveLocationShareSummaryData.lastGeoUri.isNullOrEmpty() -> LiveLocationShareViewState.Loading
|
||||
else ->
|
||||
LiveLocationShareViewState.Running(
|
||||
liveLocationShareSummaryData.lastGeoUri.orEmpty(),
|
||||
|
|
Loading…
Reference in New Issue