fix: set correct graph type when opening graph view

fixes #41
This commit is contained in:
Matyáš Caras 2024-04-22 16:59:08 +02:00
parent 1faa5e2f78
commit 8ff63c9492
Signed by untrusted user who does not match committer: hernik
GPG key ID: 2A3175F98820C5C6

View file

@ -97,7 +97,8 @@ class _GraphViewState extends State<GraphView> {
super.initState(); super.initState();
loadWallet(); loadWallet();
SharedPreferences.getInstance().then((s) { SharedPreferences.getInstance().then((s) {
chartType = s.getInt("monthlygraph") ?? 2; chartType = s.getInt("yearlygraph") ?? 1;
logger.d(chartType);
setState(() {}); setState(() {});
}); });
} }