gwt-material icon indicating copy to clipboard operation
gwt-material copied to clipboard

MaterialToast.fireToast could return "this"

Open gkresic opened this issue 5 years ago • 1 comments

Feature request.

For toasts with unlimited duration (lifeMillis < 0), we have to call .close() at some point so we need reference to opened toast.

Now, we have to create and fire such toast it in two steps:

MaterialToast toast = new MaterialToast();
toast.toast(message, -1);

With .fireToast(...) variants returning created toast, code could look even simpler:

MaterialToast toast = MaterialToast.fireToast(message, -1);

Change is rather trivial, but if needed, I could make a PR.

gkresic avatar Dec 02 '19 12:12 gkresic

Will create a branch 2.4 then you can base off with that branch for the PR.

kevzlou7979 avatar Jan 07 '20 03:01 kevzlou7979