Skip to content
Snippets Groups Projects
Commit 9e61ab57 authored by lain's avatar lain
Browse files

Revert "Throttle getReplies so it isn't called that often."

This reverts commit 86773579.
parent 86773579
No related branches found
No related tags found
No related merge requests found
import { find, filter, sortBy, throttle } from 'lodash'
import { find, filter, sortBy } from 'lodash'
import { statusType } from '../../modules/statuses.js'
import Status from '../status/status.vue'
......@@ -7,21 +7,6 @@ const sortAndFilterConversation = (conversation) => {
return sortBy(conversation, 'id')
}
const getReplies = function (id) {
let res = []
id = Number(id)
let i
for (i = 0; i < this.conversation.length; i++) {
if (Number(this.conversation[i].in_reply_to_status_id) === id) {
res.push({
name: `#${i}`,
id: this.conversation[i].id
})
}
}
return res
}
const conversation = {
data () {
return {
......@@ -73,7 +58,20 @@ const conversation = {
.then(() => this.fetchConversation())
}
},
getReplies: throttle(getReplies, 1000),
getReplies (id) {
let res = []
id = Number(id)
let i
for (i = 0; i < this.conversation.length; i++) {
if (Number(this.conversation[i].in_reply_to_status_id) === id) {
res.push({
name: `#${i}`,
id: this.conversation[i].id
})
}
}
return res
},
focused (id) {
if (this.statusoid.retweeted_status) {
return (id === this.statusoid.retweeted_status.id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment