mirror of
https://github.com/accelforce/Yuito
synced 2025-01-21 19:55:35 +01:00
fix crash when user clicks url on in partially loaded thread (#3174)
This commit is contained in:
parent
2df6a83e42
commit
8058c4bc79
@ -180,8 +180,12 @@ class ViewThreadViewModel @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun detailedStatus(): StatusViewData.Concrete? {
|
fun detailedStatus(): StatusViewData.Concrete? {
|
||||||
return (_uiState.value as ThreadUiState.Success?)?.statusViewData?.find { status ->
|
return when (val uiState = _uiState.value) {
|
||||||
status.isDetailed
|
is ThreadUiState.Success -> uiState.statusViewData.find { status ->
|
||||||
|
status.isDetailed
|
||||||
|
}
|
||||||
|
is ThreadUiState.LoadingThread -> uiState.statusViewDatum
|
||||||
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user