-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
362 additions
and
565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,22 @@ | ||
// Copyright (c) 2024 Files Community | ||
// Licensed under the MIT License. See the LICENSE. | ||
|
||
using System.Collections.Specialized; | ||
|
||
namespace Files.App.Data.Contracts | ||
{ | ||
public interface IQuickAccessService | ||
{ | ||
/// <summary> | ||
/// Gets the list of quick access items | ||
/// </summary> | ||
/// <returns></returns> | ||
Task<IEnumerable<ShellFileItem>> GetPinnedFoldersAsync(); | ||
|
||
/// <summary> | ||
/// Pins a folder to the quick access list | ||
/// </summary> | ||
/// <param name="folderPath">The folder to pin</param> | ||
/// <returns></returns> | ||
Task PinToSidebarAsync(string folderPath); | ||
IReadOnlyList<INavigationControlItem> PinnedFolders { get; } | ||
|
||
/// <summary> | ||
/// Pins folders to the quick access list | ||
/// </summary> | ||
/// <param name="folderPaths">The array of folders to pin</param> | ||
/// <returns></returns> | ||
Task PinToSidebarAsync(string[] folderPaths); | ||
event EventHandler<NotifyCollectionChangedEventArgs>? PinnedFoldersChanged; | ||
|
||
/// <summary> | ||
/// Unpins a folder from the quick access list | ||
/// </summary> | ||
/// <param name="folderPath">The folder to unpin</param> | ||
/// <returns></returns> | ||
Task UnpinFromSidebarAsync(string folderPath); | ||
Task InitializeAsync(); | ||
|
||
/// <summary> | ||
/// Unpins folders from the quick access list | ||
/// </summary> | ||
/// <param name="folderPaths">The array of folders to unpin</param> | ||
/// <returns></returns> | ||
Task UnpinFromSidebarAsync(string[] folderPaths); | ||
Task<bool> UpdatePinnedFoldersAsync(); | ||
|
||
/// <summary> | ||
/// Checks if a folder is pinned to the quick access list | ||
/// </summary> | ||
/// <param name="folderPath">The path of the folder</param> | ||
/// <returns>true if the item is pinned</returns> | ||
bool IsItemPinned(string folderPath); | ||
Task<bool> PinFolderAsync(string[] paths); | ||
|
||
/// <summary> | ||
/// Saves a state of pinned folder items in the sidebar | ||
/// </summary> | ||
/// <param name="items">The array of items to save</param> | ||
/// <returns></returns> | ||
Task SaveAsync(string[] items); | ||
Task<bool> UnpinFolderAsync(string[] paths); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.