网络游戏初步接入
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"slices"
|
||||
"work_cation/cfg"
|
||||
"work_cation/global"
|
||||
"work_cation/models"
|
||||
"work_cation/repo"
|
||||
@@ -61,7 +60,7 @@ func itemFollowUserView(w fyne.Window, data *models.Online, user *models.UserFol
|
||||
go func() {
|
||||
defer func() { _ = recover() }()
|
||||
if data == nil {
|
||||
data = &models.Online{ID: user.ID, Ip: user.Ip, Port: cfg.T.ServerAddr}
|
||||
data = &models.Online{ID: user.ID, Ip: user.Ip, Port: user.Port}
|
||||
}
|
||||
newUser, err := service.Client.GetUser(data)
|
||||
if err != nil {
|
||||
@@ -71,7 +70,7 @@ func itemFollowUserView(w fyne.Window, data *models.Online, user *models.UserFol
|
||||
if err == nil {
|
||||
onlineShow.SetText("在线")
|
||||
}
|
||||
if err == nil && newUser.Name != user.Name {
|
||||
if err == nil && newUser.UpdateTx != user.UpdateTx {
|
||||
// 更新用户信息
|
||||
fmt.Println("更新用户信息:", user, newUser)
|
||||
repo.UserFollow.UnFollow(global.DB, user)
|
||||
|
||||
Reference in New Issue
Block a user