Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Added support for Listary integration #15069

Merged
merged 3 commits into from Mar 31, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Files.App/UserControls/AddressToolbar.xaml
Expand Up @@ -217,6 +217,18 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<!-- Listary Integration -->
<Grid Width="0" Height="0">
<!-- Contains the current path -->
<TextBox AutomationProperties.AutomationId="CurrentPathGet" Text="{x:Bind ViewModel.PathControlDisplayText, Mode=OneWay}" />

<!-- Modifies the current path -->
<TextBox
x:Name="CurrentPathSetTextBox"
AutomationProperties.AutomationId="CurrentPathSet"
TextChanged="{x:Bind ViewModel.CurrentPathSetTextBox_TextChanged, Mode=OneWay}" />
</Grid>

<!-- Page Navigation Actions -->
<StackPanel
Grid.Row="1"
Expand Down
Expand Up @@ -483,6 +483,12 @@ public void PathboxItemFlyout_Opened(object sender, object e)
ToolbarFlyoutOpened?.Invoke(this, new ToolbarFlyoutOpenedEventArgs() { OpenedFlyout = (MenuFlyout)sender });
}

public void CurrentPathSetTextBox_TextChanged(object sender, TextChangedEventArgs args)
{
if (sender is TextBox textBox)
PathBoxQuerySubmitted?.Invoke(this, new ToolbarQuerySubmittedEventArgs() { QueryText = textBox.Text });
}

public void VisiblePath_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
{
if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
Expand Down