private void StartSave(Model.CompactList list) { string type = null; if (_itemType == "venue") { type = "venueId"; } if (_itemType == "tip") { type = "tipId"; } if (_itemType == "item") { type = "itemId"; } if (type == null) { return; } if (_optionalListId == null) { FourSquare.Instance.UpdateListAddItem(list.Id, type, _itemId, "Saving to list", () => RefreshList(list), (ex) => Warn(list)); } else { // this is a list and item clone/save operation. ugly code dupe. FourSquare.Instance.UpdateListAddItemFromList( list.Id, _optionalListId, _itemId, "Saving to list", () => RefreshList(list), (ex) => Warn(list)); } }
private void Warn(Model.CompactList list) { if (_warned == false) { PriorityQueue.AddUiWorkItem(() => { if (!_warned) { _warned = true; System.Windows.MessageBox.Show("Wasn't able to save the item to " + list.Name); } }); } }
private void OnListCreateSuccess(Model.CompactList list) { NewlyCreatedList = list; _refreshToken = CentralStatusManager.Instance.BeginLoading("Preparing your list"); IntervalDispatcher.BeginInvoke(TimeSpan.FromSeconds(1.0), () => { var temporary = DataManager.Current.Refresh <Model.UserLists>( new LoadContext("self"), OnListsLoaded, OnListsFailed); }); }
private void RefreshList(Model.CompactList list) { DataManager.Current.Refresh <Model.List>(new LoadContext(list.Id), null, null); }
public WrappedList(Model.CompactList cl) : this() { Item = cl; }
private void OnListCreateSuccess(Model.CompactList list) { NewlyCreatedList = list; _refreshToken = CentralStatusManager.Instance.BeginLoading("Preparing your list"); IntervalDispatcher.BeginInvoke(TimeSpan.FromSeconds(1.0), () => { var temporary = DataManager.Current.Refresh<Model.UserLists>( new LoadContext("self"), OnListsLoaded, OnListsFailed); }); }