Skip to content
Snippets Groups Projects
Commit 54a4e0da authored by poka's avatar poka
Browse files

Use hasPreviousPage correctly to check if we are on beginning of history

parent e625a9bd
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,6 @@ class HistoryProvider with ChangeNotifier {
String pubkey = '';
HistoryProvider(this.pubkey);
final TextEditingController outputPubkey = TextEditingController();
bool isTheEnd = false;
List transBC;
bool isFirstBuild = true;
String fetchMoreCursor;
......@@ -158,10 +157,8 @@ class HistoryProvider with ChangeNotifier {
"###### DEBUG H Parse blockchainTX list. Cursor: $fetchMoreCursor ######");
if (fetchMoreCursor != null) {
transBC = parseHistory(blockchainTX, _pubkey);
isTheEnd = false;
} else {
print("###### DEBUG H - Début de l'historique");
isTheEnd = true;
}
return opts;
......
......@@ -233,7 +233,6 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier {
indent: 0,
endIndent: 0,
),
// !_historyProvider.pageInfo['hasPreviousPage'] //TODO: fix value of hasPreviousPage
_historyProvider.transBC == null
? Text('Aucune transaction à afficher.')
: loopTransactions(context, result),
......@@ -292,7 +291,8 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier {
CircularProgressIndicator(),
],
),
if (_historyProvider.isTheEnd)
// if (_historyProvider.isTheEnd) // What I did before ...
if (!_historyProvider.pageInfo['hasPreviousPage'])
Column(children: <Widget>[
SizedBox(height: 15),
Text("Début de l'historique.",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment