edit history weirdness
This commit is contained in:
parent
fdc0f39187
commit
039870daf0
3 changed files with 5 additions and 19 deletions
|
|
@ -184,7 +184,10 @@ export const fetchStatusHistory = ({ id, credentials }) =>
|
|||
return {
|
||||
...rest,
|
||||
data: [...data].reverse().map((item) => {
|
||||
item.originalStatus = status
|
||||
// History data is missing a lot of stuff present in original
|
||||
// but we're really only missing the id for the timeago, the
|
||||
// rest seem to render just fine.
|
||||
item.id = id
|
||||
return parseStatus(item)
|
||||
}),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,20 +174,7 @@ export const BUTTONS = [
|
|||
)
|
||||
},
|
||||
action({ status }) {
|
||||
const originalStatus = { ...status }
|
||||
const stripFieldsList = [
|
||||
'attachments',
|
||||
'created_at',
|
||||
'emojis',
|
||||
'text',
|
||||
'raw_html',
|
||||
'nsfw',
|
||||
'poll',
|
||||
'summary',
|
||||
'summary_raw_html',
|
||||
]
|
||||
stripFieldsList.forEach((p) => delete originalStatus[p])
|
||||
useStatusHistoryStore().openModal(originalStatus.id)
|
||||
useStatusHistoryStore().openModal(status.id)
|
||||
return Promise.resolve()
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -342,10 +342,6 @@ export const parseStatus = (data) => {
|
|||
output.favoritedBy = []
|
||||
output.rebloggedBy = []
|
||||
|
||||
if (Object.hasOwn(data, 'originalStatus')) {
|
||||
Object.assign(output, data.originalStatus)
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue