mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-29 19:19:36 +01:00
Fix focus point of already-attached media not saving after edit (#23566)
This commit is contained in:
parent
11d6663025
commit
900790184a
1 changed files with 13 additions and 5 deletions
|
@ -165,11 +165,19 @@ export function submitCompose(routerHistory) {
|
||||||
// API call.
|
// API call.
|
||||||
let media_attributes;
|
let media_attributes;
|
||||||
if (statusId !== null) {
|
if (statusId !== null) {
|
||||||
media_attributes = media.map(item => ({
|
media_attributes = media.map(item => {
|
||||||
id: item.get('id'),
|
let focus;
|
||||||
description: item.get('description'),
|
|
||||||
focus: item.get('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,
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
api(getState).request({
|
api(getState).request({
|
||||||
|
|
Loading…
Reference in a new issue