修改功能开启条件判断
This commit is contained in:
parent
aa91ee0b32
commit
e31e0d1ae8
@ -10,7 +10,6 @@ import (
|
|||||||
"go_dreamfactory/modules/user"
|
"go_dreamfactory/modules/user"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
|
|
||||||
"fyne.io/fyne/v2"
|
"fyne.io/fyne/v2"
|
||||||
"fyne.io/fyne/v2/container"
|
"fyne.io/fyne/v2/container"
|
||||||
@ -313,14 +312,23 @@ func (ui *MainWindowImpl) createLoginWin(sid, sname string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
// go func() {
|
||||||
timer := time.NewTimer(10 * time.Second)
|
// timer := time.NewTimer(10 * time.Second)
|
||||||
for {
|
// for {
|
||||||
timer.Reset(10 * time.Second)
|
// if !timer.Stop() {
|
||||||
<-timer.C
|
// select {
|
||||||
ui.pttService.Ping(sid, account.Text)
|
// case <-timer.C:
|
||||||
}
|
// default:
|
||||||
}()
|
// }
|
||||||
|
// }
|
||||||
|
// timer.Reset(10 * time.Second)
|
||||||
|
// select {
|
||||||
|
// case <-timer.C:
|
||||||
|
// ui.pttService.Ping(sid, account.Text)
|
||||||
|
// continue
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }()
|
||||||
// reset main window title
|
// reset main window title
|
||||||
subTitle := fmt.Sprintf("%s[%s]", sname, sid)
|
subTitle := fmt.Sprintf("%s[%s]", sname, sid)
|
||||||
ui.w.SetTitle(fmt.Sprintf(common.APP_WIN_TITLE, subTitle, ui.app.Metadata().Version, ui.app.Metadata().Build, common.APP_NAME))
|
ui.w.SetTitle(fmt.Sprintf(common.APP_WIN_TITLE, subTitle, ui.app.Metadata().Version, ui.app.Metadata().Build, common.APP_NAME))
|
||||||
|
@ -82,10 +82,11 @@ func (this *ModelSys) validCond(uid string, condData *cfg.GameOpencondData) stri
|
|||||||
}
|
}
|
||||||
if i, ok := module.(comm.IWorldtask); ok {
|
if i, ok := module.(comm.IWorldtask); ok {
|
||||||
d := i.GetMyWorldtask(uid)
|
d := i.GetMyWorldtask(uid)
|
||||||
if _, ok := d.LastTaskIds[conf.Param]; ok {
|
for _, v := range d.LastTaskIds {
|
||||||
|
if v.TaskId >= conf.Param {
|
||||||
flag = true
|
flag = true
|
||||||
}else{
|
continue
|
||||||
flag = false
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flag = false
|
flag = false
|
||||||
|
Loading…
Reference in New Issue
Block a user