diff --git a/lib/screens/history.dart b/lib/screens/history.dart index b423d1b..5573591 100644 --- a/lib/screens/history.dart +++ b/lib/screens/history.dart @@ -52,7 +52,7 @@ class _HistoryScreenState extends State { setState(() {}); - return widgetList; + return widgetList.reversed.toList(); } @override @@ -85,7 +85,7 @@ class _HistoryScreenState extends State { } void _deleteHistoryExceptLast30Days() { - while (_historyList.length > 31) { + while (_historyList.length > 30) { _historyList.removeAt(0); sharedPreferences.setStringList("history", _historyList); }