Fix double request

This commit is contained in:
2017-07-19 08:45:41 +02:00
parent 6b64cc62dd
commit 1f3507ea9e
2 changed files with 17 additions and 5 deletions

View File

@ -232,7 +232,7 @@ export class AnimeNotifier {
if(message.url.includes("/_/")) {
// Content reload
this.contentLoadedActions.then(() => {
this.reloadContent()
this.reloadContent(true)
})
} else {
// Full page reload
@ -318,11 +318,16 @@ export class AnimeNotifier {
}
}
reloadContent() {
reloadContent(cached?: boolean) {
console.log("reload content", "/_" + this.app.currentPath)
let headers = new Headers()
headers.append("X-Reload", "true")
if(!cached) {
headers.append("X-Reload", "true")
} else {
headers.append("X-CacheOnly", "true")
}
let path = this.app.currentPath
this.lastReloadContentPath = path