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