Compare commits

..

2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
a4c1716332 Fix NumberOfDigits(int.MinValue) OverflowException in MathHelper
Agent-Logs-Url: https://github.com/microsoft/PowerToys/sessions/abb64c08-a007-4526-894e-6478e37a3555

Co-authored-by: MuyuanMS <116717757+MuyuanMS@users.noreply.github.com>
2026-04-29 08:50:48 +00:00
copilot-swe-agent[bot]
aa1e8b4d98 Initial plan 2026-04-29 08:48:57 +00:00
5 changed files with 5 additions and 5 deletions

View File

@@ -129,8 +129,8 @@ public partial class ContentPageViewModel : PageViewModel, ICommandBarContext
UpdateDetails();
model.ItemsChanged += Model_ItemsChanged;
FetchContent();
model.ItemsChanged += Model_ItemsChanged;
DoOnUiThread(
() =>

View File

@@ -44,9 +44,9 @@ public partial class ContentTreeViewModel(ITreeContent _tree, WeakReference<IPag
UpdateProperty(nameof(Root));
}
FetchContent();
model.PropChanged += Model_PropChanged;
model.ItemsChanged += Model_ItemsChanged;
FetchContent();
}
// Theoretically, we should unify this with the one in CommandPalettePageViewModelFactory

View File

@@ -209,8 +209,8 @@ public sealed partial class DockBandViewModel : ExtensionObjectViewModel
var list = command.Model.Unsafe as IListPage;
if (list is not null)
{
list.ItemsChanged += HandleItemsChanged;
InitializeFromList(list);
list.ItemsChanged += HandleItemsChanged;
}
else
{

View File

@@ -957,8 +957,8 @@ public partial class ListViewModel : PageViewModel, IDisposable
Filters?.InitializeProperties();
UpdateProperty(nameof(Filters));
model.ItemsChanged += Model_ItemsChanged;
FetchItems(true);
model.ItemsChanged += Model_ItemsChanged;
}
private static IGridPropertiesViewModel? LoadGridPropertiesViewModel(IGridProperties? gridProperties)

View File

@@ -16,7 +16,7 @@ namespace Peek.Common.Helpers
public static int NumberOfDigits(int num)
{
return Math.Abs(num).ToString(CultureInfo.InvariantCulture).Length;
return Math.Abs((long)num).ToString(CultureInfo.InvariantCulture).Length;
}
}
}