Skip to content

Remove colorisation of repeaters with same prefix as red#370

Closed
ericszimmermann wants to merge 1 commit intozjs81:devfrom
ericszimmermann:ez_remove_matching_prefix_marker_color
Closed

Remove colorisation of repeaters with same prefix as red#370
ericszimmermann wants to merge 1 commit intozjs81:devfrom
ericszimmermann:ez_remove_matching_prefix_marker_color

Conversation

@ericszimmermann
Copy link
Copy Markdown
Contributor

@ericszimmermann ericszimmermann commented Apr 10, 2026

This PR removes the feature to mark Repeaters with matching Prefixes as Red.

As also in Issue #352 explained, this is of no usage anymore:
This is due to the fact, that with the Discovery list (unlimited appstorage) you can get so many repeaters,
that you have multiple matches for every Repeater prefix, resulting just in marking every Repeater red without additional information gain.
For 1500 Repeaters and a one byte Prefix you get about 5 matches for every prefix.

Additionally the calculation is done in a repeater ^ 2 search method, and this not only once on map load, but on every map interaction (move/zoom).
(In my previous PR #298 I implemented a repeater ^ 1 approach to keep the functionality, but as written above I would now advertise to remove this.)

PS: I hope it is right to base it on dev-branch?

@446564 446564 self-assigned this Apr 10, 2026
@446564
Copy link
Copy Markdown
Collaborator

446564 commented Apr 10, 2026

looks ok, testing now

@446564 446564 self-requested a review April 10, 2026 21:37
Copy link
Copy Markdown
Collaborator

@446564 446564 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no issues here

@446564
Copy link
Copy Markdown
Collaborator

446564 commented Apr 14, 2026

Looks like we aren't going to be getting rid of this, but perhaps changing the way we do it.

from @zjs81:

I disagree. Realistically we should just do something like this

Prefixes = a1,a2,a1
If (getprefix).count() > 1{
Show red();
}

Then on click we get the repeaters lazily
That way if that entry is in the list more than once we mark it red we can cache that
So this pr could just fix it
This is still a useful signal because duplicate prefixes can impact dm messages
So we can just do this more efficiently instead of removing it
We could even build a frozen collection if dart supports that

@446564 446564 closed this Apr 14, 2026
@ericszimmermann
Copy link
Copy Markdown
Contributor Author

ericszimmermann commented Apr 14, 2026

Where is this quote from, because I seem to lack some of the context. He has a path from something? Or a selection of prefixes to mark red?

My point is, that if you have enough contacts, every possible prefix will have at least two matches, therefore just making the whole map red. With this implementation you can not even pair them up. If you have 4 repeaters, two with b7 and two with a3, all four will just show red. You can not distinguish wish is the alternative to the other, you would have to filter for the prefix, to get this information (another function, much more usefull for this).

Can there be given a usecase of when and how this function can be used?

Sincerely Eric

PS: I have of now 6 Repeaters on the Companion, which I interact with, the rest of the 350 fields are auto filled with contacts. And about 1097 Repeaters in the discovery list with further 233 old (autodeleted) contacts. This amount to about 4 Repeaters to every possible prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants