mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
Fixing formatting
This commit is contained in:
parent
7a903d39c0
commit
9731a1a60f
6 changed files with 18 additions and 41 deletions
|
|
@ -2,14 +2,7 @@ import 'dart:convert';
|
|||
|
||||
const _defaultRotationMinutes = 30;
|
||||
|
||||
enum RotationMode {
|
||||
lockUnlock,
|
||||
minutes,
|
||||
hours,
|
||||
daily,
|
||||
}
|
||||
|
||||
|
||||
enum RotationMode { lockUnlock, minutes, hours, daily }
|
||||
|
||||
extension RotationModeExtension on RotationMode {
|
||||
String get label {
|
||||
|
|
@ -39,8 +32,6 @@ extension RotationModeExtension on RotationMode {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class LiveWallpaperPreferences {
|
||||
const LiveWallpaperPreferences({
|
||||
required this.enabled,
|
||||
|
|
@ -148,6 +139,4 @@ class LiveWallpaperPreferences {
|
|||
return RotationMode.minutes;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,8 +86,6 @@ class LiveWallpaperSetupPage extends HookConsumerWidget {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text('live_wallpaper_setup_title'.tr())),
|
||||
body: Padding(
|
||||
|
|
@ -132,7 +130,6 @@ class LiveWallpaperSetupPage extends HookConsumerWidget {
|
|||
onPressed: onSetWallpaper,
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -250,5 +247,3 @@ class _RotationControl extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,15 +15,14 @@ final liveWallpaperAssetServiceProvider = Provider<LiveWallpaperAssetService>((r
|
|||
return LiveWallpaperAssetService(ref.watch(assetApiRepositoryProvider));
|
||||
});
|
||||
|
||||
final liveWallpaperPreferencesProvider = StateNotifierProvider<LiveWallpaperPreferencesNotifier, LiveWallpaperPreferences>
|
||||
((ref) {
|
||||
final liveWallpaperPreferencesProvider =
|
||||
StateNotifierProvider<LiveWallpaperPreferencesNotifier, LiveWallpaperPreferences>((ref) {
|
||||
final service = ref.watch(liveWallpaperPreferencesServiceProvider);
|
||||
return LiveWallpaperPreferencesNotifier(service);
|
||||
});
|
||||
|
||||
class LiveWallpaperPreferencesNotifier extends StateNotifier<LiveWallpaperPreferences> {
|
||||
LiveWallpaperPreferencesNotifier(this._service)
|
||||
: super(_service.load()) {
|
||||
LiveWallpaperPreferencesNotifier(this._service) : super(_service.load()) {
|
||||
_subscription = _service.watch().listen((event) {
|
||||
if (mounted) {
|
||||
state = event;
|
||||
|
|
|
|||
|
|
@ -42,9 +42,7 @@ class LiveWallpaperSetting extends HookConsumerWidget {
|
|||
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
|
||||
child: ListTile(
|
||||
title: Text('live_wallpaper_setting_manage'.tr()),
|
||||
subtitle: statusText == null
|
||||
? null
|
||||
: Text(statusText, style: Theme.of(context).textTheme.bodySmall),
|
||||
subtitle: statusText == null ? null : Text(statusText, style: Theme.of(context).textTheme.bodySmall),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
onTap: () => context.pushRoute(const LiveWallpaperSetupRoute()),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -30,11 +30,7 @@ class WallpaperStatusMessage {
|
|||
final bool isActive;
|
||||
final String? lastError;
|
||||
|
||||
const WallpaperStatusMessage({
|
||||
this.isSupported = true,
|
||||
this.isActive = false,
|
||||
this.lastError,
|
||||
});
|
||||
const WallpaperStatusMessage({this.isSupported = true, this.isActive = false, this.lastError});
|
||||
}
|
||||
|
||||
@HostApi()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue