Browse Source

chore(neon): Adjust

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/597/head
jld3103 1 year ago
parent
commit
2c06d0d56a
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/neon/neon/lib/src/app.dart
  2. 4
      packages/neon/neon/lib/src/blocs/apps.dart
  3. 2
      packages/neon/neon/lib/src/theme/theme.dart
  4. 2
      packages/neon/neon/lib/src/widgets/drawer.dart

2
packages/neon/neon/lib/src/app.dart

@ -291,7 +291,7 @@ class _NeonAppState extends State<NeonApp> with WidgetsBindingObserver, tray.Tra
: null, : null,
builder: (final context, final capabilitiesSnapshot) { builder: (final context, final capabilitiesSnapshot) {
final appTheme = AppTheme( final appTheme = AppTheme(
capabilitiesSnapshot.data?.capabilities.theming, capabilitiesSnapshot.data?.capabilities.themingPublicCapabilities?.theming,
keepOriginalAccentColor: themeKeepOriginalAccentColor, keepOriginalAccentColor: themeKeepOriginalAccentColor,
oledAsDark: themeOLEDAsDark, oledAsDark: themeOLEDAsDark,
appThemes: _appImplementations.map((final a) => a.theme).whereNotNull(), appThemes: _appImplementations.map((final a) => a.theme).whereNotNull(),

4
packages/neon/neon/lib/src/blocs/apps.dart

@ -69,7 +69,9 @@ class AppsBloc extends InteractiveBloc implements AppsBlocEvents, AppsBlocStates
_capabilitiesBloc.capabilities.listen((final result) { _capabilitiesBloc.capabilities.listen((final result) {
notificationsAppImplementation.add( notificationsAppImplementation.add(
result.transform( result.transform(
(final data) => data.capabilities.notifications != null ? _findAppImplementation(AppIDs.notifications) : null, (final data) => data.capabilities.notificationsCapabilities?.notifications != null
? _findAppImplementation(AppIDs.notifications)
: null,
), ),
); );

2
packages/neon/neon/lib/src/theme/theme.dart

@ -16,7 +16,7 @@ class AppTheme {
this.appThemes, this.appThemes,
}) : keepOriginalAccentColor = nextcloudTheme == null || keepOriginalAccentColor; }) : keepOriginalAccentColor = nextcloudTheme == null || keepOriginalAccentColor;
final CoreOcsGetCapabilitiesResponse200ApplicationJson_Ocs_Data_Capabilities_Theming? nextcloudTheme; final CoreThemingPublicCapabilities_Theming? nextcloudTheme;
final bool keepOriginalAccentColor; final bool keepOriginalAccentColor;
final bool oledAsDark; final bool oledAsDark;
final Iterable<ThemeExtension>? appThemes; final Iterable<ThemeExtension>? appThemes;

2
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) { if (theme == null) {
return const SizedBox(); return const SizedBox();

Loading…
Cancel
Save