Add radio statistics and localization updates

- Implemented radio statistics features in multiple screens including chat, channels, and settings.
- Added localization for new strings in Swedish, Ukrainian, and Chinese.
- Introduced a setting to jump to the oldest unread message in chat and channels.
- Enhanced path management and display for contacts and messages.
- Updated app settings to include new boolean for jumping to the oldest unread message.
- Improved battery indicator and radio stats display in the app bar.
- Removed unused wakelock_plus dependency and updated plugin registrations.
This commit is contained in:
zjs81 2026-03-23 19:24:27 -07:00
parent 4c492f69ef
commit e7e2bb91b8
38 changed files with 1955 additions and 99 deletions

View file

@ -3,6 +3,7 @@ import 'package:meshcore_open/connector/meshcore_connector.dart';
import 'package:meshcore_open/widgets/battery_indicator.dart';
import 'package:provider/provider.dart';
import 'radio_stats_entry.dart';
import 'snr_indicator.dart';
class AppBarTitle extends StatelessWidget {
@ -10,12 +11,14 @@ class AppBarTitle extends StatelessWidget {
final Widget? leading;
final Widget? trailing;
final bool indicators;
final bool showBatteryIndicator;
final bool subtitle;
const AppBarTitle(
this.title, {
this.leading,
this.trailing,
this.indicators = true,
this.showBatteryIndicator = true,
this.subtitle = true,
super.key,
});
@ -33,7 +36,8 @@ class AppBarTitle extends StatelessWidget {
final compact = availableWidth < 170;
final showSubtitle =
!compact && connector.isConnected && selfName != null && subtitle;
final showBattery = availableWidth >= 60;
final showBattery =
showBatteryIndicator && availableWidth >= 60;
final showSnr = availableWidth >= 110;
final showIndicators = (showBattery || showSnr) && indicators;
@ -65,6 +69,16 @@ class AppBarTitle extends StatelessWidget {
children: [
if (showBattery) BatteryIndicator(connector: connector),
if (showSnr) SNRIndicator(connector: connector),
if (connector.supportsCompanionRadioStats)
ValueListenableBuilder(
valueListenable: connector.radioStatsNotifier,
builder: (context, _, child) => Padding(
padding: const EdgeInsets.only(left: 4),
child: AirActivityDot(
active: connector.radioStatsAirActivityPulse,
),
),
),
],
),
trailing ?? const SizedBox.shrink(),

View file

@ -109,6 +109,7 @@ class _PathManagementDialogState extends State<_PathManagementDialog> {
path: Uint8List.fromList(pathBytes),
flipPathAround: true,
targetContact: widget.contact,
pathHashByteWidth: connector.pathHashByteWidth,
),
),
),
@ -135,7 +136,9 @@ class _PathManagementDialogState extends State<_PathManagementDialog> {
connector.getContacts();
}
final pathForInput = currentContact.pathIdList;
final pathForInput = currentContact.pathFormattedIdList(
connector.pathHashByteWidth,
);
final availableContacts = connector.allContacts
.where((c) => c.publicKeyHex != currentContact.publicKeyHex)
.toList();