Fix bug in toggle watchlater

This commit is contained in:
the1812 2019-08-14 20:02:22 +08:00
parent a5c0fdfa9a
commit 05290e7a2f
4 changed files with 6 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1105,11 +1105,7 @@ class Activities extends NavbarComponent {
try {
this.watchlater = !this.watchlater
const { toggleWatchlater } = await import('../../video/watchlater-api')
if (this.watchlater === false) {
await toggleWatchlater(this.card.aid, true)
} else {
await toggleWatchlater(this.card.aid, false)
}
await toggleWatchlater(this.card.aid, this.watchlater)
} catch (error) {
logError(`稍后再看操作失败: ${error}`)
this.watchlater = !this.watchlater