You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-17 10:57:44 +02:00
Make new asset grid the default
This commit is contained in:
@ -1,11 +1,6 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/modules/settings/providers/app_settings.provider.dart';
|
||||
import 'package:immich_mobile/modules/settings/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_toast.dart';
|
||||
|
||||
class ExperimentalSettings extends HookConsumerWidget {
|
||||
const ExperimentalSettings({
|
||||
@ -14,33 +9,6 @@ class ExperimentalSettings extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final appSettingService = ref.watch(appSettingsServiceProvider);
|
||||
|
||||
final useExperimentalAssetGrid = useState(false);
|
||||
|
||||
useEffect(
|
||||
() {
|
||||
useExperimentalAssetGrid.value = appSettingService
|
||||
.getSetting(AppSettingsEnum.useExperimentalAssetGrid);
|
||||
return null;
|
||||
},
|
||||
[],
|
||||
);
|
||||
|
||||
void changeUseExperimentalAssetGrid(bool status) {
|
||||
useExperimentalAssetGrid.value = status;
|
||||
appSettingService.setSetting(
|
||||
AppSettingsEnum.useExperimentalAssetGrid,
|
||||
status,
|
||||
);
|
||||
|
||||
ImmichToast.show(
|
||||
context: context,
|
||||
msg: "settings_require_restart".tr(),
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
);
|
||||
}
|
||||
|
||||
return ExpansionTile(
|
||||
textColor: Theme.of(context).primaryColor,
|
||||
title: const Text(
|
||||
@ -55,25 +23,25 @@ class ExperimentalSettings extends HookConsumerWidget {
|
||||
fontSize: 13,
|
||||
),
|
||||
).tr(),
|
||||
children: [
|
||||
SwitchListTile.adaptive(
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
title: const Text(
|
||||
"experimental_settings_new_asset_list_title",
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
).tr(),
|
||||
subtitle: const Text(
|
||||
"experimental_settings_new_asset_list_subtitle",
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
),
|
||||
).tr(),
|
||||
value: useExperimentalAssetGrid.value,
|
||||
onChanged: changeUseExperimentalAssetGrid,
|
||||
),
|
||||
children: const [
|
||||
// SwitchListTile.adaptive(
|
||||
// activeColor: Theme.of(context).primaryColor,
|
||||
// title: const Text(
|
||||
// "experimental_settings_new_asset_list_title",
|
||||
// style: TextStyle(
|
||||
// fontSize: 12,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ).tr(),
|
||||
// subtitle: const Text(
|
||||
// "experimental_settings_new_asset_list_subtitle",
|
||||
// style: TextStyle(
|
||||
// fontSize: 12,
|
||||
// ),
|
||||
// ).tr(),
|
||||
// value: useExperimentalAssetGrid.value,
|
||||
// onChanged: changeUseExperimentalAssetGrid,
|
||||
// ),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class SettingsPage extends HookConsumerWidget {
|
||||
const ThemeSetting(),
|
||||
const AssetListSettings(),
|
||||
if (Platform.isAndroid) const NotificationSetting(),
|
||||
const ExperimentalSettings(),
|
||||
//const ExperimentalSettings(),
|
||||
],
|
||||
).toList(),
|
||||
],
|
||||
|
Reference in New Issue
Block a user