Commit Graph
5 Commits
Author SHA1 Message Date
2c9cba72a9 Search: introduce weighted reordering (#272)
* Database: backend for weights & timestamps

- Migration 21->22
- SearchableLaunchTimestampEntity.kt
- `weight`-column in SavedSearchableEntity
- Queries for sorting by and adjusting weight
- Queries for sorting by recent use

* move weightfactor access to favoritesRepository

* reorder calls in SearchVM

* no more datahoarding

* add settings screen for ordering

* ui fix, animations

* move ordering settings out of own screen

* remove unused localization

* weight factors

* larger factor for WeightFactor.High

* cleanup

* sort favorites by weight

* icons for favorite screen

* I hate coming up with descriptive strings

* add default weight factor to settings migration

* Add default values for search result ordering preferences

* Favorites settings: change order of preferences

* Change strings

* Replace favorites variability slider with list preference

* migration initial weight

* Change labels

* Include searchable weight column in backup

---------

Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
2023-03-10 22:17:03 +01:00
0b2aa716ec Search: reorder results by launchCount (#267)
* add app search result ordering by launchCount

* add reordering for other domains

* add preference in settings

* bruh moment

- database optimizaiton
- fixing obvious fallacy while reordering

* no reordering on empty queries && reordering early return

* avoiding deserialization

* listpreference

* search settings screen icons & categories

* regrouping

* early-return tweak

* Change ranking algorithm

* Pepega

* Prioritize launchCount over pinned for relevance sorting

---------

Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
2023-02-28 20:45:25 +01:00
b11ba9e23a Searchbar: Launch on enter / done (#258)
* Search: add launch action on keyboard-done

* Add switch in settings

* :)

* fix dataStore-update, pull bestMatch from multiple sources

* launch searchAction when no other match is found

* update localization

* switch to .firstNotNullOfOrNull { }

* switch imeAction based on launchOnEnter == true

* localization

* adding highlighting for bestMatch

* Remove unused code

* Store hightlighted search result in viewmodel

* Add highlight for list item, tweak grid item highlight

* Highlight search action that is launched on enter

* localizaton

* switch to IconShape / hairline border

* remove border / outlineVariant-background

---------

Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
2023-02-19 18:51:31 +01:00
8880f859e2 Weather-Widget: replace drop-down selectors with scrollable rows (#253)
* adding details bar with icons and animations

* adding lazy-rows, again

* adding switch for compact mode / adjust padding

* corner adjustments

* Adjust alignment and typography

* [Fix] Add missing outlineVariant to platform material3 dynamic color schemes

* Adjust colors

* Increase icon weight

* Increase time selector touch target size

* Change divider color

* Adjust selection highlight color

* add checks for valid details / display location icon on lat-lon location

* removing redundant check for valid precipitation

* Add colors argument to weather icons

* Add Blend from material-color-utilities library

* Blend weather icon colors towards theme color

* Remove C/F

* Add item blending when scrolling into / out of view

* Create :ui:ktx:LazyListLayoutInfo.kt / increase provider padding

---------

Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
2023-02-17 22:07:51 +01:00
0a63a104bb Add additional row in vertical and horizontal pager in horizontal clock mode showing favorites (#246)
* Add setting for clock widget to show two DynamicZones, one of them always being favorites

* implementing horizontal pager

* undoing changes

* checking if withFavoriteBar is set in horizontal layout

* Clock widget: use compose pager, not accompanist pager

* Pull favorites part provider from view model

* Clock widget settings: remove divider

* Remove date_part from settings.proto

* Remove datePart settings references

---------

Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
2023-02-08 16:14:38 +01:00