fix(Toast) Fixing fading.
This commit is contained in:
@@ -21,6 +21,7 @@ using Services.Immortal;
|
||||
|
||||
namespace Services;
|
||||
|
||||
|
||||
public interface IToastService
|
||||
{
|
||||
public void Subscribe(Action action);
|
||||
@@ -29,6 +30,7 @@ public interface IToastService
|
||||
void RemoveToast(ToastModel toast);
|
||||
bool HasToasts();
|
||||
List<ToastModel> GetToasts();
|
||||
void AgeToasts();
|
||||
void ClearAllToasts();
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ public class ToastService : IToastService
|
||||
public void RemoveToast(ToastModel toast)
|
||||
{
|
||||
toasts.Remove(toast);
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public bool HasToasts()
|
||||
@@ -54,6 +53,16 @@ public class ToastService : IToastService
|
||||
return toasts;
|
||||
}
|
||||
|
||||
public void AgeToasts()
|
||||
{
|
||||
foreach (var toast in toasts)
|
||||
{
|
||||
toast.Age++;
|
||||
}
|
||||
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
public void ClearAllToasts()
|
||||
{
|
||||
toasts.Clear();
|
||||
|
||||
Reference in New Issue
Block a user