Revert "platform: Add openURL event"

This reverts commit 718cffea9a.
This commit is contained in:
世界
2024-11-05 20:03:39 +08:00
parent 1d517b6ca5
commit f504fb0d46
7 changed files with 15 additions and 130 deletions

View File

@@ -20,7 +20,6 @@ type CommandClient struct {
type CommandClientOptions struct {
Command int32
StatusInterval int64
IsMainClient bool
}
type CommandClientHandler interface {
@@ -29,7 +28,6 @@ type CommandClientHandler interface {
ClearLogs()
WriteLogs(messageList StringIterator)
WriteStatus(message *StatusMessage)
OpenURL(url string)
WriteGroups(message OutboundGroupIterator)
InitializeClashMode(modeList StringIterator, currentMode string)
UpdateClashMode(newMode string)
@@ -93,13 +91,9 @@ func (c *CommandClient) Connect() error {
c.handler.Connected()
go c.handleLogConn(conn)
case CommandStatus:
err = binary.Write(conn, binary.BigEndian, c.options.IsMainClient)
if err != nil {
return E.Cause(err, "write is main client")
}
err = binary.Write(conn, binary.BigEndian, c.options.StatusInterval)
if err != nil {
return E.Cause(err, "write header")
return E.Cause(err, "write interval")
}
c.handler.Connected()
go c.handleStatusConn(conn)