mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-27 16:33:38 +00:00
[android] Expected "Show on map" search button behaviour.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
bbb28107b8
commit
1151f0fb75
@@ -190,6 +190,12 @@ public enum SearchEngine implements SearchListener, MapSearchListener,
|
||||
nativeShowResult(index);
|
||||
}
|
||||
|
||||
@MainThread
|
||||
public void updateViewportWithLastResults()
|
||||
{
|
||||
nativeUpdateViewportWithLastResults();
|
||||
}
|
||||
|
||||
public void initialize()
|
||||
{
|
||||
nativeInit();
|
||||
@@ -224,4 +230,6 @@ public enum SearchEngine implements SearchListener, MapSearchListener,
|
||||
private static native void nativeCancelEverywhereSearch();
|
||||
|
||||
private static native void nativeCancelAllSearches();
|
||||
|
||||
private static native void nativeUpdateViewportWithLastResults();
|
||||
}
|
||||
|
||||
@@ -430,6 +430,8 @@ public class SearchFragment extends BaseMwmFragment implements SearchListener, C
|
||||
|
||||
void showAllResultsOnMap()
|
||||
{
|
||||
SearchEngine.INSTANCE.updateViewportWithLastResults();
|
||||
|
||||
// The previous search should be cancelled before the new one is started, since previous search
|
||||
// results are no longer needed.
|
||||
SearchEngine.INSTANCE.cancel();
|
||||
|
||||
Reference in New Issue
Block a user