BimmerGestalt / AAIdrive

Implementations of some Android Auto features as unofficial IDrive apps
MIT License
541 stars 90 forks source link

Music search query history #567

Closed Ben2356 closed 2 years ago

Ben2356 commented 2 years ago

My long overdue PR for this that I've been working on off and on 😅! This adds the saving a simple history of the queries that the user has previously searched. In order to have a query be saved the user must either 1) click Play from Search, 2) click View Full Results or the ellipsis entry, 3) click on a previous search history query, 4) click on a search result item, 5) click on the OK button to bring up the full page search results . The search history query saves the last 8 searches, the most recent of the search queries being displayed at the bottom of the list.

Additionally with this feature the search logic has been refactored/updated to help prevent race conditions when displaying search results in the suggestion list and help smoothen out the experience.

I wasn't able to get any videos / pictures of this one but didn't want to hold this up any longer, sorry about that.

hufman commented 2 years ago

Please merge the latest main branch, which should include a fix for running the CI tests in a Pull Request context!

Ben2356 commented 2 years ago

Please merge the latest main branch, which should include a fix for running the CI tests in a Pull Request context!

Merged the latest!

codecov-commenter commented 2 years ago

Codecov Report

Merging #567 (fde0902) into main (a6f8606) will increase coverage by 1.78%. The diff coverage is 79.68%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #567      +/-   ##
============================================
+ Coverage     49.37%   51.15%   +1.78%     
+ Complexity     1791     1786       -5     
============================================
  Files           249      242       -7     
  Lines         11752    11352     -400     
  Branches       2321     2265      -56     
============================================
+ Hits           5802     5807       +5     
+ Misses         4819     4420     -399     
+ Partials       1131     1125       -6     
Impacted Files Coverage Δ
...a/me/hufman/androidautoidrive/carapp/InputState.kt 63.88% <ø> (ø)
.../hufman/androidautoidrive/music/MusicController.kt 0.00% <0.00%> (ø)
...idautoidrive/carapp/music/views/SearchInputView.kt 73.11% <80.32%> (+5.37%) :arrow_up:
...in/java/me/hufman/androidautoidrive/AppSettings.kt 82.70% <100.00%> (+0.07%) :arrow_up:
...hufman/androidautoidrive/maps/MapboxPlaceSearch.kt
.../androidautoidrive/carapp/maps/MapboxController.kt
...roidautoidrive/carapp/maps/MapboxLocationSource.kt
...an/androidautoidrive/maps/MapboxTokenValidation.kt
...an/androidautoidrive/carapp/maps/MapboxSettings.kt
... and 2 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 a6f8606...fde0902. Read the comment docs.