Skip to content

Commit df46974

Browse files
committed
Add sample data. Remove tags from model.
1 parent 15fd0f8 commit df46974

File tree

3 files changed

+30
-28
lines changed
  • android
    • common-ui/feed/src/main/java/io/github/reactivecircus/kstreamlined/android/common/ui/feed
    • feature/home/src/main/java/io/github/reactivecircus/kstreamlined/android/feature/home
  • kmp/model/src/commonMain/kotlin/io/github/reactivecircus/kstreamlined/kmp/model/feed

3 files changed

+30
-28
lines changed

android/common-ui/feed/src/main/java/io/github/reactivecircus/kstreamlined/android/common/ui/feed/TalkingKotlinCard.kt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,6 @@ private fun PreviewTalkingKotlinCard_unsaved() {
101101
contentUrl = "contentUrl",
102102
savedForLater = false,
103103
podcastLogoUrl = "",
104-
tags = listOf(
105-
"Kotlin",
106-
"KMP",
107-
"Kotlin Multiplatform",
108-
"Coroutines",
109-
),
110104
).toDisplayable("Moments ago"),
111105
onItemClick = {},
112106
onSaveButtonClick = {},
@@ -129,12 +123,6 @@ private fun PreviewTalkingKotlinCard_saved() {
129123
contentUrl = "contentUrl",
130124
savedForLater = true,
131125
podcastLogoUrl = "",
132-
tags = listOf(
133-
"Kotlin",
134-
"KMP",
135-
"Kotlin Multiplatform",
136-
"Coroutines",
137-
),
138126
).toDisplayable("Moments ago"),
139127
onItemClick = {},
140128
onSaveButtonClick = {},

android/feature/home/src/main/java/io/github/reactivecircus/kstreamlined/android/feature/home/HomeScreen.kt

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,33 @@ public fun HomeScreen(
9595
)
9696
}
9797

98+
item {
99+
var item by remember {
100+
mutableStateOf(
101+
FeedItem.KotlinYouTube(
102+
id = "yt:video:apiVJfLvUBE",
103+
title = "Coil Goes Multiplatform with Colin White | Talking Kotlin #127",
104+
publishTime = "2023-11-29T17:30:08Z".toInstant(),
105+
contentUrl = "https://www.youtube.com/watch?v=apiVJfLvUBE",
106+
savedForLater = false,
107+
thumbnailUrl = "https://i2.ytimg.com/vi/apiVJfLvUBE/hqdefault.jpg",
108+
description = "Welcome to another engaging episode of Talking Kotlin! In this edition, we dive into the dynamic world of Android development with Colin White, the creator of the widely acclaimed Coil library. Join us as we discuss the latest developments, insights, and the exciting roadmap for Coil. \uD83D\uDE80 Highlights from this Episode: Learn about Colin's journey in developing the Coil library. Discover the pivotal role Coil plays in simplifying image loading for Android developers. Get an exclusive sneak peek into the upcoming Coil 3.0, featuring multi-platform support and seamless integration with Jetpack Compose. \uD83D\uDD17 Helpful Links: Coil Library GitHub: https://coil-kt.github.io/coil/ Follow Colin White on Twitter: https://twitter.com/colinwhi \uD83C\uDF10 Connect with the Kotlin Community: https://kotlinlang.org/community/ Kotlin Foundation: https://kotlinfoundation.org/ \uD83D\uDC49 Don't miss out on the latest insights and updates from the Kotlin world! Subscribe, hit the bell icon, and join the conversation in the comments below. \uD83D\uDCC8 Help us reach 20,000 views by liking, sharing, and subscribing! Your support keeps the Kotlin conversation alive.",
109+
).toDisplayable("Moments ago"),
110+
)
111+
}
112+
KotlinYouTubeCard(
113+
item = item,
114+
onItemClick = {},
115+
onSaveButtonClick = {
116+
item = item.copy(
117+
value = it.copy(
118+
savedForLater = !it.savedForLater
119+
)
120+
)
121+
},
122+
)
123+
}
124+
98125
item {
99126
var item by remember {
100127
mutableStateOf(
@@ -104,7 +131,7 @@ public fun HomeScreen(
104131
publishTime = "2023-11-26T11:14:09Z".toInstant(),
105132
contentUrl = "https://mailchi.mp/kotlinweekly/kotlin-weekly-382",
106133
savedForLater = false,
107-
).toDisplayable(displayablePublishTime = "Moments ago")
134+
).toDisplayable(displayablePublishTime = "5 hours ago")
108135
)
109136
}
110137
KotlinWeeklyCard(
@@ -131,7 +158,7 @@ public fun HomeScreen(
131158
savedForLater = false,
132159
thumbnailUrl = "https://i3.ytimg.com/vi/zE2LIAUisRI/hqdefault.jpg",
133160
description = "During this webinar, we will get you up to speed with the basics of Kotlin Multiplatform. The webinar will cover what's involved in configuring your development environment, creating a Multiplatform Mobile project, and progressing to a more elaborate project that shares the data and networking layers.",
134-
).toDisplayable("2 hours ago"),
161+
).toDisplayable("Yesterday"),
135162
)
136163
}
137164
KotlinYouTubeCard(
@@ -158,7 +185,7 @@ public fun HomeScreen(
158185
savedForLater = false,
159186
thumbnailUrl = "https://i3.ytimg.com/vi/bz4cQeaXmsI/hqdefault.jpg",
160187
description = "JetBrains Kotlin Multiplatform (KMP) is an open-source technology designed for flexible cross-platform development. It allows you to develop apps for Android, iOS, desktop, web, and server-side and efficiently reuse code across them, all while retaining the benefits of native programming. After 8 years of development, KMP has been refined into a production-ready technology and is going Stable, which means now is a great time to start using it in your project.",
161-
).toDisplayable("Yesterday"),
188+
).toDisplayable("3 days ago"),
162189
)
163190
}
164191
KotlinYouTubeCard(
@@ -244,12 +271,6 @@ public fun HomeScreen(
244271
contentUrl = "https://talkingkotlin.com/http4k-chronicles/",
245272
savedForLater = false,
246273
podcastLogoUrl = "https://talkingkotlin.com/images/kotlin_talking_logo.png",
247-
tags = listOf(
248-
"Kotlin",
249-
"KMP",
250-
"Kotlin Multiplatform",
251-
"http4k",
252-
),
253274
).toDisplayable(displayablePublishTime = "14 Nov 2023")
254275
)
255276
}
@@ -441,12 +462,6 @@ public fun HomeScreen(
441462
contentUrl = "https://talkingkotlin.com/Compose-Multiplatform-in-Production-at-Instabee/",
442463
savedForLater = false,
443464
podcastLogoUrl = "https://talkingkotlin.com/images/kotlin_talking_logo.png",
444-
tags = listOf(
445-
"Kotlin",
446-
"Compose",
447-
"Compose Multiplatform",
448-
"Kotlin Multiplatform",
449-
),
450465
).toDisplayable(displayablePublishTime = "09 Aug 2023")
451466
)
452467
}

kmp/model/src/commonMain/kotlin/io/github/reactivecircus/kstreamlined/kmp/model/feed/FeedItem.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ public sealed interface FeedItem {
3535
override val contentUrl: String,
3636
override val savedForLater: Boolean,
3737
val podcastLogoUrl: String,
38-
val tags: List<String>,
3938
) : FeedItem
4039

4140
public data class KotlinWeekly(

0 commit comments

Comments
 (0)