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

List Multiple Toast Messages #180

Open
RonanMaguire opened this issue Jul 2, 2024 · 1 comment
Open

List Multiple Toast Messages #180

RonanMaguire opened this issue Jul 2, 2024 · 1 comment

Comments

@RonanMaguire
Copy link

Is it possible to have multiple stack messages appear in a list?

i.e. The use case would be to connect and then log an api request so it would be good if there was an ability to do this.
At the moment the toast messages just appear over each other. Is there a way to show something like:

[Request Sent]
[Successfully connected]

at the top of the screen e.g the success message appears then the request sent message comes after and shuffles the former message down the screen?

@sunnylqm
Copy link
Collaborator

sunnylqm commented Jul 3, 2024

you can make a simple taskQueue like this

let taskQueue = Promise.resolve();

export function addToMsgQueue(newMsg) {
  taskQueue = taskQueue.then(async () => {
      await someAnimationIn();
      showToast(newMsg);
      await someAnimationOut();
  });
}

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

2 participants