Use hasPreviousPage correctly to check if we are on beginning of history
This commit is contained in:
parent
e625a9bd47
commit
54a4e0dae3
|
@ -12,7 +12,6 @@ class HistoryProvider with ChangeNotifier {
|
||||||
String pubkey = '';
|
String pubkey = '';
|
||||||
HistoryProvider(this.pubkey);
|
HistoryProvider(this.pubkey);
|
||||||
final TextEditingController outputPubkey = TextEditingController();
|
final TextEditingController outputPubkey = TextEditingController();
|
||||||
bool isTheEnd = false;
|
|
||||||
List transBC;
|
List transBC;
|
||||||
bool isFirstBuild = true;
|
bool isFirstBuild = true;
|
||||||
String fetchMoreCursor;
|
String fetchMoreCursor;
|
||||||
|
@ -158,10 +157,8 @@ class HistoryProvider with ChangeNotifier {
|
||||||
"###### DEBUG H Parse blockchainTX list. Cursor: $fetchMoreCursor ######");
|
"###### DEBUG H Parse blockchainTX list. Cursor: $fetchMoreCursor ######");
|
||||||
if (fetchMoreCursor != null) {
|
if (fetchMoreCursor != null) {
|
||||||
transBC = parseHistory(blockchainTX, _pubkey);
|
transBC = parseHistory(blockchainTX, _pubkey);
|
||||||
isTheEnd = false;
|
|
||||||
} else {
|
} else {
|
||||||
print("###### DEBUG H - Début de l'historique");
|
print("###### DEBUG H - Début de l'historique");
|
||||||
isTheEnd = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return opts;
|
return opts;
|
||||||
|
|
|
@ -233,7 +233,6 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier {
|
||||||
indent: 0,
|
indent: 0,
|
||||||
endIndent: 0,
|
endIndent: 0,
|
||||||
),
|
),
|
||||||
// !_historyProvider.pageInfo['hasPreviousPage'] //TODO: fix value of hasPreviousPage
|
|
||||||
_historyProvider.transBC == null
|
_historyProvider.transBC == null
|
||||||
? Text('Aucune transaction à afficher.')
|
? Text('Aucune transaction à afficher.')
|
||||||
: loopTransactions(context, result),
|
: loopTransactions(context, result),
|
||||||
|
@ -292,7 +291,8 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier {
|
||||||
CircularProgressIndicator(),
|
CircularProgressIndicator(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (_historyProvider.isTheEnd)
|
// if (_historyProvider.isTheEnd) // What I did before ...
|
||||||
|
if (!_historyProvider.pageInfo['hasPreviousPage'])
|
||||||
Column(children: <Widget>[
|
Column(children: <Widget>[
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 15),
|
||||||
Text("Début de l'historique.",
|
Text("Début de l'historique.",
|
||||||
|
|
Loading…
Reference in New Issue