You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/webviews/apps/plus/graph/graph.tsx
+22-1Lines changed: 22 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -108,16 +108,28 @@ export class GraphApp extends App<State> {
108
108
letpreviousRowsLength=previousRows.length;
109
109
constnewRowsLength=params.rows.length;
110
110
111
+
this.log(
112
+
`${this.appName}.onMessageReceived(${msg.id}:${msg.method}): paging in ${newRowsLength} rows into existing ${previousRowsLength} rows at ${params.paging.startingCursor} (last existing row: ${lastSha})`,
113
+
);
114
+
111
115
rows=[];
112
116
// Preallocate the array to avoid reallocations
113
117
rows.length=previousRowsLength+newRowsLength;
114
118
115
119
if(params.paging.startingCursor!==lastSha){
120
+
this.log(
121
+
`${this.appName}.onMessageReceived(${msg.id}:${msg.method}): searching for ${params.paging.startingCursor} in existing rows`,
122
+
);
123
+
116
124
leti=0;
117
125
letrow;
118
126
for(rowofpreviousRows){
119
127
rows[i++]=row;
120
128
if(row.sha===params.paging.startingCursor){
129
+
this.log(
130
+
`${this.appName}.onMessageReceived(${msg.id}:${msg.method}): found ${params.paging.startingCursor} in existing rows`,
131
+
);
132
+
121
133
previousRowsLength=i;
122
134
123
135
if(previousRowsLength!==previousRows.length){
@@ -138,7 +150,16 @@ export class GraphApp extends App<State> {
138
150
rows[previousRowsLength+i]=params.rows[i];
139
151
}
140
152
}else{
141
-
rows=params.rows;
153
+
this.log(
154
+
`${this.appName}.onMessageReceived(${msg.id}:${msg.method}): setting to ${params.rows.length} rows`,
155
+
);
156
+
157
+
if(params.rows.length===0){
158
+
rows=this.state.rows;
159
+
}else{
160
+
// TODO@eamodio I'm not sure there is a case for this, but didn't wan't to remove it yet
0 commit comments