Remove notification interval setting

This commit is contained in:
Nutcake 2023-05-09 10:43:10 +02:00
parent 6f99015a1c
commit 56ae580329
3 changed files with 23 additions and 31 deletions

View file

@ -5,15 +5,6 @@ import 'package:url_launcher/url_launcher.dart';
class SettingsPage extends StatelessWidget {
const SettingsPage({super.key});
static const Map<int, String> _intervalSelections = {
5: "5 Minutes",
15: "15 Minutes",
30: "30 Minutes",
60: "1 Hour",
120: "2 Hours",
300: "6 Hours",
600: "12 Hours",
};
@override
Widget build(BuildContext context) {
@ -36,22 +27,6 @@ class SettingsPage extends StatelessWidget {
initialState: !sClient.currentSettings.notificationsDenied.valueOrDefault,
onChanged: (value) async => await sClient.changeSettings(sClient.currentSettings.copyWith(notificationsDenied: !value)),
),
ListTile(
trailing: StatefulBuilder(
builder: (context, setState) {
return DropdownButton<int>(
items: _intervalSelections.keys.map((e) => DropdownMenuItem<int>(value: e, child: Text("${_intervalSelections[e]}"))).toList(),
value: sClient.currentSettings.unreadCheckIntervalMinutes.valueOrDefault,
onChanged: (int? value) async {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Sorry, this feature is not yet implemented.")));
await sClient.changeSettings(sClient.currentSettings.copyWith(unreadCheckIntervalMinutes: value));
setState(() {});
},
);
}
),
title: const Text("Check Interval"),
),
const ListSectionHeader(name: "Other"),
ListTile(
trailing: const Icon(Icons.logout),

View file

@ -82,13 +82,13 @@ packages:
source: hosted
version: "1.17.0"
crypto:
dependency: transitive
dependency: "direct main"
description:
name: crypto
sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "3.0.3"
csslib:
dependency: transitive
description:
@ -137,6 +137,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.1.4"
file_picker:
dependency: "direct main"
description:
name: file_picker
sha256: e6c7ad8e572379df86ea64ef0a5395889fba3954411d47ca021b888d79f8e798
url: "https://pub.dev"
source: hosted
version: "5.2.11"
flutter:
dependency: "direct main"
description: flutter
@ -198,6 +206,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.1"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "96af49aa6b57c10a312106ad6f71deed5a754029c24789bbf620ba784f0bd0b0"
url: "https://pub.dev"
source: hosted
version: "2.0.14"
flutter_secure_storage:
dependency: "direct main"
description:
@ -737,10 +753,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4
sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c"
url: "https://pub.dev"
source: hosted
version: "3.1.4"
version: "4.1.4"
workmanager:
dependency: "direct main"
description:

View file

@ -31,7 +31,6 @@ dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
@ -55,6 +54,8 @@ dependencies:
provider: ^6.0.5
full_screen_image: ^2.0.0
photo_view: ^0.14.0
file_picker: ^5.2.11
crypto: ^3.0.3
dev_dependencies:
flutter_test: