Skip to content

Commit b7cbc46

Browse files
committed
Workaround
1 parent 3b7ce00 commit b7cbc46

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Files.App/UserControls/Toolbar.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@
7272
Grid.Column="0"
7373
HorizontalAlignment="Left"
7474
x:Load="{x:Bind ViewModel.InstanceViewModel.IsPageTypeNotHome, Mode=OneWay}"
75-
DefaultLabelPosition="Right">
75+
DefaultLabelPosition="Right"
76+
IsDynamicOverflowEnabled="{x:Bind ViewModel.IsDynamicOverflowEnabled, Mode=OneWay}">
7677
<CommandBar.PrimaryCommands>
7778

7879
<!-- New Item -->

src/Files.App/ViewModels/UserControls/NavigationToolbarViewModel.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ public sealed partial class NavigationToolbarViewModel : ObservableObject, IAddr
139139
private bool _IsCommandPaletteOpen;
140140
public bool IsCommandPaletteOpen { get => _IsCommandPaletteOpen; set => SetProperty(ref _IsCommandPaletteOpen, value); }
141141

142+
private bool _IsDynamicOverflowEnabled;
143+
public bool IsDynamicOverflowEnabled { get => _IsDynamicOverflowEnabled; set => SetProperty(ref _IsDynamicOverflowEnabled, value); }
144+
142145
private bool _IsUpdating;
143146
public bool IsUpdating { get => _IsUpdating; set => SetProperty(ref _IsUpdating, value); }
144147

@@ -257,6 +260,10 @@ public List<ListedItem>? SelectedItems
257260
{
258261
OnPropertyChanged(nameof(CanExtract));
259262
OnPropertyChanged(nameof(HasAdditionalAction));
263+
264+
// Workaround to ensure the overflow button is only displayed when there are overflow items
265+
IsDynamicOverflowEnabled = false;
266+
IsDynamicOverflowEnabled = true;
260267
}
261268
}
262269
}

0 commit comments

Comments
 (0)