Closed nivanchikov closed 4 years ago
Merging #35 into master will increase coverage by
0.34%
. The diff coverage is83.33%
.
@@ Coverage Diff @@
## master #35 +/- ##
=========================================
+ Coverage 69.85% 70.2% +0.34%
=========================================
Files 13 13
Lines 428 443 +15
=========================================
+ Hits 299 311 +12
- Misses 129 132 +3
Impacted Files | Coverage Δ | |
---|---|---|
ReduxMovieDB/State/MainState.swift | 100% <100%> (ø) |
:arrow_up: |
...xMovieDB/Controllers/MovieListViewController.swift | 89.58% <100%> (ø) |
:arrow_up: |
ReduxMovieDB/Controllers/SplitViewController.swift | 48% <25%> (-4.39%) |
:arrow_down: |
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 e812687...3d69174. Read the comment docs.
Hi @nivanchikov 👋 thanks for your contribution! I'll review as soon as possible.
Issue: The movies list gets re-fetched each time the user opens or exits the movie details screen on a device with a
compact-width
trait (e.g. iPhoneX or iPhone XS Max in portrait orientation). See the attached gif with a dump of requests being sent when I was opening various movie detailsWhy this happens:
searchBar.rx.text
event stream triggers the movie search state updates and TMDB requeststext
control property are triggered by both text editing events and responder events (e.g. begin/end editing)Proposed solution: This pull request adds a couple of new actions to differentiate when the movie details screen is always visible in a split view controller. If the details screen is currently the only visible one, e.g. in a compact-width device orientation, the
searchBar.rx.text
events are additionally filtered to disallow updating the search state when the search screen is not visible