void SetMessageNotifyPref(NotificationType type, int account) { if (messageFirstChange) { messageFirstChange = false; return; } Config.Accounts[account].Preferences.MessagesPreferences = type; if (type == NotificationType.None) { PushNotifications.UnregisterPushChannel(Config.Accounts[account], "messages"); } else { PushNotifications.AutoRegisterForNotifications(); } }