Commit c8a16e15 by Sixong.Zhu

Merge branch 'master' into pre

parents d0c59d98 c5752ec7
Showing with 9 additions and 6 deletions
...@@ -375,7 +375,7 @@ class ChatCacheDatabaseController { ...@@ -375,7 +375,7 @@ class ChatCacheDatabaseController {
public appendMessages(chat: number, items: Message[]) { public appendMessages(chat: number, items: Message[]) {
return new Promise<void>((resolve) => { return new Promise<void>((resolve) => {
if (!this.db || !items.length) { if (!this.db || !items || !items.length) {
return resolve(); return resolve();
} }
const store = this.buildChatMessageStore(chat); const store = this.buildChatMessageStore(chat);
......
...@@ -138,16 +138,19 @@ class OrderService { ...@@ -138,16 +138,19 @@ class OrderService {
r.pageData.rows, r.pageData.rows,
orderPayItemPredict orderPayItemPredict
); );
items = items.filter( if (!withActions) {
(i) => items = items.filter(
i.status !== PayStatus.Deleted && (i) =>
i.status !== PayStatus.Cancel i.status !== PayStatus.Deleted &&
); i.status !== PayStatus.Cancel
);
}
if (withActions) { if (withActions) {
for (let i = 0; i < r.pageData.rows.length; i++) { for (let i = 0; i < r.pageData.rows.length; i++) {
r.pageData && r.pageData &&
r.pageData.rows && r.pageData.rows &&
r.pageData.rows[i] && r.pageData.rows[i] &&
items[i] &&
(items[i].actions = r.pageData.rows[i].actions); (items[i].actions = r.pageData.rows[i].actions);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment