using MahTweets.Mobile.Core; using MahTweets.Mobile.Core.Interfaces; using MahTweets.Mobile.Core.Repositories; namespace MahTweets.Mobile.ViewModels.Setup { public class PushSetupViewModel { public AccountRepository Accounts { get; private set; } public IApplicationSettings _applicationSettings { get; set; } public PushSetupViewModel(AccountRepository accountRepository, IApplicationSettings applicationSettings) { _applicationSettings = applicationSettings; Accounts = accountRepository; } public void HandlePush(bool pushDm, bool pushMention, IMicroblog account) { /* if (!string.IsNullOrEmpty(_applicationSettings.PushAccount) && _applicationSettings.PushAccount != account.Credentials.AccountId) ViewModelLocator.Current.MainViewModel.RemoveNotifications(_applicationSettings.PushAccount); _applicationSettings.PushAccount = account.Credentials.AccountId; //If neither are set, remove if (!pushDm && !pushMention) ViewModelLocator.Current.MainViewModel.RemoveNotifications(account.Credentials.AccountId); else { //Both if (pushDm && pushMention) _applicationSettings.Push = PushNotificationOptions.MentionsAndDirectMessages; //Just DM else if (pushDm) _applicationSettings.Push = PushNotificationOptions.DirectMessagesOnly; //Just Mention else _applicationSettings.Push = PushNotificationOptions.MentionsOnly; ViewModelLocator.Current.MainViewModel.SetNotifications(account.Credentials.AccountId); }*/ } } }