Call <Finder> on intent
This commit is contained in:
1 parent
dec79c9c2d
commit
0af58ccb4f
2 files changed
+5
-10
No files matched your search
@@ -42,7 +42,7 @@ import { debounce } from 'lodash';
|
||||
import { AndroidFullScreen } from '@awesome-cordova-plugins/android-full-screen';
|
||||
import Account from '../account';
|
||||
import { Overlays } from '../overlays/Overlays';
|
||||
import Finder from '../finder';
|
||||
import Finder, { findLocation } from '../finder';
|
||||
|
||||
const [getState, setState] = createSignal({
|
||||
lon: 0,
|
||||
@@ -92,13 +92,8 @@ const Map: Component = () => {
|
||||
const url = new URL(intent.data);
|
||||
const q = url.search;
|
||||
const [, lat, lon] = q.match(/q=([0-9.-]+),([0-9.-]+)/);
|
||||
const zoom = Math.max(16, getState().zoom);
|
||||
console.log({ caller: 'Intent receiver', intent, url, lat, lon, zoom });
|
||||
navigate(
|
||||
`/map/${getState().provider}/${lon}/${lat}/${zoom}/${
|
||||
getState().rotation
|
||||
}#mark=fromIntent`
|
||||
);
|
||||
console.log({ caller: 'Intent receiver', intent, url, lat, lon });
|
||||
findLocation(navigate, [lon, lat]);
|
||||
});
|
||||
} else {
|
||||
console.log({
|
||||
@@ -297,7 +292,6 @@ const Map: Component = () => {
|
||||
<Account />
|
||||
<AllGpxes map={getMap} />
|
||||
<Infos />
|
||||
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user