Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Cache findViewById calls in session control #10575

Merged
merged 1 commit into from
May 12, 2020

Conversation

NotWoods
Copy link
Contributor

Since we use kotlin synthetics in ViewHolders a lot, I added a helper class that implements the LayoutContainer interface. This interface lets us refer to views with their ID directly without the view. prefix, just like Activities and Fragments. Additionally, this caches the underlying findViewById calls to help with perf.

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

After merge

  • Milestone: Make sure issues finished by this pull request are added to the milestone of the version currently in development.

To download an APK when reviewing a PR:

  1. click on Show All Checks,
  2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
  3. click on the "Fenix - assemble" task, then click "Run Artifacts".
  4. the APK links should be on the left side of the screen, named for each CPU architecture

@firefoxci-taskcluster
Copy link

No Taskcluster jobs started for this pull request
The `allowPullRequests` configuration for this repository (in `.taskcluster.yml` on the
default branch) does not allow starting tasks for this pull request.

@ekager
Copy link
Contributor

ekager commented May 12, 2020

I just had @liuche add you back to the org 🙈 closing + reopening to see if CI will run

@ekager ekager closed this May 12, 2020
@ekager ekager reopened this May 12, 2020
@NotWoods NotWoods force-pushed the layoutcontainer-home branch from 0afe0cd to d05b358 Compare May 12, 2020 16:12
Copy link
Contributor

@BranescuMihai BranescuMihai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@NotWoods NotWoods force-pushed the layoutcontainer-home branch from d05b358 to 8a3d20f Compare May 12, 2020 19:48
@NotWoods NotWoods merged commit f7b4f1c into mozilla-mobile:master May 12, 2020
@NotWoods NotWoods deleted the layoutcontainer-home branch May 12, 2020 21:05
@liuche liuche mentioned this pull request May 19, 2020
32 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants