airbnb / DeepLinkDispatch

A simple, annotation-based library for making deep link handling better on Android
http://nerds.airbnb.com/deeplinkdispatch/
4.37k stars 409 forks source link

Compare result fix #359

Closed novachevskyi closed 1 year ago

novachevskyi commented 1 year ago

In the lib description it was stated that module registration affects the conflict resolution order: If they are not defined in the same module the one defined in the registry listed first in DeeplinkDelegate will be matched.. In fact that’s not true. When conflict and duplicate was found here then sorting is performed based on comparable here. The logic is broken because it is described that

// Found multiple matches. Sort matches by concreteness: // No variable element > containing placeholders > are a configurable path segment But in fact we have the list sorted in the opposite way. It looks like the logic here sets the wrong value and -1 should be flipped to 1 to work as expected.