Skip to content

Commit

Permalink
Revert "Revert add-on storing in $f7.data"
Browse files Browse the repository at this point in the history
This reverts commit 300477c.
  • Loading branch information
florian-h05 committed Feb 22, 2024
1 parent 2859f6d commit 4778b69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ export default {
AddonDetailsSheet
},
data () {
if (!this.$f7.data.addonsStore) this.$f7.data.addonsStore = {}
return {
addons: {},
addons: this.$f7.data.addonsStore.addons || {},
currentAddon: null,
currentAddonId: null,
currentServiceId: null,
Expand Down Expand Up @@ -54,6 +55,7 @@ export default {
this.currentServiceId = null
},
startEventSource () {
this.$f7.data.addonsStore.addons = this.addons
this.eventSource = this.$oh.sse.connect('/rest/events?topics=openhab/addons/*/*', null, (event) => {
const topicParts = event.topic.split('/')
switch (topicParts[3]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ export default {
},
methods: {
onPageAfterIn () {
this.ready = Object.keys(this.addons).length > 0
this.load()
},
onPageBeforeOut () {
Expand Down

0 comments on commit 4778b69

Please sign in to comment.