51 Commits

Author SHA1 Message Date
MM20
ee83b87f39
Reset search filters when query is cleared 2024-04-21 20:30:55 +02:00
MM20
b323953a75
Merge themed icon and icon pack themed icon preference 2024-04-20 14:05:48 +02:00
MM20
38c048ec03
Allow resizing of custom clock widgets 2024-04-19 22:01:40 +02:00
MM20
3288d933c5
[WIP] Custom widgets as watch face 2024-04-06 22:44:59 +02:00
MM20
6d15ab0e29
Clock widget: Keep settings of unselected watch faces 2024-04-05 15:59:14 +02:00
MM20
4ce4812317
Add clock widget preference migration, remove OnePlus variant 2024-03-29 16:53:45 +01:00
MM20
e5bcf2bdc1
Enable coerceInputValues for settings deserializer 2024-03-29 16:08:59 +01:00
Guillermo Villafuerte
1a20458904
Added flags "Show seconds" and "Use theme color" for clock widgets (#673)
* Added flags for use seconds and use theme color for clock widget, and "Display" clock style.

Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>

* Separator in "Display" clock changed to vector for consistency.

Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>

* "Use theme color" is now false by default.

Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>

* Added padding for all clocks.

Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>

* FIX: "Show seconds" was default true on VM, glitching the clock widget when first loaded.

Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>

* Clock time is now provided for a variable component as needed, splitting the current time provider by two.

Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>

* Compact mode is also considered for second/minute provider.

Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>

* Yet another tweak to Orbit clock colors.

Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>

* Separator flicker is now synced with second change for Display clock.

Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>

* Update libraries

* Update IDEA Kotlin file

* Disable seconds by default

* Swap order of clock widget preferences

* Invert themed orbit clock colors

* Rename display clock style to 7 segment

* Make watch face names localizable

---------

Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>
Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
2024-03-29 14:54:38 +01:00
chaptergy
3646745a36
Adds setting to not separate work profile and main profile apps (#678)
* Adds setting to not separate work profile and main profile apps

* Only show work profile related preference when there is a work profile

---------

Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
2024-03-28 21:00:06 +01:00
Christoph
cba387c832
Add OSM search provider (#611)
* add openstreetmaps module in data

* fix injection

* retrofit2 implementation

* tokenization

* partial rewrite of OpeningTime.fromOverpassElement

* finish rewrite of OpeningTime.fromOverpassElement

* fix merge x)

* configurable search radius

* add settings section and disable setting explicit timeout values for http-client to alleviate issues during debugging

* settings screen localization

* enable radius slider only when locations are enabled

* fix dayRange parsing, add barebones UI

* add files to git

* add location listener in SearchableItemVM that gets activated by LocationItem

* add heading listener

* Calculations, UI additions

* rename settings to LocationsSettings

* use android location library for bearing calculations

* location fix

* rotation fix, demo UI

* working buttons for launching map and website (if available)

* finish botched UI

* improve overpass query by utilizing regex for fuzzy search results

* add link to documentation for further reference

* localization comments

* remove wikipedia minification setting

* schema version, default radius 1.5km

* move osm-specific opening-time parsing to OsmLocation

* refactor with callbackFlow

* remember flow and set minimum distance update to 1m

* refactor for replacementIcon, add imperial unit option

* 'open until' UI fix

* implement serializers

* catch errors in deserializer

* hacky live sorting by distance

* give max priority to bestmatch determined by SearchVM

* add yards as additional step to metersToLocalizzedString

* move http-client from serializers of osmlocation to companion object for cache updating

* add setting for custom URL

* round yards to int

* add botched map preview

* unbotch map tiles, draw user location in map (proof of concept)

* - create MapTiles Composable
- add border around map
- add indicators for location and userlocation, when on map

* fix default imperial units setting

* fix tint color

* add OSM attribution string

* display loading animation when tiles can't be shown yet

* create compose preview of maptiles

* UI work

* being glad that API's just return null instead of throwing information

* tryStartActivity

* aniimate card row placement

* Text alignment, padding

* Rotation -PI/PI wrap fix

* fix direction arrow rotation when screen is upside down

* more icons

* icons, settings, localization
- consider other tags than "amenity" when determining location category
- add many more location categories with corresponding icons
- add settings to disable map theming and hide search results with
  LocationCategory.OTHER
- add default localizations for settings

* catch errors when deserializing location category

* move location and heading functions to Context.kt in extensions

* fix hideUncategorized criterion

* add pre-sorting by distance for location results in SearchVM by injecting Context into search()

* specify receiver parameters in ktx.Context lambdas

* move pose logic and context dependency to new module devicepose with DevicePoseProvider

* git, add the frickin' module

* search overpass for nodes and ways
include category for parcel_locker
already start searching for queries extending length 2

* make openingTimes immutable

* OsmRepository changes
- include telephone number
- don't try to repeatedly update cache if there is no value to be
  updated to
- deduplicate results with same label by category and distance (100m)
- include fixmeurl to point to openstreetmaps.org/fixthemap

* ask for center in overpass API to compute center coordinates of ways

* search for brand

* add chemist location category

* restaurant / fastfood icon shenanigans

* actually add the icons :|

* add leisure tag for leisure:fitness_centre

* return to 'open until'/'opens in'/'open next'

* adding missing UI features
- bug report dialog
- call button if phone number exists
- grid item popup

* refactor to handle 24/7 locations more comfortably

* hide hours in 'opens_in' when they are zero

* show maptiles such that user is always in view

* drawing adjustments

* cache previous zoom level to speed up tile coordinate calculations

* using remember

* using MutableIntState

* fix logic that determines whether tiles are loading

* fix for numTiles == 9

* one plus one is two plus one makes three quick maths

* animate user location indicator, remember calculations

* fix off by one when determining next opening hour

* second attempt to fix upside down arrow rotation (probably fine now)

* logging

* reconsider declination, inject samplingPeriod

* undoing the merge undo

* move localization string to i18n

* revert reordering by distance

* refactor .distanceTo

* make Location abstract class to override compareTo with cached distance to correct sort order in search results

* when it is if when you could use when

* replace Pair with dataclass

* condition check order

* not creating objects with undefined locations, removing suspend from getCategory()

* inject permissionsmanager as constructor parameter

* Store OSM settings in decentralized datastore

* Update searchable content in database on launch

* Refactor, add mechanism to load updated searchable data lazily

* Cache all OSM data in launcher database

* Add pin to favorites button to location results

* Add sealed class UpdateResult
that is returned by awaiting updatedSelf of DeferredSearchable

- update on success
- set flag on temporarily unavailable (TODO add some UI indication)
- delete and invalidate VM on permanently unavailable (Display some
  message window to user?)

* Move sorting of Locations from OsmRepository
to SearchVM using cached location in DevicePoseProvider, if available

* make use of cached location in code

* make use of DevicePoseProvider in WeatherRepository

* inject via koin

* increase getLocation().timeout() to 10 minutes since we are asking for locations only every hour, so 10 minutes seem reasonable (?)

* poll new location every time

* add icon for cached results where results are temporarily unavailable

* Refactor DeferredSearchable to UpdatableSearchable
that receives a closure to retrieve an updated self.

- moved timestamp (formerly `updatedAt`) to UpdatableSearchable
- moved logic whether to update searchable to `requestUpdatedSearchable`
  in SearchableItemVM, which gets triggered every time the details of
  the item are shown
- keep track in SearchableVM whether we should retry updating, possibly
  bypassing a timestamp value that is not old enough
- show toast upon permanently unavailable
- animate "cached_searchable" icon
- make "cached_searchable" icon clickable to show toast explaining the
  situation

* logging on PermanentlyUnavailable

* refactor OsmRepository.update()

* MapTheming adjustments. There is now darkmode, hooray!

* remove outdated comment

* code tidying

* remove unnecessary LaunchedEffect

* make outdated badge only clickable when actually outdated

* deserialize opening schedule

* set deserialized props to null if strings are blank

* also consider contact:* tagging scheme for website & phone

* tweaks

* git add Result.kt

* don't search for locations if network is not allowed

* merge fixes

* Move location search settings to preferences module

* Change wording and order of location search preferences

* Limit location search results

* Order location search results by distance

* Use a sequence

* Android Studio's suggestion wasn't as fleshed out as one would hope

* Add proguard rules

* Rename TileMapRepository to MapTileLoader

---------

Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
2024-03-26 19:06:19 +01:00
MM20
8338bbf371
Fix number of favorites 2024-02-21 18:33:23 +01:00
Guillermo Villafuerte
905786f6ef
FIX: Empty file created by mistake on merge resolution.
Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>
2024-01-19 19:11:50 -06:00
Guillermo Villafuerte
7d0c1829a8
Merge remote-tracking branch 'upstream/main' into feat/materialYouCompat
Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>

# Conflicts:
#	app/ui/src/main/java/de/mm20/launcher2/ui/settings/appearance/AppearanceSettingsScreen.kt
#	app/ui/src/main/java/de/mm20/launcher2/ui/theme/colorscheme/Custom.kt
#	core/preferences/src/main/java/de/mm20/launcher2/preferences/DataStore.kt
#	core/preferences/src/main/java/de/mm20/launcher2/preferences/Defaults.kt
2024-01-19 18:10:42 -06:00
MM20
c16969ac5f
Remove old data store backup component 2024-01-19 22:32:12 +01:00
MM20
92ddc75060
Refactor preferences module 2024-01-19 22:29:37 +01:00
Guillermo Villafuerte
706bd38731
Added flag to use Material You Compat on Android 12+
Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>
2023-12-28 19:23:09 -06:00
MM20
2479fdbc03
Move badge settings to decentralized data store, add preference for plugin badges 2023-12-07 22:44:41 +01:00
MM20
966d43d4d1
Migrate file search settings to decentralized json data store 2023-11-25 18:54:27 +01:00
MM20
47cf4e9483
Refactor backup/restore
Close #575
2023-10-28 17:15:04 +02:00
MM20
f57cb71b9b
Add clock widget alignment preference 2023-10-13 12:46:33 +02:00
MM20
2dd72b1db2
Add digital clock variants:
- Outlined
- Material You
- OnePlus

Close #563, #422

Co-authored-by: elia vandini  <103252381+eliavandini@users.noreply.github.com>
2023-10-12 21:10:17 +02:00
MM20
2d5a0bf5a7
Modernize gradle scripts, migrate to TOML version catalog 2023-10-05 21:54:19 +02:00
MM20
5a821eaabe
Add preference to adjust wallpaper blur radius 2023-09-30 14:49:35 +02:00
MM20
d1371b224d
Add preference to disable charging animation
Close #456
2023-08-26 23:04:47 +02:00
MM20
1a86aa018e
Custom color schemes v2 - part 3
Store preferences and apply color schemes
2023-08-23 19:02:37 +02:00
MM20
8bca768197
Upgrade to Gradle 8 2023-08-06 16:28:57 +02:00
MM20
cb8dfb4873
Add migration for custom color scheme 2023-06-28 23:35:01 +02:00
MM20
b39d59e070
Add new surface colors to color schemes 2023-06-28 23:24:38 +02:00
MM20
918f340dd2
Add settings for home button gesture 2023-06-23 17:17:08 +02:00
MM20
5c7d162c88
Add preference to hide hidden items button 2023-05-09 19:47:16 +02:00
MM20
c59fa5b667
Let users pick media player apps 2023-04-16 18:38:15 +02:00
MM20
5b2ad94065
Move widget specific settings to widgets 2023-04-16 14:07:08 +02:00
MM20
971b015d9a
Set default corner radius to 12 2023-04-11 15:41:04 +02:00
MM20
70b406eb5c
Add preference to disable themed icons for themed icon packs 2023-03-15 17:09:23 +01:00
MM20
c37b280d29
Add ability to expand pinned tags to multiple lines 2023-03-11 00:26:02 +01:00
MM20
282ecf3e48
Change default preferences 2023-03-10 22:19:17 +01:00
Christoph
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
Christoph
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
MM20
77e22e5f2b
Add preferences for launch app gesture 2023-02-24 22:39:32 +01:00
MM20
d54b904c0a
Bring back the option to disable the clock widget's date part 2023-02-24 17:33:08 +01:00
Christoph
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
Christoph
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
MM20
ce71784b74
Set system bar color default to auto 2023-02-16 19:12:49 +01:00
MM20
fc2e239dfa
Don't enable favorites part by default 2023-02-09 14:06:11 +01:00
Christoph
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
Sir-Photch
e492a4975d adding fixedRotation to settings 2023-02-02 21:33:12 +01:00
MM20
1ad18f14ad
Add option to not scroll the search bar out of view 2023-01-21 14:00:30 +01:00
MM20
9e7286b3bb
Set default double tap action to lock screen only on Android 9+ 2023-01-20 11:35:39 +01:00
MM20
c12c07fa45
Gestures 2023-01-17 18:55:30 +01:00
MM20
64cc07bef9
Add preferences for layout 2023-01-16 17:49:45 +01:00