Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions src/Files.App/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ public static class ImageRes
public const int Folder = 3;
}

public static class Shell32
{
// See shell32.dll for more icon indexes to add
public const int QuickAccess = 51380;
}

public static class FluentIconsPaths
{
public const string CloudDriveIcon = "ms-appx:///Assets/FluentIcons/CloudDrive.png";
Expand Down Expand Up @@ -181,19 +175,6 @@ public static class PreviewPane
public const int FolderPreviewThumbnailCount = 10;
}

public static class PaneContent
{
public const string ContentKey = "PaneContent";

public const string HorizontalSizePxKey = "PaneHorizontalSizePx";

public const string VerticalSizePxKey = "PaneVerticalSizePx";

public const string MediaVolumeKey = "PaneMediaVolume";

public const string ShowPreviewOnlyKey = "ShowPreviewOnly";
}

public static class ResourceFilePaths
{
/// <summary>
Expand Down
3 changes: 1 addition & 2 deletions src/Files.App/Converters/Converters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ public abstract class ValueConverter<TSource, TTarget>
/// <summary>
/// The base class for converting instances of type T to object and vice versa.
/// </summary>
public abstract class ToObjectConverter<T>
: ValueConverter<T?, object?>
public abstract class ToObjectConverter<T> : ValueConverter<T?, object?>
{
/// <summary>
/// Converts a source value to the target type.
Expand Down
39 changes: 0 additions & 39 deletions src/Files.App/Converters/MiddleTextEllipsisConverter.cs

This file was deleted.

19 changes: 0 additions & 19 deletions src/Files.App/Converters/StorageDeleteOptionToBooleanConverter.cs

This file was deleted.

11 changes: 0 additions & 11 deletions src/Files.App/DataModels/SidebarPinnedModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,6 @@ public int IndexOfItem(INavigationControlItem locationItem)
}
}

/// <summary>
/// Returns the index of the location item in the collection containing Navigation control items
/// </summary>
/// <param name="locationItem">The location item</param>
/// <param name="collection">The collection in which to find the location item</param>
/// <returns>Index of the item</returns>
public int IndexOfItem(INavigationControlItem locationItem, List<INavigationControlItem> collection)
{
return collection.IndexOf(locationItem);
}

/// <summary>
/// Saves the model
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace Files.App.Filesystem
{
public enum FilesystemItemType : byte
Expand All @@ -14,12 +12,6 @@ public enum FilesystemItemType : byte
/// </summary>
File = 1,

/// <summary>
/// The item is a symlink
/// </summary>
[Obsolete("The symlink has no use for now here.")]
Symlink = 2,

/// <summary>
/// The item is a library
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,8 @@

namespace Files.App.Filesystem
{
public enum ImpossibleActionResponseTypes
{
Skip,
Abort
}

public class FilesystemOperations : IFilesystemOperations
{
private IDialogService DialogService { get; } = Ioc.Default.GetRequiredService<IDialogService>();

private IShellPage associatedInstance;

private RecycleBinHelpers recycleBinHelpers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,6 @@ public async Task<ReturnResult> DeleteItemsAsync(IEnumerable<IStorageItemWithPat

var token = banner.CancellationToken;

var sw = new Stopwatch();
sw.Start();

IStorageHistory history = await filesystemOperations.DeleteItemsAsync((IList<IStorageItemWithPath>)source, banner.Progress, banner.ErrorCode, permanently, token);
((IProgress<float>)banner.Progress).Report(100.0f);
await Task.Yield();
Expand All @@ -177,7 +174,6 @@ public async Task<ReturnResult> DeleteItemsAsync(IEnumerable<IStorageItemWithPat
source.ForEach(x => App.JumpList.RemoveFolder(x.Path)); // Remove items from jump list

banner.Remove();
sw.Stop();

PostBannerHelpers.PostBanner_Delete(source, returnStatus, permanently, token.IsCancellationRequested, itemsDeleted);

Expand Down Expand Up @@ -215,9 +211,6 @@ public async Task<ReturnResult> RestoreItemsFromTrashAsync(IEnumerable<IStorageI
var errorCode = new Progress<FileSystemStatusCode>();
errorCode.ProgressChanged += (s, e) => returnStatus = returnStatus < ReturnResult.Failed ? e.ToStatus() : returnStatus;

var sw = new Stopwatch();
sw.Start();

IStorageHistory history = await filesystemOperations.RestoreItemsFromTrashAsync((IList<IStorageItemWithPath>)source, (IList<string>)destination, null, errorCode, cancellationToken);
await Task.Yield();

Expand All @@ -227,8 +220,6 @@ public async Task<ReturnResult> RestoreItemsFromTrashAsync(IEnumerable<IStorageI
}
int itemsMoved = history?.Source.Count ?? 0;

sw.Stop();

return returnStatus;
}

Expand Down Expand Up @@ -454,9 +445,6 @@ public async Task<ReturnResult> MoveItemsAsync(IEnumerable<IStorageItemWithPath>
return ReturnResult.Cancelled;
}

var sw = new Stopwatch();
sw.Start();

itemManipulationModel?.ClearSelection();

IStorageHistory history = await filesystemOperations.MoveItemsAsync((IList<IStorageItemWithPath>)source, (IList<string>)destination, collisions, banner.Progress, banner.ErrorCode, token);
Expand All @@ -483,7 +471,6 @@ public async Task<ReturnResult> MoveItemsAsync(IEnumerable<IStorageItemWithPath>
source.ForEach(x => App.JumpList.RemoveFolder(x.Path)); // Remove items from jump list

banner.Remove();
sw.Stop();

PostBannerHelpers.PostBanner_Move(source, destination, returnStatus, token.IsCancellationRequested, itemsMoved);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ public class ShellFilesystemOperations : IFilesystemOperations

private RecycleBinHelpers recycleBinHelpers;

private IDialogService DialogService { get; } = Ioc.Default.GetRequiredService<IDialogService>();

#endregion Private Members

#region Constructor
Expand Down
9 changes: 0 additions & 9 deletions src/Files.App/Filesystem/ListedItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -422,15 +422,6 @@ public BaseStorageFile ItemFile

public string Key { get; set; }

/// <summary>
/// Manually check if a folder path contains child items,
/// updating the ContainsFilesOrFolders property from its default value of true
/// </summary>
public void UpdateContainsFilesFolders()
{
ContainsFilesOrFolders = FolderHelpers.CheckForFilesFolders(ItemPath);
}

public void SetDefaultIcon(BitmapImage img)
{
NeedsPlaceholderGlyph = false;
Expand Down
8 changes: 0 additions & 8 deletions src/Files.App/Filesystem/RecentItems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,6 @@ public bool UnpinFromRecentFiles(string path)
}
}

/// <summary>
/// Returns whether two RecentItem enumerables have the same order.
/// This function depends on `RecentItem` implementing IEquatable.
/// </summary>
private bool RecentItemsOrderEquals(IEnumerable<RecentItem> oldOrder, IEnumerable<RecentItem> newOrder)
{
return oldOrder != null && newOrder != null && oldOrder.SequenceEqual(newOrder);
}
public void Dispose()
{
RecentItemsManager.Default.RecentItemsChanged -= OnRecentItemsChanged;
Expand Down
Loading