+
this.focusedId === toot.uri)
+ const currentIndex = this.timeline.findIndex(toot => this.focusedId === toot.uri + toot.id)
return currentIndex === -1
}
},
@@ -192,28 +192,28 @@ export default {
this.focusedId = null
},
focusNext () {
- const currentIndex = this.timeline.findIndex(toot => this.focusedId === toot.uri)
+ const currentIndex = this.timeline.findIndex(toot => this.focusedId === toot.uri + toot.id)
if (currentIndex === -1) {
- this.focusedId = this.timeline[0].uri
+ this.focusedId = this.timeline[0].uri + this.timeline[0].id
} else if (currentIndex < this.timeline.length) {
- this.focusedId = this.timeline[currentIndex + 1].uri
+ this.focusedId = this.timeline[currentIndex + 1].uri + this.timeline[currentIndex + 1].id
}
},
focusPrev () {
- const currentIndex = this.timeline.findIndex(toot => this.focusedId === toot.uri)
+ const currentIndex = this.timeline.findIndex(toot => this.focusedId === toot.uri + toot.id)
if (currentIndex === 0) {
this.focusedId = null
} else if (currentIndex > 0) {
- this.focusedId = this.timeline[currentIndex - 1].uri
+ this.focusedId = this.timeline[currentIndex - 1].uri + this.timeline[currentIndex - 1].id
}
},
focusToot (message) {
- this.focusedId = message.uri
+ this.focusedId = message.uri + message.id
},
handleKey (event) {
switch (event.srcKey) {
case 'next':
- this.focusedId = this.timeline[0].uri
+ this.focusedId = this.timeline[0].uri + this.timeline[0].id
break
}
}