fix: citation and footnote actually displaying
This commit is contained in:
parent
3412745204
commit
4a7ed4730c
1 changed files with 80 additions and 0 deletions
|
@ -109,6 +109,46 @@ export default class StatusBar {
|
||||||
: 0));
|
: 0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else if (metric.counter === MetricCounter.footnotes) {
|
||||||
|
switch (metric.type) {
|
||||||
|
case MetricType.file:
|
||||||
|
display = display + getFootnoteCount(text);
|
||||||
|
break;
|
||||||
|
case MetricType.daily:
|
||||||
|
display =
|
||||||
|
display +
|
||||||
|
(this.plugin.settings.collectStats
|
||||||
|
? this.plugin.statsManager.getDailyFootnotes()
|
||||||
|
: 0);
|
||||||
|
break;
|
||||||
|
case MetricType.total:
|
||||||
|
display =
|
||||||
|
display +
|
||||||
|
(await (this.plugin.settings.collectStats
|
||||||
|
? this.plugin.statsManager.getTotalFootnotes()
|
||||||
|
: 0));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (metric.counter === MetricCounter.citations) {
|
||||||
|
switch (metric.type) {
|
||||||
|
case MetricType.file:
|
||||||
|
display = display + getCitationCount(text);
|
||||||
|
break;
|
||||||
|
case MetricType.daily:
|
||||||
|
display =
|
||||||
|
display +
|
||||||
|
(this.plugin.settings.collectStats
|
||||||
|
? this.plugin.statsManager.getDailyCitations()
|
||||||
|
: 0);
|
||||||
|
break;
|
||||||
|
case MetricType.total:
|
||||||
|
display =
|
||||||
|
display +
|
||||||
|
(await (this.plugin.settings.collectStats
|
||||||
|
? this.plugin.statsManager.getTotalCitations()
|
||||||
|
: 0));
|
||||||
|
break;
|
||||||
|
}
|
||||||
} else if (metric.counter === MetricCounter.files) {
|
} else if (metric.counter === MetricCounter.files) {
|
||||||
switch (metric.type) {
|
switch (metric.type) {
|
||||||
case MetricType.file:
|
case MetricType.file:
|
||||||
|
@ -211,6 +251,46 @@ export default class StatusBar {
|
||||||
: 0));
|
: 0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else if (metric.counter === MetricCounter.footnotes) {
|
||||||
|
switch (metric.type) {
|
||||||
|
case MetricType.file:
|
||||||
|
display = display + 0;
|
||||||
|
break;
|
||||||
|
case MetricType.daily:
|
||||||
|
display =
|
||||||
|
display +
|
||||||
|
(this.plugin.settings.collectStats
|
||||||
|
? this.plugin.statsManager.getDailyFootnotes()
|
||||||
|
: 0);
|
||||||
|
break;
|
||||||
|
case MetricType.total:
|
||||||
|
display =
|
||||||
|
display +
|
||||||
|
(await (this.plugin.settings.collectStats
|
||||||
|
? this.plugin.statsManager.getTotalFootnotes()
|
||||||
|
: 0));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (metric.counter === MetricCounter.citations) {
|
||||||
|
switch (metric.type) {
|
||||||
|
case MetricType.file:
|
||||||
|
display = display + 0;
|
||||||
|
break;
|
||||||
|
case MetricType.daily:
|
||||||
|
display =
|
||||||
|
display +
|
||||||
|
(this.plugin.settings.collectStats
|
||||||
|
? this.plugin.statsManager.getDailyCitations()
|
||||||
|
: 0);
|
||||||
|
break;
|
||||||
|
case MetricType.total:
|
||||||
|
display =
|
||||||
|
display +
|
||||||
|
(await (this.plugin.settings.collectStats
|
||||||
|
? this.plugin.statsManager.getTotalCitations()
|
||||||
|
: 0));
|
||||||
|
break;
|
||||||
|
}
|
||||||
} else if (metric.counter === MetricCounter.files) {
|
} else if (metric.counter === MetricCounter.files) {
|
||||||
switch (metric.type) {
|
switch (metric.type) {
|
||||||
case MetricType.file:
|
case MetricType.file:
|
||||||
|
|
Loading…
Reference in a new issue