Skip to content

Commit a9757dd

Browse files
committed
Update version codes and enhance repeater filtering logic in discovery process
1 parent 5406af8 commit a9757dd

File tree

7 files changed

+64
-38
lines changed

7 files changed

+64
-38
lines changed

android/local.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ sdk.dir=/opt/homebrew/share/android-commandlinetools
22
flutter.sdk=/opt/homebrew/share/flutter
33
flutter.buildMode=release
44
flutter.versionName=1.0.0
5-
flutter.versionCode=1769367734
5+
flutter.versionCode=1769401658

ios/Flutter/Generated.xcconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ COCOAPODS_PARALLEL_CODE_SIGN=true
55
FLUTTER_TARGET=lib/main.dart
66
FLUTTER_BUILD_DIR=build
77
FLUTTER_BUILD_NAME=1.0.0
8-
FLUTTER_BUILD_NUMBER=1769367734
8+
FLUTTER_BUILD_NUMBER=1769401658
99
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
1010
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
11-
DART_DEFINES=QVBQX1ZFUlNJT049QVBQLTE3NjkzNjc3MzQ=,RkxVVFRFUl9WRVJTSU9OPTMuMzguNw==,RkxVVFRFUl9DSEFOTkVMPXN0YWJsZQ==,RkxVVFRFUl9HSVRfVVJMPWh0dHBzOi8vZ2l0aHViLmNvbS9mbHV0dGVyL2ZsdXR0ZXIuZ2l0,RkxVVFRFUl9GUkFNRVdPUktfUkVWSVNJT049M2I2MmVmYzJhMw==,RkxVVFRFUl9FTkdJTkVfUkVWSVNJT049NzhmYzMwMTJlNA==,RkxVVFRFUl9EQVJUX1ZFUlNJT049My4xMC43
11+
DART_DEFINES=QVBQX1ZFUlNJT049QVBQLTE3Njk0MDE2NTg=,RkxVVFRFUl9WRVJTSU9OPTMuMzguNw==,RkxVVFRFUl9DSEFOTkVMPXN0YWJsZQ==,RkxVVFRFUl9HSVRfVVJMPWh0dHBzOi8vZ2l0aHViLmNvbS9mbHV0dGVyL2ZsdXR0ZXIuZ2l0,RkxVVFRFUl9GUkFNRVdPUktfUkVWSVNJT049M2I2MmVmYzJhMw==,RkxVVFRFUl9FTkdJTkVfUkVWSVNJT049NzhmYzMwMTJlNA==,RkxVVFRFUl9EQVJUX1ZFUlNJT049My4xMC43
1212
DART_OBFUSCATION=false
1313
TRACK_WIDGET_CREATION=false
1414
TREE_SHAKE_ICONS=true

ios/Flutter/flutter_export_environment.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export "COCOAPODS_PARALLEL_CODE_SIGN=true"
66
export "FLUTTER_TARGET=lib/main.dart"
77
export "FLUTTER_BUILD_DIR=build"
88
export "FLUTTER_BUILD_NAME=1.0.0"
9-
export "FLUTTER_BUILD_NUMBER=1769367734"
10-
export "DART_DEFINES=QVBQX1ZFUlNJT049QVBQLTE3NjkzNjc3MzQ=,RkxVVFRFUl9WRVJTSU9OPTMuMzguNw==,RkxVVFRFUl9DSEFOTkVMPXN0YWJsZQ==,RkxVVFRFUl9HSVRfVVJMPWh0dHBzOi8vZ2l0aHViLmNvbS9mbHV0dGVyL2ZsdXR0ZXIuZ2l0,RkxVVFRFUl9GUkFNRVdPUktfUkVWSVNJT049M2I2MmVmYzJhMw==,RkxVVFRFUl9FTkdJTkVfUkVWSVNJT049NzhmYzMwMTJlNA==,RkxVVFRFUl9EQVJUX1ZFUlNJT049My4xMC43"
9+
export "FLUTTER_BUILD_NUMBER=1769401658"
10+
export "DART_DEFINES=QVBQX1ZFUlNJT049QVBQLTE3Njk0MDE2NTg=,RkxVVFRFUl9WRVJTSU9OPTMuMzguNw==,RkxVVFRFUl9DSEFOTkVMPXN0YWJsZQ==,RkxVVFRFUl9HSVRfVVJMPWh0dHBzOi8vZ2l0aHViLmNvbS9mbHV0dGVyL2ZsdXR0ZXIuZ2l0,RkxVVFRFUl9GUkFNRVdPUktfUkVWSVNJT049M2I2MmVmYzJhMw==,RkxVVFRFUl9FTkdJTkVfUkVWSVNJT049NzhmYzMwMTJlNA==,RkxVVFRFUl9EQVJUX1ZFUlNJT049My4xMC43"
1111
export "DART_OBFUSCATION=false"
1212
export "TRACK_WIDGET_CREATION=false"
1313
export "TREE_SHAKE_ICONS=true"

lib/providers/app_state_provider.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,17 @@ class AppStateProvider extends ChangeNotifier {
641641
deviceId: _deviceId,
642642
txTracker: _txTracker,
643643
audioService: _audioService,
644+
shouldIgnoreRepeater: (String repeaterId) {
645+
// Same filter as RxLogger - check user preferences for ignored repeater ID
646+
final prefs = _preferences;
647+
if (prefs.ignoreCarpeater && prefs.ignoreRepeaterId != null) {
648+
// Case-insensitive comparison (both uppercase)
649+
final ignored = prefs.ignoreRepeaterId!.toUpperCase();
650+
final current = repeaterId.toUpperCase();
651+
return current == ignored;
652+
}
653+
return false;
654+
},
644655
);
645656

