From e3656a64a8441d749a349d1e7f906cd2c0dd83f4 Mon Sep 17 00:00:00 2001 From: kfj001 Date: Thu, 30 Apr 2026 21:20:35 -0700 Subject: [PATCH] Removes dropdown selector for refresh cycle. Changes refresh to 20 seconds. --- lib/live_info_business_object.dart | 2 +- lib/live_info_panel.dart | 55 ------------------------------ 2 files changed, 1 insertion(+), 56 deletions(-) diff --git a/lib/live_info_business_object.dart b/lib/live_info_business_object.dart index 44f1bec..80dfd99 100644 --- a/lib/live_info_business_object.dart +++ b/lib/live_info_business_object.dart @@ -10,7 +10,7 @@ class LiveInfoBusinessObject extends ChangeNotifier { 'KRYZ_LIVE_INFO_URL', defaultValue: 'http://kryz.airtime.pro/api/live-info', ), - int refreshIntervalSeconds = 15, + int refreshIntervalSeconds = 20, this.requestTimeout = const Duration(seconds: 8), }) : _refreshIntervalSeconds = refreshIntervalSeconds; diff --git a/lib/live_info_panel.dart b/lib/live_info_panel.dart index 9a07581..ef9d0bb 100644 --- a/lib/live_info_panel.dart +++ b/lib/live_info_panel.dart @@ -68,61 +68,6 @@ class LiveInfoPanel extends StatelessWidget { ), ), ), - Container( - padding: const EdgeInsets.symmetric( - horizontal: 10, - vertical: 5, - ), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(999), - color: Colors.black.withValues(alpha: 0.12), - ), - child: Text( - snapshot?.sourceEnabled ?? 'Unknown Source', - style: Theme.of(context).textTheme.labelSmall?.copyWith( - fontWeight: FontWeight.w700, - ), - ), - ), - const SizedBox(width: 8), - PopupMenuButton( - tooltip: 'Set refresh interval', - initialValue: liveInfo.refreshIntervalSeconds, - onSelected: liveInfo.setRefreshIntervalSeconds, - itemBuilder: (BuildContext context) { - return intervalOptions - .map( - (int seconds) => PopupMenuItem( - value: seconds, - child: Text('$seconds seconds'), - ), - ) - .toList(growable: false); - }, - child: Container( - padding: const EdgeInsets.symmetric( - horizontal: 10, - vertical: 6, - ), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - color: Colors.black.withValues(alpha: 0.08), - ), - child: Text( - '${liveInfo.refreshIntervalSeconds}s', - style: Theme.of(context).textTheme.labelMedium?.copyWith( - fontWeight: FontWeight.w700, - ), - ), - ), - ), - IconButton( - tooltip: 'Refresh now', - onPressed: liveInfo.isLoading - ? null - : () => liveInfo.refresh(), - icon: const Icon(Icons.refresh_rounded), - ), ], ), const SizedBox(height: 8),