Fix sorting and colors on notifications screen

This commit is contained in:
Rafał Kobyłko 2024-08-12 00:14:48 +02:00
parent fce6b00371
commit 2ac74348e7
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ internal class NotificationsRepositoryImpl(
} }
private fun List<Notification>.sortedByTime(): List<Notification> { private fun List<Notification>.sortedByTime(): List<Notification> {
return sortedWith(compareBy({ it.isRead }, { it.publishTime.unaryMinus() })) return sortedByDescending { it.publishTime }
} }
override suspend fun getPeriodicNotificationCounter(): Int { override suspend fun getPeriodicNotificationCounter(): Int {

View File

@ -98,7 +98,7 @@ private fun ScreenContent(
onInternalRouteClick(notification.internalRoute.orEmpty()) onInternalRouteClick(notification.internalRoute.orEmpty())
} }
} }
.background(if (notification.isRead) TwTheme.color.surface else TwTheme.color.background) .background(if (notification.isRead) TwTheme.color.background else TwTheme.color.surface)
.padding(16.dp) .padding(16.dp)
) )
HorizontalDivider(color = TwTheme.color.divider) HorizontalDivider(color = TwTheme.color.divider)