646657
// Set validation callbacks

lib/services/meshcore/disc_tracker.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ class DiscTracker {
1616

1717
Timer? _windowTimer;
1818

19+
/// Callback to check if a repeater should be ignored (carpeater filter)
20+
final bool Function(String repeaterId)? shouldIgnoreRepeater;
21+
1922
/// Callback fired when a new node is discovered
2023
/// Parameters: (node, isNew) - isNew is true for first time seeing this node
2124
void Function(DiscoveredNode node, bool isNew)? onNodeDiscovered;
2225

26+
DiscTracker({this.shouldIgnoreRepeater});
27+
2328
/// Callback fired when discovery window completes
2429
void Function(List<DiscoveredNode> discoveredNodes)? onWindowComplete;
2530

@@ -124,6 +129,12 @@ class DiscTracker {
124129
// Get repeater ID (first 2 hex chars = first byte)
125130
final repeaterId = pubkeyHex.substring(0, 2);
126131

132+
// Check if this repeater should be ignored (user carpeater filter)
133+
if (shouldIgnoreRepeater != null && shouldIgnoreRepeater!(repeaterId)) {
134+
debugLog('[DISC] Ignoring repeater $repeaterId (user carpeater filter)');
135+
return false;
136+
}
137+
127138
final nodeType = lowerNibble == DiscoveryConstants.nodeTypeRepeater ? 'REPEATER' : 'ROOM';
128139

129140
debugLog('[DISC] Received response from $repeaterId ($nodeType): '

lib/services/ping_service.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class PingService {
5656
final String _deviceId;
5757
final TxTracker? _txTracker;
5858
final AudioService? _audioService;
59+
final bool Function(String repeaterId)? shouldIgnoreRepeater;
5960

6061
PingStats _stats = const PingStats();
6162
DateTime? _lastTxTime;
@@ -125,6 +126,7 @@ class PingService {
125126
required String deviceId,
126127
TxTracker? txTracker,
127128
AudioService? audioService,
129+
this.shouldIgnoreRepeater,
128130
}) : _gpsService = gpsService,
129131
_connection = connection,
130132
_apiQueue = apiQueue,
@@ -749,7 +751,7 @@ class PingService {
749751
debugLog('[DISC] Starting discovery mode');
750752

751753
// Create and configure discovery tracker
752-
_discTracker = DiscTracker();
754+
_discTracker = DiscTracker(shouldIgnoreRepeater: shouldIgnoreRepeater);
753755
_discTracker!.onNodeDiscovered = (node, isNew) {
754756
debugLog('[DISC] Node discovered: ${node.repeaterId} (${node.nodeTypeName}), isNew=$isNew');
755757
};

lib/widgets/ping_controls.dart

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,39 +1152,41 @@ class _CompactActionButtonState extends State<_CompactActionButton>
11521152
horizontal: hasLabel ? 10 : 8,
11531153
vertical: 6,
11541154
),
1155-
child: FittedBox(
1156-
fit: BoxFit.scaleDown,
1157-
child: Row(
1158-
mainAxisAlignment: MainAxisAlignment.center,
1159-
mainAxisSize: MainAxisSize.min,
1160-
children: [
1161-
Icon(
1162-
widget.icon,
1163-
size: 18,
1164-
color: showColor ? effectiveColor : Colors.grey.shade400,
1165-
),
1166-
// Animated label - show when label is provided
1167-
AnimatedSize(
1168-
duration: const Duration(milliseconds: 200),
1169-
curve: Curves.easeInOut,
1170-
child: hasLabel
1171-
? Row(
1172-
mainAxisSize: MainAxisSize.min,
1173-
children: [
1174-
const SizedBox(width: 5),
1175-
Text(
1176-
widget.label!,
1177-
style: TextStyle(
1178-
fontSize: 11,
1179-
fontWeight: widget.isActive ? FontWeight.w600 : FontWeight.w500,
1180-
color: showColor ? effectiveColor : Colors.grey.shade400,
1155+
child: Center(
1156+
child: FittedBox(
1157+
fit: BoxFit.scaleDown,
1158+
child: Row(
1159+
mainAxisAlignment: MainAxisAlignment.center,
1160+
mainAxisSize: MainAxisSize.min,
1161+
children: [
1162+
Icon(
1163+
widget.icon,
1164+
size: 18,
1165+
color: showColor ? effectiveColor : Colors.grey.shade400,
1166+
),
1167+
// Animated label - show when label is provided
1168+
AnimatedSize(
1169+
duration: const Duration(milliseconds: 200),
1170+
curve: Curves.easeInOut,
1171+
child: hasLabel
1172+
? Row(
1173+
mainAxisSize: MainAxisSize.min,
1174+
children: [
1175+
const SizedBox(width: 5),
1176+
Text(
1177+
widget.label!,
1178+
style: TextStyle(
1179+
fontSize: 11,
1180+
fontWeight: widget.isActive ? FontWeight.w600 : FontWeight.w500,
1181+
color: showColor ? effectiveColor : Colors.grey.shade400,
1182+
),
11811183
),
1182-
),
1183-
],
1184-
)
1185-
: const SizedBox.shrink(),
1186-
),
1187-
],
1184+
],
1185+
)
1186+
: const SizedBox.shrink(),
1187+
),
1188+
],
1189+
),
11881190
),
11891191
),
11901192
),

0 commit comments

Comments
 (0)