Skip to content

Commit

Permalink
Added F5 refresh and call to reload the plugin data
Browse files Browse the repository at this point in the history
  • Loading branch information
yveslaurentcreton committed Jun 16, 2020
1 parent 28f9a37 commit a812f06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Wox/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<Window.InputBindings>
<KeyBinding Key="Escape" Command="{Binding EscCommand}"></KeyBinding>
<KeyBinding Key="F1" Command="{Binding StartHelpCommand}"></KeyBinding>
<KeyBinding Key="F5" Command="{Binding RefreshCommand}"></KeyBinding>
<KeyBinding Key="Tab" Command="{Binding SelectNextItemCommand}"></KeyBinding>
<KeyBinding Key="Tab" Modifiers="Shift" Command="{Binding SelectPrevItemCommand}"></KeyBinding>
<KeyBinding Key="N" Modifiers="Ctrl" Command="{Binding SelectNextItemCommand}"></KeyBinding>
Expand Down
8 changes: 8 additions & 0 deletions Wox/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ private void InitializeKeyCommands()
Process.Start("http://doc.wox.one/");
});

RefreshCommand = new RelayCommand(_ => Refresh());

OpenResultCommand = new RelayCommand(index =>
{
var results = SelectedResults;
Expand Down Expand Up @@ -333,6 +335,7 @@ private ResultsViewModel SelectedResults
public ICommand SelectPrevPageCommand { get; set; }
public ICommand SelectFirstResultCommand { get; set; }
public ICommand StartHelpCommand { get; set; }
public ICommand RefreshCommand { get; set; }
public ICommand LoadContextMenuCommand { get; set; }
public ICommand LoadHistoryCommand { get; set; }
public ICommand OpenResultCommand { get; set; }
Expand Down Expand Up @@ -534,6 +537,11 @@ private void QueryResults()

}

private void Refresh()
{
PluginManager.ReloadData();
}

private Result ContextMenuTopMost(Result result)
{
Result menu;
Expand Down

0 comments on commit a812f06

Please sign in to comment.