diff --git a/android b/android index 891edcc0a3..58f2e79ef0 160000 --- a/android +++ b/android @@ -1 +1 @@ -Subproject commit 891edcc0a354e55fd96e84bea93741a78f5c3dde +Subproject commit 58f2e79ef0494ce39208007fe272cf86761172b0 diff --git a/src/UI/Base/Searchbar.svelte b/src/UI/Base/Searchbar.svelte index 6f4d401ea2..79c23e76ef 100644 --- a/src/UI/Base/Searchbar.svelte +++ b/src/UI/Base/Searchbar.svelte @@ -64,20 +64,18 @@ use:set_placeholder={placeholder} use:ariaLabel={placeholder} /> - {#if !isAndroid} - - {#if $value.length > 0} - { + + {#if !$isAndroid $value.length > 0} + { value.set("") e.preventDefault() }} - color="var(--button-background)" - class="mr-3 h-6 w-6 cursor-pointer" - /> - {:else} -
- {/if} + color="var(--button-background)" + class="mr-3 h-6 w-6 cursor-pointer" + /> + {:else} +
{/if} diff --git a/src/UI/BigComponents/ThemeButton.svelte b/src/UI/BigComponents/ThemeButton.svelte index af3742c3be..6d4148e02f 100644 --- a/src/UI/BigComponents/ThemeButton.svelte +++ b/src/UI/BigComponents/ThemeButton.svelte @@ -5,6 +5,7 @@ import Tr from "../Base/Tr.svelte" import Translations from "../i18n/Translations" import Marker from "../Map/Marker.svelte" + import { AndroidPolyfill } from "../../Logic/Web/AndroidPolyfill" export let theme: MinimalThemeInformation & { isOfficial?: boolean } let isCustom: boolean = theme.id.startsWith("https://") || theme.id.startsWith("http://") @@ -16,11 +17,12 @@ ) $: description = Translations.T(theme.shortDescription) - function createUrl( + function createUrlDirect( layout: { id: string; definition?: string }, isCustom: boolean, + isAndroid: boolean, state?: { layoutToUse?: { id } } - ): Store { + ): string { if (layout === undefined) { return undefined } @@ -43,9 +45,10 @@ let linkPrefix = `${path}/${layout.id.toLowerCase()}.html?` if ( + !isAndroid && ( location.hostname === "localhost" || location.hostname === "127.0.0.1" || - location.port === "1234" + location.port === "1234") ) { // Redirect to 'theme.html?layout=* instead of 'layout.html'. This is probably a debug run, where the routing does not work linkPrefix = `${path}/theme.html?layout=${layout.id}&` @@ -60,10 +63,10 @@ hash = "#" + btoa(JSON.stringify(layout.definition)) } - return new ImmutableStore(`${linkPrefix}${hash}`) + return `${linkPrefix}${hash}` } - let href = createUrl(theme, isCustom, state) + let href = AndroidPolyfill.inAndroid.map(isAndroid => createUrlDirect(theme, isCustom, isAndroid, state))