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

Closes #12522: Reuse exceptions code #13047

Merged

Conversation

NotWoods
Copy link
Contributor

These classes are pretty much copies, so this code moves most logic into shared base classes. We're planning to introduce a shared list component later so this work helps with that too.

  • Everything is under org.mozilla.fenix.exceptions now
  • ViewHolders are identical for both fragments
  • Logic is moved from fragments to interactors, making it testable

@NotWoods NotWoods requested a review from ekager July 29, 2020 00:00
@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2020

Codecov Report

Merging #13047 into master will increase coverage by 0.01%.
The diff coverage is 72.22%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #13047      +/-   ##
============================================
+ Coverage     27.68%   27.69%   +0.01%     
+ Complexity     1010     1002       -8     
============================================
  Files           416      415       -1     
  Lines         16628    16590      -38     
  Branches       2131     2130       -1     
============================================
- Hits           4603     4595       -8     
+ Misses        11696    11664      -32     
- Partials        329      331       +2     
Impacted Files Coverage Δ Complexity Δ
...pp/src/main/java/org/mozilla/fenix/HomeActivity.kt 6.61% <ø> (ø) 13.00 <0.00> (ø)
.../fenix/exceptions/login/LoginExceptionsFragment.kt 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...protection/TrackingProtectionExceptionsFragment.kt 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../org/mozilla/fenix/exceptions/ExceptionsAdapter.kt 76.92% <76.92%> (ø) 8.00 <8.00> (?)
...a/fenix/exceptions/login/LoginExceptionsAdapter.kt 80.00% <80.00%> (ø) 4.00 <4.00> (?)
...gprotection/TrackingProtectionExceptionsAdapter.kt 81.25% <81.25%> (ø) 4.00 <4.00> (?)
...ava/org/mozilla/fenix/exceptions/ExceptionsView.kt 90.90% <90.90%> (ø) 4.00 <4.00> (?)
.../fenix/exceptions/login/ExceptionsFragmentStore.kt 100.00% <100.00%> (ø) 1.00 <0.00> (?)
...enix/exceptions/login/LoginExceptionsInteractor.kt 100.00% <100.00%> (ø) 0.00 <0.00> (?)
...illa/fenix/exceptions/login/LoginExceptionsView.kt 100.00% <100.00%> (ø) 2.00 <2.00> (?)
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bef9869...09216bf. Read the comment docs.

Copy link
Contributor

@ekager ekager left a comment

Choose a reason for hiding this comment

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

Tested this on device and looks great! Just a few nits

@NotWoods NotWoods force-pushed the 12522_reuse-exceptions-code branch from bcbda66 to 09216bf Compare July 31, 2020 19:52
@NotWoods NotWoods merged commit 1d28f63 into mozilla-mobile:master Jul 31, 2020
@NotWoods NotWoods deleted the 12522_reuse-exceptions-code branch July 31, 2020 20:24
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.

None yet

3 participants