refactor(ui): remove redundant "Open wallet from file" menu item
The wizard already covers opening existing wallets; a separate file-picker entry in the menu duplicates that flow without adding value. Remove the menu item, its click handler, the OpenFromPath VM method, and the loc key.
This commit is contained in:
@@ -23,25 +23,6 @@ public partial class MainView : UserControl
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void OnOpenWalletFileClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is not MainWindowViewModel vm) return;
|
||||
if (TopLevel.GetTopLevel(this)?.StorageProvider is not { } storage) return;
|
||||
|
||||
var files = await storage.OpenFilePickerAsync(new FilePickerOpenOptions
|
||||
{
|
||||
Title = "Apri file wallet",
|
||||
AllowMultiple = false,
|
||||
FileTypeFilter =
|
||||
[
|
||||
new FilePickerFileType("Wallet Palladium") { Patterns = ["*.wallet.json", "*.json"] },
|
||||
],
|
||||
});
|
||||
|
||||
if (files.FirstOrDefault()?.TryGetLocalPath() is { } path)
|
||||
vm.OpenFromPath(path);
|
||||
}
|
||||
|
||||
private void OnHistoryRowDoubleTapped(object? sender, TappedEventArgs e)
|
||||
{
|
||||
if (sender is not ListBox lb || DataContext is not MainWindowViewModel vm) return;
|
||||
|
||||
Reference in New Issue
Block a user