diff --git a/Screenshots/Screenshot2-store.png b/Screenshots/Screenshot2-store.png index 8bec2d7..c22ffc3 100644 Binary files a/Screenshots/Screenshot2-store.png and b/Screenshots/Screenshot2-store.png differ diff --git a/Screenshots/Screenshot2.png b/Screenshots/Screenshot2.png index ededf59..e7ebe1e 100644 Binary files a/Screenshots/Screenshot2.png and b/Screenshots/Screenshot2.png differ diff --git a/SimpleClipboardManager.Package/_scale-100.appx b/SimpleClipboardManager.Package/_scale-100.appx index 2d10bcb..4adc33a 100644 Binary files a/SimpleClipboardManager.Package/_scale-100.appx and b/SimpleClipboardManager.Package/_scale-100.appx differ diff --git a/SimpleClipboardManager.Package/_scale-125.appx b/SimpleClipboardManager.Package/_scale-125.appx index 3a5ec8c..6e84aa4 100644 Binary files a/SimpleClipboardManager.Package/_scale-125.appx and b/SimpleClipboardManager.Package/_scale-125.appx differ diff --git a/SimpleClipboardManager.Package/_scale-150.appx b/SimpleClipboardManager.Package/_scale-150.appx index 93e1184..246e740 100644 Binary files a/SimpleClipboardManager.Package/_scale-150.appx and b/SimpleClipboardManager.Package/_scale-150.appx differ diff --git a/SimpleClipboardManager.Package/_scale-400.appx b/SimpleClipboardManager.Package/_scale-400.appx index 4384c18..ef85180 100644 Binary files a/SimpleClipboardManager.Package/_scale-400.appx and b/SimpleClipboardManager.Package/_scale-400.appx differ diff --git a/SimpleClipboardManager.Package/package.appxmanifest b/SimpleClipboardManager.Package/package.appxmanifest index 00fad35..567ed12 100644 --- a/SimpleClipboardManager.Package/package.appxmanifest +++ b/SimpleClipboardManager.Package/package.appxmanifest @@ -1,6 +1,6 @@  - + Simple Clipboard Manager diff --git a/SimpleClipboardManager/ClipboardManager.cs b/SimpleClipboardManager/ClipboardManager.cs index 26ad854..093f686 100644 --- a/SimpleClipboardManager/ClipboardManager.cs +++ b/SimpleClipboardManager/ClipboardManager.cs @@ -232,6 +232,7 @@ private void ClipboardNotification_ClipboardUpdated(string text) return; ClipboardItems.Insert(0, new ClipboardItem { Text = text }); + TruncateClipboardIfNeeded(); SaveClipboard(); } @@ -280,6 +281,7 @@ private void LoadClipboard() public void SaveSettings() { + TruncateClipboardIfNeeded(); var serializer = new DataContractSerializer(typeof(SettingsModel)); lock (FileAccessLock) { @@ -303,6 +305,20 @@ public void SaveSettings() } } + private void TruncateClipboardIfNeeded() + { + var numItemsToRemove = ClipboardItems.Count - Settings.MaxStoredItems; + if (numItemsToRemove <= 0) + return; + var copy = new List(ClipboardItems.Where(ci => ci.Favorite.HasValue == false)); + copy.Reverse(); + for (int i=0; i