public bool AddCompletedScheduleId(string id) { List <string> completedIds = GetCompletedScheduleIds(); if (!completedIds.Contains(id)) { Debug.WriteLine($"Adding schedule ID {id} to the list of completed ones"); completedIds.Add(id); string prefValue = string.Join(" ", completedIds.ToArray()); appPreferences.Set(Constants.CompletedSchedulesKey, prefValue); Debug.WriteLine($"Wrote new list of completed schedule IDs to preferences: '{prefValue}'"); return(true); } return(false); }