Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toast 有问题,有时候不显示 #67

Closed
CuteLicense opened this issue May 25, 2023 · 5 comments
Closed

toast 有问题,有时候不显示 #67

CuteLicense opened this issue May 25, 2023 · 5 comments
Labels
Bug 🐞 故障 Confirmed bugs or reports that are very likely to be bugs Stale 🕳️ 远古 Issue creater doesn't provide more specific information within a long time (often one month)

Comments

@CuteLicense
Copy link

CuteLicense commented May 25, 2023

toastLog('##**全部任务执行完毕**##')
sleep(3e3);
toast('全部任务执行完毕,即将退出...', true);    /* 显示消息框 3.5 秒钟. */
sleep(4e3);

第一次执行正常,重复执行时 toastLog、toast 随机不显示

@SuperMonster003
Copy link
Owner

如果 device.sdkInt 返回值为 28, 或者使用 鸿蒙 (HarmonyOS) 2 操作系统, 将可能出现 toast 功能异常.
参阅 消息浮动框 (Toast) 章节的序言部分.

若实际情况与上述情形均不相符, 请提供详细的问题描述 (如: 重复执行是指重复执行文件还是将代码放在循环体内; 不含 sleep 阻塞的 toast 测试; 导致异常必定复现的示例代码; 等).

@SuperMonster003 SuperMonster003 added Bug 🐞 故障 Confirmed bugs or reports that are very likely to be bugs Feedback Awaited 🕒 等待反馈 Waiting for the feedback from issue creater and issue will be closed if duration is over one month More Info Needed 🔎 提供详情 Further information is requested labels May 26, 2023
@CuteLicense
Copy link
Author

device.sdkInt 返回值为 33
操作过程:
vscode 中运行上面脚本,提示结束后,马上重新运行,如此重复。
在手机端运行较长的代码最后加上上述代码时会出现不显示的情况,我在进一步排查。
在手机端单独运行上述代码时,正常

@dqss
Copy link

dqss commented Jun 23, 2023

我试过好像是传入的参数太多,只能传入一个,log的话可以多个,

@SuperMonster003
Copy link
Owner

后续版本 (v6.3.4+) 会尝试将 toast 模块的实例暂存级别由 脚本运行时 (ScriptRuntime) 级别上升至 应用 (Application) 级别, 以解决上述问题, 请关注后续版本更新.

@SuperMonster003 SuperMonster003 added Accepted 🌱 受理 Maintainer may be busy resolving or fixing the labeled issues and removed Feedback Awaited 🕒 等待反馈 Waiting for the feedback from issue creater and issue will be closed if duration is over one month More Info Needed 🔎 提供详情 Further information is requested labels Jul 24, 2023
@SuperMonster003
Copy link
Owner

6.4.0 已尝试对上述问题做出优化, 如仍有问题, 可继续反馈.

此 issue 暂时关闭.

@SuperMonster003 SuperMonster003 added Stale 🕳️ 远古 Issue creater doesn't provide more specific information within a long time (often one month) and removed Accepted 🌱 受理 Maintainer may be busy resolving or fixing the labeled issues labels Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 故障 Confirmed bugs or reports that are very likely to be bugs Stale 🕳️ 远古 Issue creater doesn't provide more specific information within a long time (often one month)
Projects
None yet
Development

No branches or pull requests

3 participants