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

How to hide toast? #9

Closed
maxrks opened this issue Oct 1, 2019 · 8 comments
Closed

How to hide toast? #9

maxrks opened this issue Oct 1, 2019 · 8 comments

Comments

@maxrks
Copy link

maxrks commented Oct 1, 2019

你好!对应BotToast.showLoading(),可否考虑增加hideLoading(),默认不是showLoading的Duration参数,一直显示等待界面,而当后续流程中用户可以通过代码调用hideLoading()手动结束Loading显示。谢谢! @MMMzq

@MMMzq
Copy link
Owner

MMMzq commented Oct 1, 2019

@LKTPD
你可以使用showLoading()的返回值进行关闭😄,所有showXxxToast方法都会返回一个CancelFunc函数,调用即可关闭对应的Toast

@MMMzq
Copy link
Owner

MMMzq commented Oct 8, 2019

如果还有问题要反馈,可以选择重新打开

@MMMzq MMMzq closed this as completed Oct 8, 2019
@slemankfa
Copy link

Dear @MMMzq Thanks for this sweet work

but I can't understand Kanji or Chinese char I was trying to translate and try to do as you explain but I don't do it very well can you do a simple example to close BotToast.showLoading();
how I can usecancel Fun ?
can you write the code, Thanks in advance

@MMMzq
Copy link
Owner

MMMzq commented Nov 1, 2019

@slemankfa

Of course !
Example:

CancelFunc cancel = BotToast.showLoading(); //popup loading toast
cancel(); //close loading toast

Note: all BotToast.showXxx functions will return CancelFunc

@slemankfa
Copy link

@slemankfa

Of course !
Example:

CancelFunc cancel = BotToast.showLoading(); //popup loading toast
cancel() ;  //close loading toast

Note: all BotToast.showXxx functions will return CancelFunc

Thank you, I was wondering how to use cancelFun in the correct way.
you dif a great Job ^^>

@Martibis
Copy link

@MMMzq Is there a way to cancel all currently open BotToasts?

@MMMzq
Copy link
Owner

MMMzq commented Mar 1, 2021

@MMMzq Is there a way to cancel all currently open BotToasts?

BotToast.cleanAll()

@Martibis
Copy link

Martibis commented Mar 1, 2021

Just what I needed thanks! Amazing work by the way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants