update feature/browser/src/main/ets/default/view/photo/RenameMenuOperation.ts.

Signed-off-by: liujuan <liujuan76@h-partners.com>
This commit is contained in:
liujuan 2024-03-08 07:30:35 +00:00 committed by Gitee
parent 19c7aa5e74
commit 99496db207
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -23,6 +23,7 @@ import {
MenuContext,
UiUtil
} from '@ohos/common';
import userFileManager from '@ohos.filemanagement.userFileManager';
const TAG: string = 'browser_RenameMenuOperation';
@ -74,7 +75,8 @@ export class RenameMenuOperation implements MenuOperation, MenuOperationCallback
let fileAsset = await dataImpl.getDataByUri(uri);
operationImpl.setName(fileAsset, name);
await operationImpl.change(fileAsset);
return { title: fileAsset.title, displayName: fileAsset.displayName };
return { title: String(fileAsset.get(userFileManager.ImageVideoKey.TITLE.toString())),
displayName: fileAsset.displayName };
}
async confirmCallback(title: string): Promise<void> {