@@ -65,6 +65,7 @@ func (c *Conversation) Work(c2v common.Cmd2Value) {
65
65
func (c * Conversation ) syncFlag (c2v common.Cmd2Value ) {
66
66
ctx := c2v .Ctx
67
67
syncFlag := c2v .Value .(sdk_struct.CmdNewMsgComeToConversation ).SyncFlag
68
+ initSyncBaseProgress := 5
68
69
switch syncFlag {
69
70
case constant .AppDataSyncStart :
70
71
log .ZDebug (ctx , "AppDataSyncStart" )
@@ -75,7 +76,7 @@ func (c *Conversation) syncFlag(c2v common.Cmd2Value) {
75
76
c .friend .IncrSyncFriends ,
76
77
}
77
78
runSyncFunctions (ctx , asyncWaitFunctions , asyncWait )
78
- c .addProgress (4 ) // add 4 percent in progress
79
+ c .addProgress (initSyncBaseProgress )
79
80
c .ConversationListener ().OnSyncServerProgress (c .getProgress ()) // notify server current Progress
80
81
81
82
syncWaitFunctions := []func (c context.Context ) error {
@@ -84,7 +85,7 @@ func (c *Conversation) syncFlag(c2v common.Cmd2Value) {
84
85
}
85
86
runSyncFunctions (ctx , syncWaitFunctions , syncWait )
86
87
log .ZWarn (ctx , "core data sync over" , nil , "cost time" , time .Since (c .startTime ).Seconds ())
87
- c .addProgress (6 ) // add 6 percent in progress
88
+ c .addProgress (initSyncBaseProgress )
88
89
c .ConversationListener ().OnSyncServerProgress (c .getProgress ()) // notify server current Progress
89
90
90
91
asyncNoWaitFunctions := []func (c context.Context ) error {
0 commit comments