Skip to content

Commit

Permalink
do not use apiv2 calls for charts for now
Browse files Browse the repository at this point in the history
fallback for daily summary chart, removed net worth chart.
fixes #405 (for now)
  • Loading branch information
dreautall committed Jun 22, 2024
1 parent f3fb987 commit 14e75ec
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/pages/home/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ class _HomeMainState extends State<HomeMain>
lastDaysIncome.clear();

// With a new API the number of API calls is reduced from 14 to 2
if (context.read<FireflyService>().apiVersion! >= Version(2, 0, 7)) {
// :TODO: currently there is a bug in the APIv2 call, disabled this for now..
if (false &&
context.read<FireflyService>().apiVersion! >= Version(2, 0, 7)) {
final FireflyIiiV2 apiV2 = context.read<FireflyService>().apiV2;

final List<int> accounts = <int>[];
Expand Down Expand Up @@ -775,7 +777,9 @@ class _HomeMainState extends State<HomeMain>
),
),
const SizedBox(height: 8),
if (context.read<FireflyService>().apiVersion! >= Version(2, 0, 7))
// :TODO: currently there is a bug in the APIv2 call, disabled this for now..
if (false &&
context.read<FireflyService>().apiVersion! >= Version(2, 0, 7))
ChartCard(
title: S.of(context).homeMainChartNetWorthTitle,
future: _fetchBalance(),
Expand Down Expand Up @@ -923,7 +927,8 @@ class _HomeMainState extends State<HomeMain>
liabilities: lastMonthsLiabilities,
),
),
if (context.read<FireflyService>().apiVersion! >= Version(2, 0, 7))
if (false &&
context.read<FireflyService>().apiVersion! >= Version(2, 0, 7))
const SizedBox(height: 8),
AnimatedHeight(
child: FutureBuilder<List<BudgetLimitRead>>(
Expand Down

0 comments on commit 14e75ec

Please sign in to comment.