timeline: remove days var

old-stable24
Varun Patil 2022-10-16 11:52:18 -07:00
parent adafc999c9
commit 3ccd5aa8b5
1 changed files with 1 additions and 5 deletions

View File

@ -150,8 +150,6 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
private squareMode = false; private squareMode = false;
/** Header rows for dayId key */ /** Header rows for dayId key */
private heads: { [dayid: number]: IHeadRow } = {}; private heads: { [dayid: number]: IHeadRow } = {};
/** Original days response */
private days: IDay[] = [];
/** Computed row height */ /** Computed row height */
private rowHeight = 100; private rowHeight = 100;
@ -230,7 +228,6 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
this.list = []; this.list = [];
this.numRows = 0; this.numRows = 0;
this.heads = {}; this.heads = {};
this.days = [];
this.currentStart = 0; this.currentStart = 0;
this.currentEnd = 0; this.currentEnd = 0;
this.scrollerManager.reset(); this.scrollerManager.reset();
@ -590,7 +587,6 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
} }
// Store globally // Store globally
this.days = data;
this.list = list; this.list = list;
this.heads = heads; this.heads = heads;
@ -620,7 +616,7 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
const data = res.data; const data = res.data;
if (this.state !== startState) return; if (this.state !== startState) return;
const day = this.days.find(d => d.dayid === dayId); const day = this.heads[dayId].day;
day.detail = data; day.detail = data;
day.count = data.length; day.count = data.length;
this.processDay(day); this.processDay(day);