private async void OnUpdate(object sender, ContributorUpdateEventArgs e) { if (e.ContributorId == Id) { if ((e.Updates & ContributorUpdates.XenforoID) == ContributorUpdates.XenforoID) { XenforoId = e.XenforoId; } if ((e.Updates & ContributorUpdates.TotalCredits) == ContributorUpdates.TotalCredits) { TotalCredits = e.TotalCredits; } if ((e.Updates & ContributorUpdates.LastDonation) == ContributorUpdates.LastDonation) { LastDonation = e.LastDonation; } if ((e.Updates & ContributorUpdates.LastAmount) == ContributorUpdates.LastAmount) { LastAmount = e.LastAmount; } // Direct tier update shouldn't be pushed this way //if ((e.Updates & ContributorUpdates.Tier) == ContributorUpdates.Tier) // Tier = e.Tier; if ((e.Updates & ContributorUpdates.ChatColor) == ContributorUpdates.ChatColor) { ChatColor = e.ChatColor; } if ((e.Updates & ContributorUpdates.Settings) == ContributorUpdates.Settings) { Settings = e.Settings; } if ((e.Updates & ContributorUpdates.Notifications) == ContributorUpdates.Notifications) { Notifications = e.Notifications; // Update notifications await UpdateNotifications(); } } }
private async void OnUpdate(object sender, ContributorUpdateEventArgs e) { if (e.ContributorId == Id) { if ((e.Updates & ContributorUpdates.XenforoID) == ContributorUpdates.XenforoID) XenforoId = e.XenforoId; if ((e.Updates & ContributorUpdates.TotalCredits) == ContributorUpdates.TotalCredits) TotalCredits = e.TotalCredits; if ((e.Updates & ContributorUpdates.LastDonation) == ContributorUpdates.LastDonation) LastDonation = e.LastDonation; if ((e.Updates & ContributorUpdates.LastAmount) == ContributorUpdates.LastAmount) LastAmount = e.LastAmount; // Direct tier update shouldn't be pushed this way //if ((e.Updates & ContributorUpdates.Tier) == ContributorUpdates.Tier) // Tier = e.Tier; if ((e.Updates & ContributorUpdates.ChatColor) == ContributorUpdates.ChatColor) ChatColor = e.ChatColor; if ((e.Updates & ContributorUpdates.Settings) == ContributorUpdates.Settings) Settings = e.Settings; if ((e.Updates & ContributorUpdates.Notifications) == ContributorUpdates.Notifications) { Notifications = e.Notifications; // Update notifications await UpdateNotifications(); } } }