Skip to content

Commit 1222353

Browse files
committed
Removed ExtractButtonSeparator, made use of HasAdditionalActions.
1 parent 8c296e6 commit 1222353

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/Files/UserControls/InnerNavigationToolbar.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@
213213
<FontIcon FontFamily="{StaticResource RecycleBinIcons}" Glyph="&#xEF88;" />
214214
</AppBarButton.Icon>
215215
</AppBarButton>
216-
<AppBarSeparator x:Name="ExtractButtonSeparator" Visibility="{x:Bind ViewModel.CanExtract, Mode=OneWay, FallbackValue=Collapsed}" />
217216
<AppBarButton
218217
x:Name="ExtractButton"
219218
Width="Auto"

src/Files/ViewModels/NavToolbarViewModel.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,11 +1088,28 @@ public List<ListedItem> SelectedItems
10881088
OnPropertyChanged(nameof(CanViewProperties));
10891089
OnPropertyChanged(nameof(CanExtract));
10901090
OnPropertyChanged(nameof(ExtractToText));
1091+
OnPropertyChanged(nameof(HasAdditionnalAction));
10911092
}
10921093
}
10931094
}
10941095

1095-
public bool HasAdditionnalAction => InstanceViewModel.IsPageTypeRecycleBin;
1096+
public bool HasAdditionnalAction
1097+
{
1098+
get
1099+
{
1100+
if (InstanceViewModel.IsPageTypeRecycleBin)
1101+
{
1102+
return true;
1103+
}
1104+
1105+
if (CanExtract)
1106+
{
1107+
return true;
1108+
}
1109+
1110+
return false;
1111+
}
1112+
}
10961113

10971114
public bool CanCopy => SelectedItems is not null && SelectedItems.Any();
10981115
public bool CanShare => SelectedItems is not null && SelectedItems.Any() && DataTransferManager.IsSupported() && !SelectedItems.Any(x => (x.IsShortcutItem && !x.IsLinkItem) || x.IsHiddenItem || (x.PrimaryItemAttribute == StorageItemTypes.Folder && !x.IsZipItem));

0 commit comments

Comments
 (0)