Skip to content

Commit 1d1a6bd

Browse files
committed
Fixing backwards compatibility issue. Added back in old Enqueue method and forwarded to the new override.
1 parent 841e00c commit 1d1a6bd

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

MaterialDesignThemes.Wpf/ISnackbarMessageQueue.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,17 @@ public interface ISnackbarMessageQueue
5151
/// <param name="actionContent">Content for the action button.</param>
5252
/// <param name="actionHandler">Call back to be executed if user clicks the action button.</param>
5353
/// <param name="actionArgument">Argument to pass to <paramref name="actionHandler"/>.</param>
54-
/// <param name="promote">The message will promoted to the front of the queue.</param>
54+
/// <param name="promote">The message will be promoted to the front of the queue and never considered to be a duplicate.</param>
55+
void Enqueue<TArgument>(object content, object actionContent, Action<TArgument> actionHandler, TArgument actionArgument, bool promote);
56+
57+
/// <summary>
58+
/// Queues a notificaton message for display in a snackbar.
59+
/// </summary>
60+
/// <param name="content">Message.</param>
61+
/// <param name="actionContent">Content for the action button.</param>
62+
/// <param name="actionHandler">Call back to be executed if user clicks the action button.</param>
63+
/// <param name="actionArgument">Argument to pass to <paramref name="actionHandler"/>.</param>
64+
/// <param name="promote">The message will be promoted to the front of the queue.</param>
5565
/// <param name="neverConsiderToBeDuplicate">The message will never be considered a duplicate.</param>
5666
void Enqueue<TArgument>(object content, object actionContent, Action<TArgument> actionHandler,
5767
TArgument actionArgument, bool promote, bool neverConsiderToBeDuplicate);

MaterialDesignThemes.Wpf/SnackbarMessageQueue.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ public void Enqueue<TArgument>(object content, object actionContent, Action<TArg
217217
Enqueue(content, actionContent, actionHandler, actionArgument, false, false);
218218
}
219219

220+
public void Enqueue<TArgument>(object content, object actionContent, Action<TArgument> actionHandler,
221+
TArgument actionArgument, bool promote) =>
222+
Enqueue(content, actionContent, actionHandler, actionArgument, promote, promote);
223+
220224
public void Enqueue<TArgument>(object content, object actionContent, Action<TArgument> actionHandler,
221225
TArgument actionArgument, bool promote, bool neverConsiderToBeDuplicate)
222226
{

0 commit comments

Comments
 (0)