File tree Expand file tree Collapse file tree
app/src/main/java/eu/kanade Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import tachiyomi.presentation.core.screens.EmptyScreen
3030import tachiyomi.presentation.core.screens.LoadingScreen
3131import uy.kohesive.injekt.Injekt
3232import uy.kohesive.injekt.api.get
33- import java.time.LocalDateTime
33+ import java.time.LocalDate
3434import kotlin.time.Duration.Companion.seconds
3535
3636@Composable
@@ -153,6 +153,6 @@ private fun AnimeUpdatesBottomBar(
153153}
154154
155155sealed interface AnimeUpdatesUiModel {
156- data class Header (val date : LocalDateTime ) : AnimeUpdatesUiModel
156+ data class Header (val date : LocalDate ) : AnimeUpdatesUiModel
157157 data class Item (val item : AnimeUpdatesItem ) : AnimeUpdatesUiModel
158158}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import androidx.compose.ui.platform.LocalHapticFeedback
3232import androidx.compose.ui.text.font.FontStyle
3333import androidx.compose.ui.text.style.TextOverflow
3434import androidx.compose.ui.unit.dp
35- import eu.kanade.presentation.components.relativeDateTimeText
35+ import eu.kanade.presentation.components.relativeDateText
3636import eu.kanade.presentation.entries.anime.components.EpisodeDownloadAction
3737import eu.kanade.presentation.entries.anime.components.EpisodeDownloadIndicator
3838import eu.kanade.presentation.entries.components.DotSeparatorText
@@ -96,7 +96,7 @@ internal fun LazyListScope.animeUpdatesUiItems(
9696 is AnimeUpdatesUiModel .Header -> {
9797 ListGroupHeader (
9898 modifier = Modifier .animateItem(),
99- text = relativeDateTimeText (item.date),
99+ text = relativeDateText (item.date),
100100 )
101101 }
102102 is AnimeUpdatesUiModel .Item -> {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import tachiyomi.presentation.core.components.material.PullRefresh
2727import tachiyomi.presentation.core.components.material.Scaffold
2828import tachiyomi.presentation.core.screens.EmptyScreen
2929import tachiyomi.presentation.core.screens.LoadingScreen
30- import java.time.LocalDateTime
30+ import java.time.LocalDate
3131import kotlin.time.Duration.Companion.seconds
3232
3333@Composable
@@ -141,6 +141,6 @@ private fun MangaUpdatesBottomBar(
141141}
142142
143143sealed interface MangaUpdatesUiModel {
144- data class Header (val date : LocalDateTime ) : MangaUpdatesUiModel
144+ data class Header (val date : LocalDate ) : MangaUpdatesUiModel
145145 data class Item (val item : MangaUpdatesItem ) : MangaUpdatesUiModel
146146}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import androidx.compose.ui.platform.LocalHapticFeedback
3232import androidx.compose.ui.text.font.FontStyle
3333import androidx.compose.ui.text.style.TextOverflow
3434import androidx.compose.ui.unit.dp
35- import eu.kanade.presentation.components.relativeDateTimeText
35+ import eu.kanade.presentation.components.relativeDateText
3636import eu.kanade.presentation.entries.components.DotSeparatorText
3737import eu.kanade.presentation.entries.components.ItemCover
3838import eu.kanade.presentation.entries.manga.components.ChapterDownloadAction
@@ -92,7 +92,7 @@ internal fun LazyListScope.mangaUpdatesUiItems(
9292 is MangaUpdatesUiModel .Header -> {
9393 ListGroupHeader (
9494 modifier = Modifier .animateItem(),
95- text = relativeDateTimeText (item.date),
95+ text = relativeDateText (item.date),
9696 )
9797 }
9898 is MangaUpdatesUiModel .Item -> {
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import eu.kanade.tachiyomi.data.download.anime.AnimeDownloadCache
1616import eu.kanade.tachiyomi.data.download.anime.AnimeDownloadManager
1717import eu.kanade.tachiyomi.data.download.anime.model.AnimeDownload
1818import eu.kanade.tachiyomi.data.library.anime.AnimeLibraryUpdateJob
19- import eu.kanade.tachiyomi.util.lang.toLocalDateTime
19+ import eu.kanade.tachiyomi.util.lang.toLocalDate
2020import kotlinx.collections.immutable.PersistentList
2121import kotlinx.collections.immutable.mutate
2222import kotlinx.collections.immutable.persistentListOf
@@ -392,8 +392,8 @@ class AnimeUpdatesScreenModel(
392392 return items
393393 .map { AnimeUpdatesUiModel .Item (it) }
394394 .insertSeparators { before, after ->
395- val beforeDate = before?.item?.update?.dateFetch?.toLocalDateTime ()
396- val afterDate = after?.item?.update?.dateFetch?.toLocalDateTime ()
395+ val beforeDate = before?.item?.update?.dateFetch?.toLocalDate ()
396+ val afterDate = after?.item?.update?.dateFetch?.toLocalDate ()
397397 when {
398398 beforeDate != afterDate && afterDate != null -> AnimeUpdatesUiModel .Header (afterDate)
399399 // Return null to avoid adding a separator between two items.
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import eu.kanade.tachiyomi.data.download.manga.MangaDownloadCache
1616import eu.kanade.tachiyomi.data.download.manga.MangaDownloadManager
1717import eu.kanade.tachiyomi.data.download.manga.model.MangaDownload
1818import eu.kanade.tachiyomi.data.library.manga.MangaLibraryUpdateJob
19- import eu.kanade.tachiyomi.util.lang.toLocalDateTime
19+ import eu.kanade.tachiyomi.util.lang.toLocalDate
2020import kotlinx.collections.immutable.PersistentList
2121import kotlinx.collections.immutable.mutate
2222import kotlinx.collections.immutable.persistentListOf
@@ -373,8 +373,8 @@ class MangaUpdatesScreenModel(
373373 return items
374374 .map { MangaUpdatesUiModel .Item (it) }
375375 .insertSeparators { before, after ->
376- val beforeDate = before?.item?.update?.dateFetch?.toLocalDateTime ()
377- val afterDate = after?.item?.update?.dateFetch?.toLocalDateTime ()
376+ val beforeDate = before?.item?.update?.dateFetch?.toLocalDate ()
377+ val afterDate = after?.item?.update?.dateFetch?.toLocalDate ()
378378 when {
379379 beforeDate != afterDate && afterDate != null -> MangaUpdatesUiModel .Header (afterDate)
380380 // Return null to avoid adding a separator between two items.
You can’t perform that action at this time.
0 commit comments