Skip to content

Commit 795f74e

Browse files
committed
Revert "Squash previous commits (to revert)"
This reverts commit a4775f4.
1 parent a4775f4 commit 795f74e

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/Files.App/ViewModels/Properties/HashesViewModel.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ public HashInfoItem SelectedItem
2424

2525
public Dictionary<string, bool> ShowHashes { get; private set; }
2626

27-
public bool InfoBarVisible { get; set; }
28-
2927
public ICommand ToggleIsEnabledCommand { get; private set; }
3028

3129
private ListedItem _item;
@@ -35,7 +33,6 @@ public HashInfoItem SelectedItem
3533
public HashesViewModel(ListedItem item)
3634
{
3735
ToggleIsEnabledCommand = new RelayCommand<string>(ToggleIsEnabled);
38-
InfoBarVisible = false;
3936

4037
_item = item;
4138
_cancellationTokenSource = new();

src/Files.App/Views/Properties/HashesPage.xaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@
7575
Grid.Row="1"
7676
Grid.Column="0"
7777
Margin="12,75,12,12"
78-
x:Load="{x:Bind HashesViewModel.InfoBarVisible, Mode=OneWay}"
7978
IsClosable="False"
80-
IsOpen="True"
79+
IsOpen="False"
8180
Message="No hashes match the provided hash."
8281
Severity="Informational" />
8382

src/Files.App/Views/Properties/HashesPage.xaml.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ private void HashInputTextBox_TextChanged(object sender, TextChangedEventArgs e)
6363

6464
if (string.IsNullOrEmpty(matchingAlgorithm))
6565
{
66-
HashesViewModel.InfoBarVisible = true;
6766
HashMatchInfoBar.Severity = InfoBarSeverity.Error;
6867
HashMatchInfoBar.Title = Strings.HashesDoNotMatch.GetLocalizedResource();
68+
HashMatchInfoBar.IsOpen = true;
6969
return;
7070
}
7171
else
7272
{
73-
HashesViewModel.InfoBarVisible = true;
7473
HashMatchInfoBar.Severity = InfoBarSeverity.Success;
7574
HashMatchInfoBar.Title = string.Format(Strings.HashesMatch.GetLocalizedResource(), matchingAlgorithm);
75+
HashMatchInfoBar.IsOpen = true;
7676
return;
7777
}
7878
}
@@ -82,8 +82,6 @@ private async void CompareFileButton_Click(object sender, RoutedEventArgs e)
8282
{
8383
var result = await HashesViewModel.CompareFileAsync();
8484

85-
HashesViewModel.InfoBarVisible = true;
86-
8785
if (result)
8886
{
8987
HashMatchInfoBar.Severity = InfoBarSeverity.Success; // Check mark
@@ -94,6 +92,8 @@ private async void CompareFileButton_Click(object sender, RoutedEventArgs e)
9492
HashMatchInfoBar.Severity = InfoBarSeverity.Error; // Cross mark
9593
HashMatchInfoBar.Title = "no";
9694
}
95+
96+
HashMatchInfoBar.IsOpen = true;
9797
}
9898

9999
private void MenuFlyout_Closing(FlyoutBase sender, FlyoutBaseClosingEventArgs e)

0 commit comments

Comments
 (0)