UI: Feature detect old search

This commit is contained in:
Marcel Klehr 2020-08-02 15:44:30 +02:00
parent 4212be5daf
commit a8220a45fa
2 changed files with 9 additions and 1 deletions

View File

@ -60,7 +60,10 @@ export default {
},
async created() {
this.search = new OCA.Search(this.onSearch, this.onResetSearch)
if (OCA.Search) {
// legacy search pre nc v20
this.search = new window.OCA.Search(this.onSearch, this.onResetSearch)
}
// set loading indicator
this.$store.commit(mutations.FETCH_START, { type: 'bookmarks' })
await Promise.all([

View File

@ -47,6 +47,11 @@ export default {
},
async created() {
if (OCA.Search) {
// legacy search pre nc v20
this.search = new window.OCA.Search(this.onSearch, this.onResetSearch)
}
// this.search = new OCA.Search(this.onSearch, this.onResetSearch)
this.$store.commit(mutations.SET_AUTH_TOKEN, this.$route.params.token)
// set loading indicator