Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update shortcut tile add/remove + destroy handling #3974

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

jpelgrom
Copy link
Member

Summary

Follow-up to #3954: updates the shortcut tile's handling of add/remove event + destroying the service, just like the camera tile, to prevent the service scope being cancelled while the app is still storing tile added/removed and ending up with 'ghost tiles'.

(this service already didn't overwrite existing tile data when onTileAddEvent was called again)

Screenshots

n/a

Link to pull request in Documentation repository

n/a

Any other notes

 - Updates the shortcut tile's handling of add/remove event + destroying the service, just like the camera tile, to prevent the service scope being cancelled while the app is still storing tile added/removed
 - (this service already didn't overwrite existing tile data when onTileAddEvent was called again)
slovdahl added a commit to slovdahl/home-assistant-android that referenced this pull request Oct 27, 2023
@JBassett JBassett merged commit 73c928d into home-assistant:master Oct 28, 2023
7 checks passed
@jpelgrom jpelgrom deleted the tile-servicescope-backport branch October 28, 2023 15:21
slovdahl added a commit to slovdahl/home-assistant-android that referenced this pull request Dec 19, 2023
JBassett pushed a commit that referenced this pull request Jan 24, 2024
* Support multiple Template tiles on Wear OS

* Add `TemplateTileConfig` data class

* Fix migration

* `Pair` -> `TemplateTileConfig` fixes

* Fix `getAllTemplateTiles` implementation

* Initial work on companion <-> wearable device communication

* More work on phone <-> wear device communication

* Save updated template in phone app

* Get the template to render using the right method

* Fix CI complaints

* Work on Wear UI for multiple template tiles

* Update wear manifest

* Wear migration and navigation fixes

* Fix Template tile IDs in mobile app

* Make adding a new Template tile on Wear device work

* Small cleanups and TODO fixes

* Try to fix template config refresh in settings

* Fix after rebase

* Adopt blocking approach for reacting to tile events, inspired by #3974

* Use `OpenTileSettingsActivity` for template tile

* Adopt Material 3 and other UI-related changes

* Show help text in phone app if no template tiles have been added yet

* Reference the view model variable inside the function

By having the view model variable outside the block, the updated template tile
might not be propagated to the template settings view.

* Reload template tiles when opening the template tiles from settings

* Replace null key with -1 for old template tile

* Lint complaints fixes

* remove TODO

* Store error

* Scrollable list of template tiles

* Move "Configure template tile" to header

* Replace with methods with copy

* Show template as secondary text

* Fix scrolling

* Update app/src/full/java/io/homeassistant/companion/android/settings/wear/views/SettingsWearTemplateTileList.kt

Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>

* Remove unused field

* Move padding to "no tiles" text

* Add deep link

---------

Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants