fix crash when user clicks url on in partially loaded thread (#3174)
This commit is contained in:
parent
2df6a83e42
commit
8058c4bc79
1 changed files with 6 additions and 2 deletions
|
@ -180,8 +180,12 @@ class ViewThreadViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
fun detailedStatus(): StatusViewData.Concrete? {
|
||||
return (_uiState.value as ThreadUiState.Success?)?.statusViewData?.find { status ->
|
||||
status.isDetailed
|
||||
return when (val uiState = _uiState.value) {
|
||||
is ThreadUiState.Success -> uiState.statusViewData.find { status ->
|
||||
status.isDetailed
|
||||
}
|
||||
is ThreadUiState.LoadingThread -> uiState.statusViewDatum
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue