Graduate people from lab

This commit is contained in:
Ming Ming 2021-09-16 18:57:52 +08:00
parent d8177edd28
commit 75c040aa1d
4 changed files with 1 additions and 17 deletions

View file

@ -8,7 +8,6 @@ class Lab {
}
bool get enableSharedAlbum => Pref.inst().isLabEnableSharedAlbumOr(false);
bool get enablePeople => Pref.inst().isLabEnablePeopleOr(false);
Lab._();

View file

@ -125,11 +125,6 @@ class Pref {
Future<bool> setLabEnableSharedAlbum(bool value) =>
_setBool(PrefKey.labEnableSharedAlbum, value);
bool? isLabEnablePeople() => _pref.getBool(_toKey(PrefKey.labEnablePeople));
bool isLabEnablePeopleOr(bool def) => isLabEnablePeople() ?? def;
Future<bool> setLabEnablePeople(bool value) =>
_setBool(PrefKey.labEnablePeople, value);
Pref._();
Future<bool> _setBool(PrefKey key, bool value) async {
@ -188,8 +183,6 @@ class Pref {
return "hasNewSharedAlbum";
case PrefKey.labEnableSharedAlbum:
return "isLabEnableSharedAlbum";
case PrefKey.labEnablePeople:
return "isLabEnablePeople";
case PrefKey.slideshowDuration:
return "slideshowDuration";
case PrefKey.isSlideshowShuffle:
@ -220,7 +213,6 @@ enum PrefKey {
language,
newSharedAlbum,
labEnableSharedAlbum,
labEnablePeople,
slideshowDuration,
isSlideshowShuffle,
isSlideshowRepeat,

View file

@ -443,7 +443,7 @@ class _HomeAlbumsState extends State<HomeAlbums>
}
}).map((e) => e.item2);
itemStreamListItems = [
if (Lab().enablePeople) _buildPersonItem(context),
_buildPersonItem(context),
if (Lab().enableSharedAlbum) _buildShareItem(context),
_buildArchiveItem(context),
_buildTrashbinItem(context),

View file

@ -67,13 +67,6 @@ class _LabSettingsState extends State<LabSettings> {
Pref.inst().setLabEnableSharedAlbum(value);
},
),
_LabBoolItem(
title: const Text("enablePeople"),
isSelected: Pref.inst().isLabEnablePeopleOr(false),
onChanged: (value) {
Pref.inst().setLabEnablePeople(value);
},
),
],
);
}