Skip to content

Commit

Permalink
support slideshow interval < 1s
Browse files Browse the repository at this point in the history
  • Loading branch information
d2phap committed Nov 30, 2024
1 parent 43c5e5c commit 76418f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Components/ImageGlass.Settings/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ public static void Load(IConfigurationRoot? items = null)

#region Slideshow
SlideshowInterval = items.GetValueEx(nameof(SlideshowInterval), SlideshowInterval);
if (SlideshowInterval < 1) SlideshowInterval = 5f;
if (SlideshowInterval <= 0) SlideshowInterval = 5f;

SlideshowIntervalTo = items.GetValueEx(nameof(SlideshowIntervalTo), SlideshowIntervalTo);
SlideshowIntervalTo = Math.Max(SlideshowIntervalTo, SlideshowInterval);
Expand Down Expand Up @@ -1472,7 +1472,7 @@ public static (bool Done, bool Unsupported) SetFromJson(IDictionary<string, stri
// float
else if (prop.PropertyType.Equals(typeof(float)))
{
if (int.TryParse(newValue, out var value))
if (float.TryParse(newValue, out var value))
{
prop.SetValue(null, value);
Done = true;
Expand Down

0 comments on commit 76418f1

Please sign in to comment.