private async void ArchiveSetFunction(CardSetModel cardSetModelToArchive) { if (cardSetModelToArchive.IsStarred) { for (int i = 0; i < CardSets.Count; i++) { if (CardSets[i].IsStarred) { CardSets.Move(CardSets.IndexOf(cardSetModelToArchive), i); break; } } cardSetModelToArchive.IsStarred = false; } else { CardSets.Move(CardSets.IndexOf(cardSetModelToArchive), CardSets.Count - 1); cardSetModelToArchive.IsStarred = true; } await Task.Run(() => DataAccess.ArchiveCardSet_UWP(cardSetModelToArchive.SetID, cardSetModelToArchive.IsStarred)); }