Alias strings R to Res (#3619)

This commit is contained in:
Phil Oliver 2025-11-04 22:32:42 -05:00 committed by GitHub
parent a687328f08
commit 0833a6767e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
153 changed files with 1403 additions and 1350 deletions

View file

@ -28,6 +28,7 @@ import org.meshtastic.proto.channel
import org.meshtastic.proto.channelSettings
import java.text.DateFormat
import kotlin.time.Duration.Companion.days
import org.meshtastic.core.strings.R as Res
private const val SECONDS_TO_MILLIS = 1000L
@ -38,7 +39,7 @@ fun MeshProtos.Position.formatPositionTime(dateFormat: DateFormat): String {
val isOlderThanSixMonths = time * SECONDS_TO_MILLIS < sixMonthsAgo
val timeText =
if (isOlderThanSixMonths) {
stringResource(org.meshtastic.core.strings.R.string.unknown_age)
stringResource(Res.string.unknown_age)
} else {
dateFormat.format(time * SECONDS_TO_MILLIS)
}