Skip to content

Commit

Permalink
Fix pull request comments
Browse files Browse the repository at this point in the history
  • Loading branch information
niimima committed Jan 21, 2024
1 parent 1a4860c commit 35302bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
7 changes: 0 additions & 7 deletions src/Maui/Prism.Maui/Navigation/INavigationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ public interface INavigationService
/// <returns>If <c>true</c> a go back operation was successful. If <c>false</c> the go back operation failed.</returns>
Task<INavigationResult> GoBackAsync(INavigationParameters parameters);

/// <summary>
/// Navigates to the most recent entry in the back navigation history for the <paramref name="viewName"/>.
/// </summary>
/// <param name="viewName">The name of the View to navigate back to</param>
/// <returns>If <c>true</c> a go back operation was successful. If <c>false</c> the go back operation failed.</returns>
Task<INavigationResult> GoBackAsync(string viewName);

/// <summary>
/// Navigates to the most recent entry in the back navigation history for the <paramref name="viewName"/>.
/// </summary>
Expand Down
10 changes: 9 additions & 1 deletion src/Maui/Prism.Maui/Navigation/INavigationServiceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static Task<INavigationResult> GoBackToAsync(this INavigationService navi
/// </summary>
/// <returns><see cref="INavigationResult"/> indicating whether the request was successful or if there was an encountered <see cref="Exception"/>.</returns>
public static Task<INavigationResult> GoBackAsync(this INavigationService navigationService) =>
navigationService.GoBackAsync((INavigationParameters)null);
navigationService.GoBackAsync(new NavigationParameters());

/// <summary>
/// Navigates to the most recent entry in the back navigation history by popping the calling Page off the navigation stack.
Expand All @@ -33,6 +33,14 @@ public static Task<INavigationResult> GoBackAsync(this INavigationService naviga
return navigationService.GoBackAsync(GetNavigationParameters(parameters));
}

/// <summary>
/// Navigates to the most recent entry in the back navigation history for the <paramref name="viewName"/>.
/// </summary>
/// <param name="navigationService">Service for handling navigation between views</param>
/// <param name="viewName">The name of the View to navigate back to</param>
/// <returns>If <c>true</c> a go back operation was successful. If <c>false</c> the go back operation failed.</returns>
public static Task<INavigationResult> GoBackAsync(this INavigationService navigationService, string viewName) => navigationService.GoBackAsync(viewName, new NavigationParameters());

/// <summary>
/// When navigating inside a NavigationPage: Pops all but the root Page off the navigation stack
/// </summary>
Expand Down
6 changes: 0 additions & 6 deletions src/Maui/Prism.Maui/Navigation/PageNavigationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,6 @@ public virtual async Task<INavigationResult> GoBackAsync(INavigationParameters p
return Notify(NavigationRequestType.GoBack, parameters, GetGoBackException(page, GetPageFromWindow()));
}

/// <inheritdoc />
public virtual async Task<INavigationResult> GoBackAsync(string viewName)
{
return await GoBackAsync(viewName, null);
}

/// <inheritdoc />
public virtual async Task<INavigationResult> GoBackAsync(string viewName, INavigationParameters parameters)
{
Expand Down

0 comments on commit 35302bd

Please sign in to comment.