Skip to content

Commit cdc1f6a

Browse files
committedNov 11, 2024
1. 修复联系人搜索显示异常的问题
2. 修复启动时界面加载显示慢的问题
1 parent 331cd81 commit cdc1f6a

File tree

5 files changed

+522
-12
lines changed

5 files changed

+522
-12
lines changed
 

‎app.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const (
2121
configDefaultUserKey = "userConfig.defaultUser"
2222
configUsersKey = "userConfig.users"
2323
configExportPathKey = "exportPath"
24-
appVersion = "v1.0.4"
24+
appVersion = "v1.0.5"
2525
)
2626

2727
type FileLoader struct {
@@ -59,8 +59,8 @@ type App struct {
5959
defaultUser string
6060
users []string
6161
firstStart bool
62-
63-
FLoader *FileLoader
62+
firstInit bool
63+
FLoader *FileLoader
6464
}
6565

6666
type WeChatInfo struct {
@@ -91,6 +91,7 @@ type ErrorMessage struct {
9191
func NewApp() *App {
9292
a := &App{}
9393

94+
a.firstInit = true
9495
a.FLoader = NewFileLoader(".\\")
9596
viper.SetConfigName(defaultConfig)
9697
viper.SetConfigType("json")
@@ -103,14 +104,8 @@ func NewApp() *App {
103104
log.Println("SetFilePrefix", prefix)
104105
a.FLoader.SetFilePrefix(prefix)
105106
}
106-
107-
a.scanAccountByPath(prefix)
108-
// log.Println(a.defaultUser)
109-
// log.Println(a.users)
110107
} else {
111-
if a.scanAccountByPath(".\\") != nil {
112-
log.Println("not config exist")
113-
}
108+
log.Println("not config exist")
114109
}
115110
log.Printf("default: %s users: %v\n", a.defaultUser, a.users)
116111
if len(a.users) == 0 {
@@ -257,6 +252,13 @@ func (a *App) createWechatDataProvider(resPath string, prefix string) error {
257252
}
258253

259254
func (a *App) WeChatInit() {
255+
256+
if a.firstInit {
257+
a.firstInit = false
258+
a.scanAccountByPath(a.FLoader.FilePrefix)
259+
log.Println("scanAccountByPath:", a.FLoader.FilePrefix)
260+
}
261+
260262
if len(a.defaultUser) == 0 {
261263
log.Println("not defaultUser")
262264
return

‎changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v1.0.5
2+
1. 修复联系人搜索显示异常的问题
3+
2. 修复启动时界面加载显示慢的问题
4+
15
## v1.0.4
26
1. 优化头像显示,优先使用本地头像显示
37
2. 支持自定义导出路径、增加对导出路径的权限检测

0 commit comments

Comments
 (0)