Commit graph

1146 commits

Author SHA1 Message Date
Daniel Shokouhi b504492f40
BLE Transmit fix blank state and check device supports advertising (#2500)
* Check if device supports BLE transmitter

* Always send a state instead of blank string

* Add attribute if transmitter is supported instead of sensor availability
2022-05-08 13:11:48 -04:00
Joris Pelgröm 66c57d5768
Add theming to widgets: Dynamic color (Material You) and Transparent (#2496)
* Add transparent widgets

 - Add options to the service, entity and template widgets to have a transparent background
 - Register configuration change intent filter for widgets in order to be able to respond to day/night changes (no longer fully automatic due to setting color with int)

* Support Material You dynamic color in widgets

 - In widgets that support theming (day/night or transparent), add an option to use Material You dynamic colors
 - Dynamic colors is now the default widget style for new widgets on devices that support them

* Tweak dynamic color theming

 - Update dynamic color values to better match other themed widgets such as those from Google
 - Remove configuration changed intent receiver for widgets because it is no longer required to get colors

* Add dynamic color theming to media player widget

 - Make the media player widget themeable and add an option to use dynamic colors (transparent doesn't make sense for this layout)

* Fix camera widget background if data cannot be loaded

* Add text size option to template widgets

 - Added an option to set the text size to template widgets to better align with other widget options

* Additional Android 12 widget updates

 - When using the dynamic color theme, also use the new Android 12 widget corner radius
 - Update placeholder values in widgets to match images, and refer to dynamic color XML to provide a better preview on Android 12. Reset values when providing template to match existing behaviour when no widget is found in the database.
 - Update entity state and template widget target size to 2x1 to match preview image
 - Make sure media player album art doesn't extend past corner radius if possible

* Change theme selection to dropdown, text color alignment

 - Change theme selection to use a dropdown menu (Spinner) instead of right-aligned radio buttons on multiple lines
 - Change text color selection to left-align radio buttons
2022-05-08 13:10:58 -04:00
Joris Pelgröm f33743dc14
Fix crash on start app on SDK <26 (#2497)
- Manually specify databind version to fix https://github.com/FasterXML/jackson-databind/issues/3412, as the Kotlin module still depends on the unfixed version and hasn't had a new release yet
2022-05-01 14:32:00 -04:00
Daniel Shokouhi f398d1bb37
Update changelog for week of 4/30 (#2495) 2022-04-30 20:13:14 -07:00
Joris Pelgröm b78d83e8be
Merge pull request #2494
* Fix sensor setting type converter
2022-04-30 15:41:25 -04:00
dependabot[bot] 883b949282
Bump actions/setup-java from 3.1.1 to 3.2.0 (#2479)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-30 07:59:41 -04:00
Joris Pelgröm 13a747fdb9
Notification sensors: make arrays and bundles within main bundle readable (#2482)
* Notification sensors: convert extra bundle arrays to lists

 - If the notification extras contain any arrays, convert them to lists because when stringified, this will create a human readable text like "[Message 1, Message 2]" instead of something like "[Ljava.lang.String;@5d099f62"

* Convert BaseBundle arrays to lists as well

 - Include array types that are in the superclass BaseBundle as well when converting values to a list
 - Moved to another function to limit duplicated code

* Map bundles within a notification's bundle as well

 - Also map any bundles we find inside a bundle, or if there is an array of bundles, to make this information readable as well
2022-04-30 07:53:30 -04:00
Joris Pelgröm b418491667
Breaking change: send sensor list attributes as list to server (#2478)
* Breaking change: send sensor list attributes as list to server

 - Send a sensor attribute that is managed by the app as a list, to the server as a list as well instead of a stringified version of a list.

* Fallback to string for lists that include separator

 - To prevent issues where we can't distinguish the list items separator from a value that includes the separator, don't try to convert a value to a list if that is the case but instead use string

* Improve string fallback for lists that include separator

 - Instead of only falling back when a list includes a String with the separator, just use toString() to also support other objects which might include ", " when stringified, such as nested lists

* Store list data as JSON

 - To remove any confusion when sending individual list items, store data as JSON to escape characters if necessary
 - Map Any data in a list that is not any of the specific types to string, for consistency with the same types when not in a list and to prevent JSON serialization issues
2022-04-30 07:47:44 -04:00
Joris Pelgröm d6add75168
Show media player artist/album more often (#2493)
- Also show media player artist if there is only an album artist
 - Also show media player album if there is no artist known
2022-04-30 07:41:17 -04:00
Daniel Shokouhi a4fc7b0a3f
Add a sensor for high accuracy update interval (#2490) 2022-04-30 07:37:54 -04:00
Joris Pelgröm bbaea010bd
Handle individual exceptions while creating device controls better (#2484)
* Ensure current mode is also supported for climate entities

* Don't crash when creating control fails

 - Handle failures while creating a control gracefully: skip controls when showing all available controls, and show an error tile similar to network errors for existing controls
2022-04-30 07:36:38 -04:00
Joris Pelgröm fe0fcf8c54
Fix Wear endlessly loading on no connected devices (#2476)
- Fix the Wear OS settings activity (seemingly) endlessly loading if there are no connected devices, by showing a proper error message for this situation
 - Set title for Toolbar
2022-04-30 07:30:51 -04:00
Tiger Oakes 2384f0f84d
Use enum for sensor setting type (#2469)
* Use enum for sensor setting type

* Clean up type conversions

* Full variant
2022-04-30 07:29:26 -04:00
dependabot[bot] ec6ae4345c
Bump kotlin-stdlib-jdk8 from 1.6.20 to 1.6.21 (#2467)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.6.20 to 1.6.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-23 07:34:05 -04:00
dependabot[bot] 129906915a
Bump kotlin-reflect from 1.6.20 to 1.6.21 (#2466)
Bumps [kotlin-reflect](https://github.com/JetBrains/kotlin) from 1.6.20 to 1.6.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-23 07:22:53 -04:00
Joris Pelgröm fc8e961ef1
Add haptic + toast feedback to Wear OS details screen (#2455) 2022-04-23 07:16:21 -04:00
Tiger Oakes 3309c59bfd
Move SensorDao operations to Transactions (#2447)
* Add setSensorsEnabled helper

* Update SensorDetailViewModel

* Update sensormanager
2022-04-23 07:10:51 -04:00
Joris Pelgröm f4c4d72518
Suggest or highlight current SSID in home SSID dialog (#2457)
- Show a chip suggesting the user to add the SSID of the currently connected network, if not already added to the list of home SSIDs, in the home SSID dialog
  - Change icon for listed SSIDs in home SSID dialog to DKGRAY by default, and only show currently connected SSID icon in accent color
  - Add missing contentDescription for ImageButtons
  - Use correct tint namespace
  - Update deprecated code
2022-04-17 08:48:40 -04:00
Daniel Shokouhi 90b8d03002
Update change log for week of 4/16 (#2461) 2022-04-16 15:01:55 -07:00
dependabot[bot] d3014ba074
Bump sentry-android from 5.7.2 to 5.7.3 (#2459)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-java/compare/5.7.2...5.7.3)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-14 08:41:32 -04:00
dependabot[bot] 48e0792cf2
Bump kotlinx-coroutines-play-services from 1.6.0 to 1.6.1 (#2454)
Bumps [kotlinx-coroutines-play-services](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-play-services
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 19:49:39 -04:00
dependabot[bot] 04d8980ad0
Bump sentry-android from 5.7.1 to 5.7.2 (#2453)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-java/compare/5.7.1...5.7.2)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 19:37:18 -04:00
dependabot[bot] 502ef764a3
Bump gradle from 7.1.2 to 7.1.3 (#2452)
Bumps gradle from 7.1.2 to 7.1.3.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 19:18:35 -04:00
dependabot[bot] 9ed331f9e7
Bump kotlinx-coroutines-android from 1.6.0 to 1.6.1 (#2451)
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 19:18:05 -04:00
dependabot[bot] 484e3127c1
Bump kotlinx-coroutines-core from 1.6.0 to 1.6.1 (#2432)
Bumps [kotlinx-coroutines-core](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 19:16:56 -04:00
dependabot[bot] 536139ab5e
Bump kotlin-stdlib-jdk8 from 1.6.10 to 1.6.20 (#2427)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.6.10 to 1.6.20.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.10...v1.6.20)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 19:16:41 -04:00
dependabot[bot] c14eb2d7c9
Bump kotlinx-coroutines-guava from 1.6.0 to 1.6.1 (#2431)
Bumps [kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 18:48:45 -04:00
dependabot[bot] 4a54defab6
Bump kotlin-reflect from 1.6.10 to 1.6.20 (#2425)
Bumps [kotlin-reflect](https://github.com/JetBrains/kotlin) from 1.6.10 to 1.6.20.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.10...v1.6.20)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 18:44:13 -04:00
dependabot[bot] b117ec60c3
Bump actions/setup-java from 3.0.0 to 3.1.1 (#2448)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.0.0 to 3.1.1.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.0.0...v3.1.1)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 18:43:32 -04:00
Joris Pelgröm 4a5d58053c
Don't load icon dialog resources every time and on main thread (#2450)
- Don't load the icon dialog's icon pack every time the fragment is resumed, it only needs to be loaded once
 - Don't load the icon dialog's icon pack on the main thread, instead load it on the IO thread to prevent blocking the fragment UI thread (as suggested in the loadDrawables function)
 - Clean up @RequiresApi(Build.VERSION_CODES.N_MR1) annotations
2022-04-12 18:41:52 -04:00
Tiger Oakes 93203419a7
Convert HomeAssistantSearcher to LifecycleObserver (#2446) 2022-04-12 18:35:31 -04:00
Nicolas Mowen 06125bde2b
Add persistent websocket connection notification command (#2445)
* Add persistent websocket connection notification command

* Remove unused import

* Catch invalid persistent type

* Start / stop websocket immediately
2022-04-12 18:33:31 -04:00
Joris Pelgröm 27de0d791d
Rename more Lovelace to Dashboard (#2443) 2022-04-12 18:32:05 -04:00
Joris Pelgröm c4c414f9f4
Breaking change: update user agent and append to webview UA (#2442)
- Include the original webview user agent in the webview to improve compatibility with sites that use user agent sniffing
 - Updates the app's user agent to use the more standard product/version (details) format
2022-04-12 18:31:34 -04:00
Joris Pelgröm 8ce64f5ed6
Convert NFC tags interface to Compose and update design (#2441)
* Convert NFC tags interface to Compose

 - Rebuild the NFC tags interface with Compose instead of multiple fragments, move more functionality to the NfcViewModel
 - Design updates to match other settings screens (white top app bar, additional icons, don't use text inputs for showing data)
 - Update strings for consistency
 - Update Navigation version to latest stable, and remove non-Compose dependency because it is no longer required

* Update NFC trigger example

 - Add slightly more text to explain how to use it as a trigger in the visual automation editor, which most users will use
 - Add an easier example for scanning the tag, and rename the existing example to clarify that it is only for this device

* Add link to tag documentation to top app bar

* Handle NFC turned off

 - Check to see if NFC is actually turned on when the user opens settings, and prompt them to turn it on if required. Also do the same for the tag writing screen because that might be opened directly by the frontend.
 - Update strings to always use 'device' instead of a mix of 'device' and 'phone'

* Add option to change ID written to tag

 - Allow the user to change the ID that is written to the NFC tag when using the 'write tag' button from the app settings, to match frontend and iOS which also allow the user to change the tag ID

* Don't allow setting state outside NfcViewModel

* Simplify device trigger example even further

* Don't duplicate tag data extraction code

* Also convert tag reader activity to Compose

 - Shouldn't be seen in most cases by users
2022-04-12 18:29:57 -04:00
Tiger Oakes 6c64b31f7e
Use collectAsState for SensorDao.getAllFlow (#2423) 2022-04-06 17:52:21 -04:00
Tiger Oakes cd008d9785
Streamline TileDao (#2422)
* Remove unused tileList

* Make TileDao.add a coroutine
2022-04-06 17:49:25 -04:00
Joris Pelgröm 6e8ed81455
Rename Lovelace to Dashboard (#2435)
- Renames Lovelace to Dashboard to follow core 2022.4
 - Remove unused string array that also included Lovelace
2022-04-06 17:44:27 -04:00
dependabot[bot] 7dada2d812
Bump sentry-android from 5.7.0 to 5.7.1 (#2415)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 5.7.0 to 5.7.1.
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-java/compare/5.7.0...5.7.1)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-03 08:40:07 -04:00
Tiger Oakes c788901778
Use suspend calls for widget daos (#2410)
* Add base interface for widget entities

* Helper for widget flow -> state

* Refactor ManageWidgetsView to avoid duplicate code and string types

* Switch add/deleteAll to suspend

* Change abstract functions to suspend

* Remove unused imports
2022-04-03 08:35:15 -04:00
Joris Pelgröm c2f0293837
Faster 'Detected Activity' sensor while updating fast (#2420)
- Request an update for the detected activity sensor every minute if the app is currently doing faster sensor updates, instead of every 2 minutes, to try to have an up-to-date recognition value every time the data is sent.
 - Fix inconsistent update behaviour after changing the setting but before restarting when registered for the ACTION_TIME_TICK intent by always checking the setting, and not only when set to 'fast while charging'.
2022-04-03 08:28:27 -04:00
Joris Pelgröm aaef43ae38
Improve Manage sensors list and details screens (#2418)
* Add sticky headers to manage sensors list

 - The list of managers, and for some managers the list of sensors, is getting so long that sticky headers while scrolling is nice to have to quickly see where you are when doing a fast scroll
 - Remove useless sorting of managers, original list is already sorted

* Include manager name in manage sensors search

 - Also match sensors when using the search function in the manage sensors list when their manager's name matches the search query. This will for example allow searching for all audio sensors, or finding high accuracy mode when searching for location.

* Add stateless/fallback/default icons to sensors

 - Add a new stateless icon to sensors that is used as a default/fallback within the UI
 - Add icons for sensors to the main list of sensors, blue like in the frontend when enabled and disabled alpha when disabled
 - Name deviceClass and unitOfMeasurement arguments where used in sensors

* Fix sensor a-z sorting

* Show entity in details screen more like frontend

 - Update the design for the entity details screen to closer match what is shown in the frontend; at the top of the screen there is now a card that mimics the layout of the entity on the (default) dashboard. This includes the icon (no longer text only), name (previously completely absent from this screen) and the state. Enable/disable is now better highlighted.
 - Some technical information was removed, in line with making this page less like a database dump (use dev tools if that's required).

* Show 'None selected' for empty multi-list preferences

* Add info about update frequency to BasicSensor

 - Adds information about the update frequency to a BasicSensor
 - Change design for sensor details to better highlight description, and add a chip that shows current sensor update frequency taking into account app settings and Android version

* Change description on Sensor Update Frequency screen

* Fix description

* Change update type for detected activity sensor

 - This uses a callback on a ~2 minute interval but can be more frequent when other apps are using the API. Worker updates only re-register the callback.

* Revert "Change update type for detected activity sensor"

 - It might be updated faster but doesn't actually send new values any faster
2022-04-03 08:25:01 -04:00
Tiger Oakes 0f26ce3382
Remove blocking calls from HaControls (#2413)
* Launch performAction in a coroutine scope

* Change performAction to suspend function
2022-04-03 08:05:40 -04:00
Daniel Shokouhi e4c069f743
Update changelog for week of 3/25 (#2406) 2022-03-26 13:14:00 -07:00
Joris Pelgröm ac83869cfa
Add AppDatabase v24 -> v25 auto migration (#2407)
* Add AppDatabase v24 -> v25 migration

* Export Room schema to use AutoMigration instead
2022-03-25 20:02:44 -04:00
Daniel Shokouhi ff0fb0da89
Bump DB version to prevent a crash on updating (#2405) 2022-03-25 13:43:16 -04:00
Tiger Oakes dbb1e8bf5d
Use suspend and transactions for Favorites dao (#2398) 2022-03-25 12:56:18 -04:00
Joris Pelgröm 81831a978e
Fix Wear default domain icon on shortcut tile (#2404)
- Fixes the default domain icon on shortcut tiles not working because of a missing ".", used an extension function to prevent this problem in the future
2022-03-25 12:51:58 -04:00
Julien Ehrhart cfd277e2f7
Correct minimal value for high_accuracy_set_update_interval (#2402)
Fixes #2401
2022-03-25 12:46:03 -04:00
Joris Pelgröm 0623d16142
Fix gesture detection on WebViewActivity (#2396)
* Fix gesture detection on WebViewActivity

 - Add actual gesture detection to the webview instead of pointer detection in order to fix the search box showing up any time 3 fingers are placed on the screen

* Remove nullable min/max velocity

 - These always get a value so there is no need to make them initially nullable

* Cleanup fling detection

* Reduce minimum swipe velocity requirement

* Change direction calculation to average

 - Use the average velocity of all pointers to determine in which direction the user has swiped. The previous implementation used the first/last pointer's angle which isn't necessarily the same pointer.
 - Fix reducing number of pointers when velocity tracker is reset due to an opposing pointer
2022-03-25 12:44:06 -04:00