mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-23 13:24:11 +02:00
fix(frontend): ドライブのファイル更新が即座に反映されない問題の修正 (#17383)
This commit is contained in:
@@ -24,6 +24,8 @@ function rename(file: Misskey.entities.DriveFile) {
|
|||||||
misskeyApi('drive/files/update', {
|
misskeyApi('drive/files/update', {
|
||||||
fileId: file.id,
|
fileId: file.id,
|
||||||
name: name,
|
name: name,
|
||||||
|
}).then(updated => {
|
||||||
|
globalEvents.emit('driveFilesUpdated', [updated]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -37,6 +39,8 @@ async function describe(file: Misskey.entities.DriveFile) {
|
|||||||
misskeyApi('drive/files/update', {
|
misskeyApi('drive/files/update', {
|
||||||
fileId: file.id,
|
fileId: file.id,
|
||||||
comment: caption.length === 0 ? null : caption,
|
comment: caption.length === 0 ? null : caption,
|
||||||
|
}).then(updated => {
|
||||||
|
globalEvents.emit('driveFilesUpdated', [updated]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
closed: () => dispose(),
|
closed: () => dispose(),
|
||||||
@@ -49,6 +53,8 @@ function move(file: Misskey.entities.DriveFile) {
|
|||||||
misskeyApi('drive/files/update', {
|
misskeyApi('drive/files/update', {
|
||||||
fileId: file.id,
|
fileId: file.id,
|
||||||
folderId: folders[0] ? folders[0].id : null,
|
folderId: folders[0] ? folders[0].id : null,
|
||||||
|
}).then(updated => {
|
||||||
|
globalEvents.emit('driveFilesUpdated', [updated]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -57,6 +63,8 @@ function toggleSensitive(file: Misskey.entities.DriveFile) {
|
|||||||
misskeyApi('drive/files/update', {
|
misskeyApi('drive/files/update', {
|
||||||
fileId: file.id,
|
fileId: file.id,
|
||||||
isSensitive: !file.isSensitive,
|
isSensitive: !file.isSensitive,
|
||||||
|
}).then(updated => {
|
||||||
|
globalEvents.emit('driveFilesUpdated', [updated]);
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
os.alert({
|
os.alert({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
|||||||
Reference in New Issue
Block a user