From d669d9eef846b834fa573ace1301680d2d282cd0 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 13 Jun 2025 15:09:59 -0700 Subject: [PATCH] Minimum heartbeat value --- lib/settings_screen.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/settings_screen.dart b/lib/settings_screen.dart index a7fbffb..89f163f 100644 --- a/lib/settings_screen.dart +++ b/lib/settings_screen.dart @@ -82,8 +82,11 @@ class _SettingsScreenState extends State { } } if (isInt) { - final intValue = int.tryParse(result); + int? intValue = int.tryParse(result); if (intValue != null) { + if (key == Preferences.heartbeat && intValue > 0 && intValue < 60) { + intValue = 60; // minimum heartbeat is 60 seconds + } await Preferences.instance.setInt(key, intValue); } } else {