forked from AkkomaGang/akkoma-fe
removing unnecessary conversions since it should already be converted in normalizer
This commit is contained in:
parent
8172eeb1e0
commit
80a7035154
4 changed files with 7 additions and 9 deletions
|
@ -7,7 +7,7 @@ const conversationPage = {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
statusoid () {
|
statusoid () {
|
||||||
const id = String(this.$route.params.id)
|
const id = this.$route.params.id
|
||||||
const statuses = this.$store.state.statuses.allStatuses
|
const statuses = this.$store.state.statuses.allStatuses
|
||||||
const status = find(statuses, {id})
|
const status = find(statuses, {id})
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,9 @@ const conversation = {
|
||||||
replies () {
|
replies () {
|
||||||
let i = 1
|
let i = 1
|
||||||
return reduce(this.conversation, (result, {id, in_reply_to_status_id}) => {
|
return reduce(this.conversation, (result, {id, in_reply_to_status_id}) => {
|
||||||
const irid = String(in_reply_to_status_id)
|
/* eslint-disable camelcase */
|
||||||
|
const irid = in_reply_to_status_id
|
||||||
|
/* eslint-enable camelcase */
|
||||||
if (irid) {
|
if (irid) {
|
||||||
result[irid] = result[irid] || []
|
result[irid] = result[irid] || []
|
||||||
result[irid].push({
|
result[irid].push({
|
||||||
|
@ -70,7 +72,6 @@ const conversation = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getReplies (id) {
|
getReplies (id) {
|
||||||
id = String(id)
|
|
||||||
return this.replies[id] || []
|
return this.replies[id] || []
|
||||||
},
|
},
|
||||||
focused (id) {
|
focused (id) {
|
||||||
|
@ -81,7 +82,7 @@ const conversation = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setHighlight (id) {
|
setHighlight (id) {
|
||||||
this.highlight = String(id)
|
this.highlight = id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,9 +64,6 @@ const visibleNotificationTypes = (rootState) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const mergeOrAdd = (arr, obj, item) => {
|
const mergeOrAdd = (arr, obj, item) => {
|
||||||
// For sequential IDs BE passes numbers as numbers, we want them as strings.
|
|
||||||
item.id = String(item.id)
|
|
||||||
|
|
||||||
const oldItem = obj[item.id]
|
const oldItem = obj[item.id]
|
||||||
|
|
||||||
if (oldItem) {
|
if (oldItem) {
|
||||||
|
@ -164,7 +161,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
||||||
}
|
}
|
||||||
|
|
||||||
const favoriteStatus = (favorite, counter) => {
|
const favoriteStatus = (favorite, counter) => {
|
||||||
const status = find(allStatuses, { id: String(favorite.in_reply_to_status_id) })
|
const status = find(allStatuses, { id: favorite.in_reply_to_status_id })
|
||||||
if (status) {
|
if (status) {
|
||||||
// This is our favorite, so the relevant bit.
|
// This is our favorite, so the relevant bit.
|
||||||
if (favorite.user.id === user.id) {
|
if (favorite.user.id === user.id) {
|
||||||
|
|
|
@ -151,7 +151,7 @@ const users = {
|
||||||
},
|
},
|
||||||
addNewNotifications (store, { notifications }) {
|
addNewNotifications (store, { notifications }) {
|
||||||
const users = map(notifications, 'from_profile')
|
const users = map(notifications, 'from_profile')
|
||||||
const notificationIds = notifications.map(_ => String(_.id))
|
const notificationIds = notifications.map(_ => _.id)
|
||||||
store.commit('addNewUsers', users)
|
store.commit('addNewUsers', users)
|
||||||
|
|
||||||
const notificationsObject = store.rootState.statuses.notifications.idStore
|
const notificationsObject = store.rootState.statuses.notifications.idStore
|
||||||
|
|
Loading…
Reference in a new issue