Skip to content

Commit

Permalink
hide bills tab when api version is too low
Browse files Browse the repository at this point in the history
ref #341
  • Loading branch information
dreautall committed Mar 26, 2024
1 parent e45da6c commit ec005cf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/pages/navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:logging/logging.dart';
import 'package:provider/provider.dart';
import 'package:version/version.dart';

import 'package:waterflyiii/animations.dart';
import 'package:waterflyiii/auth.dart';
Expand Down Expand Up @@ -131,6 +132,14 @@ class NavPageState extends State<NavPage> with TickerProviderStateMixin {
),
];

// Bills page not working below Firefly 6.1.0 (API Version 2.0.12)
// https://github.com/firefly-iii/firefly-iii/issues/8106
if (context.read<FireflyService>().apiVersion! < Version(2, 0, 12)) {
navDestinations.removeWhere(
(NavDestination e) => e.label == S.of(context).navigationBills,
);
}

_tabController = TabController(vsync: this, length: navDestinations.length);
}

Expand Down

0 comments on commit ec005cf

Please sign in to comment.