mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-14 08:24:59 +03:00
@@ -247,7 +247,7 @@ namespace v2rayN.Desktop.Views
|
||||
|
||||
case EViewAction.AddServerViaClipboard:
|
||||
var clipboardData = await AvaUtils.GetClipboardData(this);
|
||||
if (ViewModel != null)
|
||||
if (clipboardData.IsNotEmpty() && ViewModel != null)
|
||||
{
|
||||
await ViewModel.AddServerViaClipboardAsync(clipboardData);
|
||||
}
|
||||
@@ -315,7 +315,7 @@ namespace v2rayN.Desktop.Views
|
||||
{
|
||||
case Key.V:
|
||||
var clipboardData = await AvaUtils.GetClipboardData(this);
|
||||
if (ViewModel != null)
|
||||
if (clipboardData.IsNotEmpty() && ViewModel != null)
|
||||
{
|
||||
await ViewModel.AddServerViaClipboardAsync(clipboardData);
|
||||
}
|
||||
|
||||
@@ -109,13 +109,20 @@ namespace v2rayN.Desktop.Views
|
||||
|
||||
case EViewAction.SetClipboardData:
|
||||
if (obj is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
await AvaUtils.SetClipboardData(this, (string)obj);
|
||||
break;
|
||||
|
||||
case EViewAction.ImportRulesFromClipboard:
|
||||
var clipboardData = await AvaUtils.GetClipboardData(this);
|
||||
ViewModel?.ImportRulesFromClipboardAsync(clipboardData);
|
||||
if (clipboardData.IsNotEmpty())
|
||||
{
|
||||
ViewModel?.ImportRulesFromClipboardAsync(clipboardData);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user