mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 09:08:24 +00:00
Fix focus point of already-attached media not saving after edit (#23566)
This commit is contained in:
parent
1d9ed91643
commit
b2283b6838
|
@ -165,11 +165,19 @@ export function submitCompose(routerHistory) {
|
|||
// API call.
|
||||
let media_attributes;
|
||||
if (statusId !== null) {
|
||||
media_attributes = media.map(item => ({
|
||||
media_attributes = media.map(item => {
|
||||
let focus;
|
||||
|
||||
if (item.getIn(['meta', 'focus'])) {
|
||||
focus = `${item.getIn(['meta', 'focus', 'x']).toFixed(2)},${item.getIn(['meta', 'focus', 'y']).toFixed(2)}`;
|
||||
}
|
||||
|
||||
return {
|
||||
id: item.get('id'),
|
||||
description: item.get('description'),
|
||||
focus: item.get('focus'),
|
||||
}));
|
||||
focus,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
api(getState).request({
|
||||
|
|
Loading…
Reference in a new issue