guessed location filter applies to estimated online nodes.
This commit is contained in:
1 parent
e073f6bd52
commit
512bc1952c
1 file changed
+6
-2
@@ -723,6 +723,7 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
|
|||||||
final visibleOnlineRepeaters = _filterOnlineRepeatersBySettings(
|
final visibleOnlineRepeaters = _filterOnlineRepeatersBySettings(
|
||||||
_online.repeaters,
|
_online.repeaters,
|
||||||
settings,
|
settings,
|
||||||
|
showGuessedLocations: settings.mapShowGuessedLocations,
|
||||||
);
|
);
|
||||||
Contact? selectedContact;
|
Contact? selectedContact;
|
||||||
if (_selectedKey != null) {
|
if (_selectedKey != null) {
|
||||||
@@ -1439,12 +1440,15 @@ class _MapScreenState extends State<MapScreen> with DisconnectNavigationMixin {
|
|||||||
|
|
||||||
List<NetworkMapRepeater> _filterOnlineRepeatersBySettings(
|
List<NetworkMapRepeater> _filterOnlineRepeatersBySettings(
|
||||||
List<NetworkMapRepeater> repeaters,
|
List<NetworkMapRepeater> repeaters,
|
||||||
dynamic settings,
|
dynamic settings, {
|
||||||
) {
|
required bool showGuessedLocations,
|
||||||
|
}) {
|
||||||
final keyPrefix = settings.mapKeyPrefix.trim().toLowerCase();
|
final keyPrefix = settings.mapKeyPrefix.trim().toLowerCase();
|
||||||
final now = DateTime.now();
|
final now = DateTime.now();
|
||||||
|
|
||||||
return repeaters.where((repeater) {
|
return repeaters.where((repeater) {
|
||||||
|
if (repeater.isEstimated && !showGuessedLocations) return false;
|
||||||
|
|
||||||
final typeVisible = switch (repeater.type) {
|
final typeVisible = switch (repeater.type) {
|
||||||
advTypeRepeater => settings.mapShowRepeaters,
|
advTypeRepeater => settings.mapShowRepeaters,
|
||||||
advTypeChat => settings.mapShowChatNodes,
|
advTypeChat => settings.mapShowChatNodes,
|
||||||
|
|||||||
Reference in new issue
Block a user