From 08cc0901c5e94ee26468875da3fcd46e3ffa944d Mon Sep 17 00:00:00 2001 From: SWangHash <88996709+SWangHash@users.noreply.github.com> Date: Tue, 12 May 2026 15:09:04 +0800 Subject: [PATCH] fix knock share issue. --- .../vcoder/entry/src/main/ets/entryability/EntryAbility.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/vcoder/entry/src/main/ets/entryability/EntryAbility.ets b/src/apps/vcoder/entry/src/main/ets/entryability/EntryAbility.ets index 606b5c5929..15acc7539c 100644 --- a/src/apps/vcoder/entry/src/main/ets/entryability/EntryAbility.ets +++ b/src/apps/vcoder/entry/src/main/ets/entryability/EntryAbility.ets @@ -192,7 +192,7 @@ export default class EntryAbility extends RustAbility { private shareListening() { hilog.info(0x0000, 'vnext', 'shareListening'); - if (this.remoteUrl.length !=0 || !this.shareStatus) { + if (this.remoteUrl.length != 0 && !this.shareStatus) { harmonyShare.on('knockShare', this.sendOnlyCallback); this.shareStatus = true; } @@ -202,7 +202,7 @@ export default class EntryAbility extends RustAbility { this.shareStatus = false; } private sendOnlyCallback = (sharableTable: harmonyShare.SharableTarget) => { - if (this.remoteUrl.length == 0) { + if (this.remoteUrl.length != 0) { let content = this.remoteUrl; let shareData: systemShare.SharedData = new systemShare.SharedData({ utd: uniformTypeDescriptor.UniformDataType.HYPERLINK,