diff --git a/Dotnet/AppApi/AppApi.cs b/Dotnet/AppApi/AppApi.cs index 80773474..282b4935 100644 --- a/Dotnet/AppApi/AppApi.cs +++ b/Dotnet/AppApi/AppApi.cs @@ -154,13 +154,21 @@ namespace VRCX var newWidth = image.Width; if (image.Width < desiredWidth) { - newWidth = desiredWidth; - newHeight = (int)Math.Round(image.Height / (image.Width / (double)newWidth)); + var testHeight = (int)Math.Round(image.Height / (image.Width / (double)desiredWidth)); + if (testHeight <= desiredHeight) + { + newWidth = desiredWidth; + newHeight = testHeight; + } } if (image.Height < desiredHeight) { - newHeight = desiredHeight; - newWidth = (int)Math.Round(image.Width / (image.Height / (double)newHeight)); + var testWidth = (int)Math.Round(image.Width / (image.Height / (double)desiredHeight)); + if (testWidth <= desiredWidth) + { + newHeight = desiredHeight; + newWidth = testWidth; + } } var resizedImage = new Bitmap(desiredWidth, desiredHeight); using var graphics1 = Graphics.FromImage(resizedImage); diff --git a/html/src/classes/sharedFeed.js b/html/src/classes/sharedFeed.js index 89ad31fc..4fd6e322 100644 --- a/html/src/classes/sharedFeed.js +++ b/html/src/classes/sharedFeed.js @@ -579,18 +579,18 @@ export default class extends baseClass { this.updateSharedFeed(true); }, - async resetNotyFeedFilters(){ + async resetNotyFeedFilters() { this.sharedFeedFilters.noty = { ...this.sharedFeedFiltersDefaults.noty }; - await configRepository.setString('sharedFeedFilters', JSON.stringify(this.sharedFeedFiltersDefaults)); + this.saveSharedFeedFilters(); }, - async resetWristFeedFilters(){ + async resetWristFeedFilters() { this.sharedFeedFilters.wrist = { ...this.sharedFeedFiltersDefaults.wrist }; - await configRepository.setString('sharedFeedFilters', JSON.stringify(this.sharedFeedFiltersDefaults)); + this.saveSharedFeedFilters(); } }; }