Showing
1 changed file
with
6 additions
and
2 deletions
| @@ -146,7 +146,7 @@ export struct TabChatComponent { | @@ -146,7 +146,7 @@ export struct TabChatComponent { | ||
| 146 | (data) => { | 146 | (data) => { |
| 147 | this.pageModel.isLoading = false | 147 | this.pageModel.isLoading = false |
| 148 | if (resolve) { | 148 | if (resolve) { |
| 149 | - if (this.pageModel.currentPage == 1) { | 149 | + if (this.pageModel.currentPage != 1) { |
| 150 | resolve('已更新至最新') | 150 | resolve('已更新至最新') |
| 151 | } else { | 151 | } else { |
| 152 | resolve('') | 152 | resolve('') |
| @@ -158,7 +158,11 @@ export struct TabChatComponent { | @@ -158,7 +158,11 @@ export struct TabChatComponent { | ||
| 158 | Logger.debug(TAG, `${JSON.stringify(data)}`) | 158 | Logger.debug(TAG, `${JSON.stringify(data)}`) |
| 159 | if (data.barrageResponses && data.barrageResponses.length > 0) { | 159 | if (data.barrageResponses && data.barrageResponses.length > 0) { |
| 160 | this.pageModel.viewType = ViewType.LOADED; | 160 | this.pageModel.viewType = ViewType.LOADED; |
| 161 | - this.liveChatList.push(...data.barrageResponses) | 161 | + if (this.pageModel.currentPage === 1) { |
| 162 | + this.liveChatList.push(...data.barrageResponses) | ||
| 163 | + }else { | ||
| 164 | + this.liveChatList.addItems(data.barrageResponses, 0) | ||
| 165 | + } | ||
| 162 | 166 | ||
| 163 | if (this.pageModel.currentPage === 1) { | 167 | if (this.pageModel.currentPage === 1) { |
| 164 | setTimeout(() => { | 168 | setTimeout(() => { |
-
Please register or login to post a comment