Enhancement: "Load more" is now "Load all"

fixes #117
This commit is contained in:
softsimon
2020-09-29 15:05:52 +07:00
parent 7ee75b71df
commit 856eef4606
2 changed files with 9 additions and 27 deletions

View File

@@ -51,8 +51,8 @@ export class TransactionsListComponent implements OnInit, OnChanges {
}
const observableObject = {};
this.transactions.forEach((tx, i) => {
tx['@voutLength'] = 10;
tx['@vinLength'] = 10;
tx['@voutLimit'] = true;
tx['@vinLimit'] = true;
if (this.outspends[i]) {
return;
}
@@ -88,28 +88,10 @@ export class TransactionsListComponent implements OnInit, OnChanges {
this.stateService.viewFiat$.next(oldvalue);
}
trackByFn(index: number, tx: Transaction) {
trackByFn(index: number, tx: Transaction): string {
return tx.txid + tx.status.confirmed;
}
loadMoreVin(tx: Transaction) {
tx['@vinLength'] += 10;
this.ref.markForCheck();
}
loadMoreVout(tx: Transaction) {
tx['@voutLength'] += 10;
this.ref.markForCheck();
}
getFilteredTxVin(tx: Transaction) {
return tx.vin.slice(0, tx['@vinLength']);
}
getFilteredTxVout(tx: Transaction) {
return tx.vout.slice(0, tx['@voutLength']);
}
trackByIndexFn(index: number) {
return index;
}