Drag and Drop

This commit is contained in:
2dust
2023-01-05 14:31:53 +08:00
parent 9d30bb669e
commit f18103751f
3 changed files with 115 additions and 3 deletions
@@ -1064,6 +1064,17 @@ namespace v2rayN.ViewModels
}
}
public void MoveServerTo(int startIndex, ProfileItemModel targetItem)
{
var targetIndex = _profileItems.IndexOf(targetItem);
if (startIndex >= 0 && targetIndex >= 0 && startIndex != targetIndex)
{
if (ConfigHandler.MoveServer(ref _config, ref _lstProfile, startIndex, EMove.Position, targetIndex) == 0)
{
RefreshServers();
}
}
}
public void ServerSpeedtest(ESpeedActionType actionType)
{