add missing Column import and spotless formatting

This commit is contained in:
davotoula
2026-04-23 13:33:51 +02:00
parent 376cbf8d10
commit 3b0bf07e58
2 changed files with 11 additions and 4 deletions
@@ -228,18 +228,24 @@ class SearchBarViewModel(
val filtered = if (follows != null) raw.filter { it.author?.pubkeyHex in follows } else raw
when (order) {
SearchSortOrder.POPULAR ->
SearchSortOrder.POPULAR -> {
filtered.sortedWith(
compareByDescending<com.vitorpamplona.amethyst.model.Note> { it.zapsAmount }
.thenByDescending { it.createdAt() ?: 0L },
)
}
SearchSortOrder.OLDEST ->
SearchSortOrder.OLDEST -> {
filtered.sortedBy { it.createdAt() ?: 0L }
}
SearchSortOrder.RELEVANCE, SearchSortOrder.NEWEST -> filtered.sortedWith(DefaultFeedOrder)
SearchSortOrder.RELEVANCE, SearchSortOrder.NEWEST -> {
filtered.sortedWith(DefaultFeedOrder)
}
else -> filtered.sortedWith(DefaultFeedOrder)
else -> {
filtered.sortedWith(DefaultFeedOrder)
}
}
}.flowOn(Dispatchers.IO)
.stateIn(viewModelScope, WhileSubscribed(5000), emptyList())
@@ -22,6 +22,7 @@ package com.vitorpamplona.amethyst.ui.screen.loggedIn.search
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.defaultMinSize
import androidx.compose.foundation.layout.fillMaxHeight