refactor: Remove unnecessary ?: operator

Left hand side of the operation was always non-null.
This commit is contained in:
Nik Clayton 2023-09-19 22:31:51 +02:00
parent 20e5877a29
commit 986ccd0532
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ class AccountMediaRemoteMediator(
}
val attachments = statuses.flatMap { status ->
AttachmentViewData.list(status, activeAccount.alwaysShowSensitiveMedia ?: false)
AttachmentViewData.list(status, activeAccount.alwaysShowSensitiveMedia)
}
if (loadType == LoadType.REFRESH) {

View File

@ -85,8 +85,8 @@ class ViewThreadViewModel @Inject constructor(
init {
activeAccount = accountManager.activeAccount!!
alwaysShowSensitiveMedia = activeAccount.alwaysShowSensitiveMedia ?: false
alwaysOpenSpoiler = activeAccount.alwaysOpenSpoiler ?: false
alwaysShowSensitiveMedia = activeAccount.alwaysShowSensitiveMedia
alwaysOpenSpoiler = activeAccount.alwaysOpenSpoiler
viewModelScope.launch {
eventHub.events