Closed chitowncrispy closed 4 years ago
Merging #289 into master will decrease coverage by
0.22%
. The diff coverage is0%
.
@@ Coverage Diff @@
## master #289 +/- ##
=========================================
- Coverage 7.8% 7.58% -0.23%
=========================================
Files 219 219
Lines 8723 8727 +4
=========================================
- Hits 681 662 -19
- Misses 8042 8065 +23
Impacted Files | Coverage Δ | |
---|---|---|
Library/Coordinators/WalletCoordinator.swift | 0% <0%> (ø) |
:arrow_up: |
Library/Scenes/Wallet/WalletViewController.swift | 0% <0%> (ø) |
:arrow_up: |
...htning/Services/Misc/BlockChainHeightUpdater.swift | 60.41% <0%> (-35.42%) |
:arrow_down: |
...htning/Certificates/PinnedURLSessionDelegate.swift | 93.1% <0%> (-3.45%) |
: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 5a07998...92d108e. Read the comment docs.
Nice one @chitowncrispy!! 🎊
🔥
Description
I added a debounce of 2 seconds to the displaying of the sync view. This prevents a situation where there are 0-1 blocks that need to be synced and the sync view shows unnecessarily. I also added some logic so that the main page is not reloaded twice unnecessarily when switching between similar states.
Motivation and Context
This addresses issue #227
How Has This Been Tested?
The easiest way to test this was by opening and closing the app rapidly. By rapidly I mean opening the app, waiting 10 seconds and then closing the app. I did this quite a few times in a row and each time I was not seeing the sync view.
The other scenario I tested was the initial sync of the blockchain by creating a new wallet or recovering an existing wallet. Both scenarios showed the sync view in an appropriate amount of time and then concluded the sync as expected, hiding the sync view, showing the correct balance on the wallet page and badges within the tabs.
Screenshots (if appropriate):
Types of changes
Checklist: