From 786b03c3d47160b454cf5350473b8d7ae99c4f8f Mon Sep 17 00:00:00 2001 From: "@feng-yu4279" Date: Tue, 13 May 2025 16:06:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=9F=E5=BC=83api=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/home/src/main/ets/view/CommentKeyboard.ets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/home/src/main/ets/view/CommentKeyboard.ets b/features/home/src/main/ets/view/CommentKeyboard.ets index 16c3808..e8a3978 100644 --- a/features/home/src/main/ets/view/CommentKeyboard.ets +++ b/features/home/src/main/ets/view/CommentKeyboard.ets @@ -55,19 +55,19 @@ export struct CommentKeyboard { @Consume navDialogPageInfos: NavPathStack; aboutToAppear(): void { - window.getLastWindow(getContext(this)).then(win => { + window.getLastWindow(this.getUIContext().getHostContext()).then(win => { this.addKeyboardHeightListener(win); }); } aboutToDisappear(): void { - window.getLastWindow(getContext(this)).then(win => { + window.getLastWindow(this.getUIContext().getHostContext()).then(win => { this.removeKeyboardHeightListener(win); }); } getResourceString(resource: Resource): string { - return getContext(this).resourceManager.getStringSync(resource.id); + return this.getUIContext().getHostContext()!.resourceManager.getStringSync(resource.id); } addKeyboardHeightListener(win: window.Window) { @@ -354,7 +354,7 @@ export struct CommentKeyboard { .height( this.isEmojiKeyboardVisible ? this.keyboardHeight + this.frequentEmojiListHeight : - this.keyboardHeight + this.keyboardHeight ) } .backgroundColor(Color.White) -- Gitee