Skip to content

Commit 642705f

Browse files
committed
Adapt slider after adding Favorite, such that it is shown
Signed-off-by: Arne Hamann <git@arne.email>
1 parent 0c5aa2b commit 642705f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/views/App.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,6 +1630,7 @@ export default {
16301630
this.addFavorite(latLng, null, null, null, null, true, true)
16311631
},
16321632
addFavorite(latLng, name = null, category = null, comment = null, extensions = null, save = true, openSidebar = false) {
1633+
this.favoritesLoading = true
16331634
if (category === null) {
16341635
category = this.lastUsedFavoriteCategory
16351636
}
@@ -1650,8 +1651,18 @@ export default {
16501651
window.OCA.Files.Sidebar.setActiveTab('favorite')
16511652
this.openSidebar(null, 'favorite', fav.name)
16521653
}
1654+
if (this.sliderEnabled) {
1655+
if (this.sliderStart > fav.date_created) {
1656+
this.sliderStart = this.minDataTimestamp
1657+
}
1658+
if (this.sliderEnd < fav.date_created) {
1659+
this.sliderEnd = this.maxDataTimestamp
1660+
}
1661+
}
1662+
this.favoritesLoading = false
16531663
return fav.id
16541664
}).catch((error) => {
1665+
this.favoritesLoading = false
16551666
console.error(error)
16561667
})
16571668
},

0 commit comments

Comments
 (0)