Merge branch 'github/main'

pull/58/head
kbuilder 2 years ago
commit ab85889292

@ -9,11 +9,9 @@ Please fill out either the individual or corporate Contributor License Agreement
(CLA).
* If you are an individual writing original source code and you're sure you
own the intellectual property, then you'll need to sign an [individual CLA]
(https://developers.google.com/open-source/cla/individual).
own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual).
* If you work for a company that wants to allow you to contribute your work,
then you'll need to sign a [corporate CLA]
(https://developers.google.com/open-source/cla/corporate).
then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate).
Follow either of the two links above to access the appropriate CLA and
instructions for how to sign and return it. Once we receive it, we'll be able to
@ -28,8 +26,7 @@ accept your pull requests.
1. Fork the desired repo, develop and test your code changes.
1. Ensure that your code adheres to the existing style in the sample to which
you are contributing. Refer to the
[Google Cloud Platform Samples Style Guide]
(https://github.com/GoogleCloudPlatform/Template/wiki/style.html) for the
[Google Cloud Platform Samples Style Guide](https://github.com/GoogleCloudPlatform/Template/wiki/style.html) for the
recommended coding standards for this organization.
1. Ensure that your code has an appropriate set of unit tests which all pass.
1. Submit a pull request.

@ -112,16 +112,15 @@ Find out more about the [UI architecture here](docs/ArchitectureLearningJourney.
# Baseline profiles
The baseline profile for this app is located at `app/src/main/baseline-prof.txt`.
The baseline profile for this app is located at [`app/src/main/baseline-prof.txt`](app/src/main/baseline-prof.txt).
It contains rules that enable AOT compilation of the critical user path taken during app launch.
For more information on baseline profiles, read [this document](https://developer.android.com/studio/profile/baselineprofiles).
| Note: The baseline profile needs to be re-generated for release builds that touched code which
| changes app startup.
> Note: The baseline profile needs to be re-generated for release builds that touched code which changes app startup.
To generate the baseline profile, select the `benchmark` build variant and run the
`BaselineProfileGenerator` benchmark test on an AOSP Android Emulator.
Then copy the resulting baseline profile from the emulator to `app/src/main/baseline-prof.txt`.
Then copy the resulting baseline profile from the emulator to [`app/src/main/baseline-prof.txt`](app/src/main/baseline-prof.txt).
# License

@ -12,7 +12,7 @@ By setting up convention plugins in `build-logic`, we can avoid duplicated build
messy `subproject` configurations, without the pitfalls of the `buildSrc` directory.
`build-logic` is an included build, as configured in the root
[`settings.gradle`](../settings.gradle).
[`settings.gradle.kts`](../settings.gradle.kts).
Inside `build-logic` is a `convention` module, which defines a set of plugins that all normal
modules can use to configure themselves.

@ -47,7 +47,7 @@ The following diagram shows the events which occur and how data flows from the r
![Diagram showing how news resources are displayed on the For You screen](images/architecture-2-example.png "Diagram showing how news resources are displayed on the For You screen")
Here's what's happening in each step. The easiest way to find the associated code is to load the project into Android Studio and search for the text in the Code column (handy shortcut: tap SHIFT twice).
Here's what's happening in each step. The easiest way to find the associated code is to load the project into Android Studio and search for the text in the Code column (handy shortcut: tap <kbd>SHIFT</kbd> twice).
<table>
@ -176,7 +176,7 @@ Whenever the list of authors changes (for example, when a new author is added),
To write data, the repository provides suspend functions. It is up to the caller to ensure that their execution is suitably scoped.
_Example: Follow a topic _
_Example: Follow a topic_
Simply call `TopicsRepository.setFollowedTopicId` with the ID of the topic which the user wishes to follow.
@ -280,7 +280,7 @@ The `FollowingViewModel` exposes `uiState` as a `StateFlow<FollowingUiState>`. T
* List of authors (getAuthorsStream)
* List of authors (`getAuthorsStream`)
* List of author IDs which the current user is following
* List of topics
* List of topic IDs which the current user is following

@ -155,10 +155,10 @@ private fun AuthorHeader(author: Author) {
) {
AsyncImage(
modifier = Modifier
.padding(bottom = 12.dp)
.size(216.dp)
.align(Alignment.CenterHorizontally)
.clip(CircleShape)
.padding(bottom = 12.dp),
.clip(CircleShape),
contentScale = ContentScale.Crop,
model = author.imageUrl,
contentDescription = "Author profile picture",
@ -216,6 +216,7 @@ private fun AuthorToolbar(
}
val selected = uiState.isFollowed
NiaFilterChip(
modifier = Modifier.padding(horizontal = 16.dp),
checked = selected,
onCheckedChange = onFollowClick,
) {

Loading…
Cancel
Save