mirror of
https://github.com/accelforce/Yuito
synced 2025-01-05 12:27:00 +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? {
|
||||
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 New Issue
Block a user