From 2c06d0d56a6813c71d20574a9eaca94c0f7686ad Mon Sep 17 00:00:00 2001 From: jld3103 Date: Tue, 22 Aug 2023 20:23:23 +0200 Subject: [PATCH] chore(neon): Adjust Signed-off-by: jld3103 --- packages/neon/neon/lib/src/app.dart | 2 +- packages/neon/neon/lib/src/blocs/apps.dart | 4 +++- packages/neon/neon/lib/src/theme/theme.dart | 2 +- packages/neon/neon/lib/src/widgets/drawer.dart | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/neon/neon/lib/src/app.dart b/packages/neon/neon/lib/src/app.dart index 39df45f6..5673d950 100644 --- a/packages/neon/neon/lib/src/app.dart +++ b/packages/neon/neon/lib/src/app.dart @@ -291,7 +291,7 @@ class _NeonAppState extends State with WidgetsBindingObserver, tray.Tra : null, builder: (final context, final capabilitiesSnapshot) { final appTheme = AppTheme( - capabilitiesSnapshot.data?.capabilities.theming, + capabilitiesSnapshot.data?.capabilities.themingPublicCapabilities?.theming, keepOriginalAccentColor: themeKeepOriginalAccentColor, oledAsDark: themeOLEDAsDark, appThemes: _appImplementations.map((final a) => a.theme).whereNotNull(), diff --git a/packages/neon/neon/lib/src/blocs/apps.dart b/packages/neon/neon/lib/src/blocs/apps.dart index 12def172..a04ae662 100644 --- a/packages/neon/neon/lib/src/blocs/apps.dart +++ b/packages/neon/neon/lib/src/blocs/apps.dart @@ -69,7 +69,9 @@ class AppsBloc extends InteractiveBloc implements AppsBlocEvents, AppsBlocStates _capabilitiesBloc.capabilities.listen((final result) { notificationsAppImplementation.add( result.transform( - (final data) => data.capabilities.notifications != null ? _findAppImplementation(AppIDs.notifications) : null, + (final data) => data.capabilities.notificationsCapabilities?.notifications != null + ? _findAppImplementation(AppIDs.notifications) + : null, ), ); diff --git a/packages/neon/neon/lib/src/theme/theme.dart b/packages/neon/neon/lib/src/theme/theme.dart index 4c48bd1a..3bed297e 100644 --- a/packages/neon/neon/lib/src/theme/theme.dart +++ b/packages/neon/neon/lib/src/theme/theme.dart @@ -16,7 +16,7 @@ class AppTheme { this.appThemes, }) : keepOriginalAccentColor = nextcloudTheme == null || keepOriginalAccentColor; - final CoreOcsGetCapabilitiesResponse200ApplicationJson_Ocs_Data_Capabilities_Theming? nextcloudTheme; + final CoreThemingPublicCapabilities_Theming? nextcloudTheme; final bool keepOriginalAccentColor; final bool oledAsDark; final Iterable? appThemes; diff --git a/packages/neon/neon/lib/src/widgets/drawer.dart b/packages/neon/neon/lib/src/widgets/drawer.dart index 75aedd83..b6d0f419 100644 --- a/packages/neon/neon/lib/src/widgets/drawer.dart +++ b/packages/neon/neon/lib/src/widgets/drawer.dart @@ -137,7 +137,7 @@ class NeonDrawerHeader extends StatelessWidget { ); } - final theme = capabilities.requireData.capabilities.theming; + final theme = capabilities.requireData.capabilities.themingPublicCapabilities?.theming; if (theme == null) { return const SizedBox();