public bool GetShowNewItem(string forAddress) { if (string.IsNullOrWhiteSpace(forAddress) || !ShowNewItemDict.ContainsKey(forAddress)) { return(false); } else { return(ShowNewItemDict[forAddress]); } }
public async Task SetShowNewItem(string targetAddress, bool value, bool clearDictFirst = false) { if (clearDictFirst) { ShowNewItemDict.Clear(); } if (string.IsNullOrWhiteSpace(targetAddress)) { return; } if (!ShowNewItemDict.ContainsKey(targetAddress)) { ShowNewItemDict.Add(targetAddress, value); } else { ShowNewItemDict[targetAddress] = value; } await BaseContainer.NotifyStateChanged(); }