From 5c9f51a1106e7829b983531dd2dd13d0e1a120ff Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Sun, 10 Nov 2024 22:55:50 +0800 Subject: [PATCH] Hide EXIF settings on nextcloud 28+ --- app/lib/widget/settings.dart | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/lib/widget/settings.dart b/app/lib/widget/settings.dart index f721080a..0232eba1 100644 --- a/app/lib/widget/settings.dart +++ b/app/lib/widget/settings.dart @@ -4,7 +4,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:logging/logging.dart'; import 'package:nc_photos/app_localizations.dart'; +import 'package:nc_photos/controller/account_controller.dart'; import 'package:nc_photos/controller/pref_controller.dart'; +import 'package:nc_photos/controller/server_controller.dart'; import 'package:nc_photos/debug_util.dart'; import 'package:nc_photos/k.dart' as k; import 'package:nc_photos/language_util.dart' as language_util; @@ -79,11 +81,15 @@ class _SettingsState extends State { description: L10n.global().settingsThemeDescription, pageBuilder: () => const ThemeSettings(), ), - _SubPageItem( - leading: const Icon(Icons.local_offer_outlined), - label: L10n.global().settingsMetadataTitle, - pageBuilder: () => const MetadataSettings(), - ), + if (!context + .read() + .serverController + .isSupported(ServerFeature.ncMetadata)) + _SubPageItem( + leading: const Icon(Icons.local_offer_outlined), + label: L10n.global().settingsMetadataTitle, + pageBuilder: () => const MetadataSettings(), + ), _SubPageItem( leading: const Icon(Icons.image_outlined), label: L10n.global().photosTabLabel,