|
|
|
@ -52,6 +52,7 @@ import androidx.compose.ui.semantics.semantics
|
|
|
|
|
import androidx.compose.ui.tooling.preview.Preview
|
|
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
|
|
import coil.compose.AsyncImage
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.designsystem.R as DesignsystemR
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.designsystem.component.NiaIconToggleButton
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.designsystem.component.NiaTopicTag
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.designsystem.icon.NiaIcons
|
|
|
|
@ -61,12 +62,11 @@ import com.google.samples.apps.nowinandroid.core.domain.model.UserNewsResource
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.domain.model.previewUserNewsResources
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.model.data.NewsResource
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.model.data.NewsResourceType
|
|
|
|
|
import kotlinx.datetime.Instant
|
|
|
|
|
import kotlinx.datetime.toJavaInstant
|
|
|
|
|
import java.time.ZoneId
|
|
|
|
|
import java.time.format.DateTimeFormatter
|
|
|
|
|
import java.util.*
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.designsystem.R as DesignsystemR
|
|
|
|
|
import java.util.Locale
|
|
|
|
|
import kotlinx.datetime.Instant
|
|
|
|
|
import kotlinx.datetime.toJavaInstant
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* [NewsResource] card used on the following screens: For You, Saved
|
|
|
|
@ -252,13 +252,15 @@ fun NewsResourceTopics(
|
|
|
|
|
onUnfollowClick = { }, // ToDo
|
|
|
|
|
onBrowseClick = { }, // ToDo
|
|
|
|
|
text = {
|
|
|
|
|
Text(text = followableTopic.topic.name.uppercase(Locale.getDefault()),
|
|
|
|
|
Text(
|
|
|
|
|
text = followableTopic.topic.name.uppercase(Locale.getDefault()),
|
|
|
|
|
modifier = Modifier.semantics {
|
|
|
|
|
contentDescription = followableTopic.topic.name +
|
|
|
|
|
if (followableTopic.isFollowed) " is followed"
|
|
|
|
|
else " is not followed"
|
|
|
|
|
//make sure this is the right place to add this - remove hardcoded strings
|
|
|
|
|
})
|
|
|
|
|
// make sure this is the right place to add this - remove hardcoded strings
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|