/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/ViewModels/Dialogs/ReorderSidebarItemsDialogViewModel.cs
30 строк
1 KB
Yair
Code Quality: Ran code cleanup (#17307)
25 июл 2025, 03:57
Не верифицирован
25 июл 2025, 03:57
4558bc2
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. using System.Windows.Input; namespace Files.App.ViewModels.Dialogs { public sealed partial class ReorderSidebarItemsDialogViewModel : ObservableObject { private readonly IQuickAccessService quickAccessService = Ioc.Default.GetRequiredService<IQuickAccessService>(); public string HeaderText = Strings.ReorderSidebarItemsDialogText.GetLocalizedResource(); public ICommand PrimaryButtonCommand { get; private set; } public ObservableCollection<LocationItem> SidebarPinnedFolderItems = new(App.QuickAccessManager.Model._PinnedFolderItems .Where(x => x is LocationItem loc && loc.Section is SectionType.Pinned && !loc.IsHeader) .Cast<LocationItem>()); public ReorderSidebarItemsDialogViewModel() { //App.Logger.LogWarning(string.Join(", ", SidebarPinnedFolderItems.Select(x => x.Path))); PrimaryButtonCommand = new RelayCommand(SaveChanges); } public void SaveChanges() { quickAccessService.SaveAsync(SidebarPinnedFolderItems.Select(x => x.Path).ToArray()); } } }