Revert a mishap in 7ff95e21ba

This commit is contained in:
AntsyLich 2024-02-17 03:28:48 +06:00
parent 1ee54d74a4
commit 1e28999e13
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.platform.LocalContext
import eu.kanade.domain.ui.UiPreferences
import eu.kanade.tachiyomi.util.lang.toRelativeSting
import eu.kanade.tachiyomi.util.lang.toRelativeString
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.i18n.stringResource
import uy.kohesive.injekt.Injekt
@ -36,7 +36,7 @@ fun relativeDateText(
val relativeTime = remember { preferences.relativeTime().get() }
val dateFormat = remember { UiPreferences.dateFormat(preferences.dateFormat().get()) }
return localDate?.toRelativeSting(
return localDate?.toRelativeString(
context = context,
relative = relativeTime,
dateFormat = dateFormat,

View file

@ -38,7 +38,7 @@ fun Long.toLocalDate(): LocalDate {
return LocalDate.ofInstant(Instant.ofEpochMilli(this), ZoneId.systemDefault())
}
fun LocalDate.toRelativeSting(
fun LocalDate.toRelativeString(
context: Context,
relative: Boolean = true,
dateFormat: DateTimeFormatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT),