diff --git a/buildSrc/src/main/kotlin/ProjectConfig.kt b/buildSrc/src/main/kotlin/ProjectConfig.kt index df9a9cfd5..75e693f5e 100644 --- a/buildSrc/src/main/kotlin/ProjectConfig.kt +++ b/buildSrc/src/main/kotlin/ProjectConfig.kt @@ -55,6 +55,6 @@ const val NEWPIPE_APPLICATION_ID_NEW = "net.newpipe.app" // vc=19 / 0.1.0-AE — rust pipeline cutover. Extraction via // strawcore-core (Sulkta-Coop/strawcore) via the UniFFI wrapper; no // NewPipeExtractor in the runtime path. -const val STRAW_VERSION_CODE = 64 -const val STRAW_VERSION_NAME = "0.1.0-BX" +const val STRAW_VERSION_CODE = 65 +const val STRAW_VERSION_NAME = "0.1.0-BY" const val STRAW_APPLICATION_ID = "com.sulkta.straw" diff --git a/strawApp/src/main/kotlin/com/sulkta/straw/feature/channel/ChannelScreen.kt b/strawApp/src/main/kotlin/com/sulkta/straw/feature/channel/ChannelScreen.kt index bca2e6641..1618fc2a9 100644 --- a/strawApp/src/main/kotlin/com/sulkta/straw/feature/channel/ChannelScreen.kt +++ b/strawApp/src/main/kotlin/com/sulkta/straw/feature/channel/ChannelScreen.kt @@ -205,18 +205,26 @@ private fun ChannelVideoRow( overflow = TextOverflow.Ellipsis, ) Spacer(modifier = Modifier.height(2.dp)) - Text( - text = buildString { - if (item.viewCount > 0) append("${formatCount(item.viewCount)} views") - if (item.durationSeconds > 0) { - if (isNotEmpty()) append(" · ") - append(formatDuration(item.durationSeconds)) - } - }, - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - maxLines = 1, - ) + // Don't repeat duration here — VideoThumbnail's + // bottom-right badge already shows it. Add the upload + // date so the row reads 'N views · 2 days ago' the way + // YT renders it. vc=65 — Cobb caught the duplicate + // duration + missing date on the channel page. + val meta = buildString { + if (item.viewCount > 0) append("${formatCount(item.viewCount)} views") + if (item.uploadDateRelative.isNotBlank()) { + if (isNotEmpty()) append(" · ") + append(item.uploadDateRelative) + } + } + if (meta.isNotEmpty()) { + Text( + text = meta, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 1, + ) + } } } } diff --git a/strawApp/src/main/kotlin/com/sulkta/straw/feature/search/SearchScreen.kt b/strawApp/src/main/kotlin/com/sulkta/straw/feature/search/SearchScreen.kt index 4f4adebfa..17d804b12 100644 --- a/strawApp/src/main/kotlin/com/sulkta/straw/feature/search/SearchScreen.kt +++ b/strawApp/src/main/kotlin/com/sulkta/straw/feature/search/SearchScreen.kt @@ -247,13 +247,21 @@ private fun ResultRow( else Modifier.padding(vertical = 4.dp), ) - if (item.viewCount > 0 || item.durationSeconds > 0) { + // Drop the duration here — VideoThumbnail's badge already + // renders it on the bottom-right of the thumbnail. Add the + // upload date instead so search results read like YT's + // own format. vc=65 — caught with the + // channel-page + related-row consistency pass. + val meta = buildString { + if (item.viewCount > 0) append(formatViews(item.viewCount)) + if (item.uploadDateRelative.isNotBlank()) { + if (isNotEmpty()) append(" · ") + append(item.uploadDateRelative) + } + } + if (meta.isNotEmpty()) { Text( - text = buildString { - if (item.viewCount > 0) append(formatViews(item.viewCount)) - if (item.viewCount > 0 && item.durationSeconds > 0) append(" · ") - if (item.durationSeconds > 0) append(formatDuration(item.durationSeconds)) - }, + text = meta, style = MaterialTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, maxLines = 1,