You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
966 B
38 lines
966 B
using Services;
|
|
using Models;
|
|
using ShopNCook.Pages;
|
|
|
|
namespace ShopNCook.Controllers
|
|
{
|
|
public class MorePageController
|
|
{
|
|
|
|
private readonly IApp app;
|
|
private readonly IEndpoint endpoint;
|
|
private readonly Account account;
|
|
|
|
public MorePageController(Account account, IEndpoint endpoint, IApp app)
|
|
{
|
|
this.app = app;
|
|
this.endpoint = endpoint;
|
|
this.account = account;
|
|
}
|
|
|
|
public void Logout()
|
|
{
|
|
UserNotifier.Notice("You have been logged out.");
|
|
app.ForceLogin();
|
|
}
|
|
|
|
public async void GoToMyRecipesPage()
|
|
{
|
|
await Shell.Current.Navigation.PushAsync(new MyRecipesPage(account, endpoint.RecipesService));
|
|
}
|
|
|
|
public async void GoToProfilePage()
|
|
{
|
|
await Shell.Current.Navigation.PushAsync(new ProfilePage(account));
|
|
}
|
|
}
|
|
}
|