fix(android): fix plugin build.rs API and route remaining fetch through Tauri HTTP

This commit is contained in:
Erwan Leboucher committed 2026-07-18 14:30:27 +02:00
1 parent 719f987bcc
commit 0208d8a2cb
5 files changed
+16 -1

No files matched your search

@@ -1,3 +1,14 @@
const COMMANDS: &[&str] = &[
"list_distributors",
"set_distributor",
"register_for_push_notifications",
"unregister_for_push_notifications",
"set_token",
];
fn main() {
tauri_plugin::build()
tauri_plugin::Builder::new(COMMANDS)
.android_path("android")
.try_build()
.expect("Failed to build Tauri plugin");
}
@@ -22,6 +22,7 @@ import { useMatrixClient } from '$hooks/useMatrixClient';
import { useRecentEmoji } from '$hooks/useRecentEmoji';
import { isUserId, mxcUrlToHttp } from '$utils/matrix';
import { editableActiveElement, targetFromEvent } from '$utils/dom';
import { fetch } from '$utils/fetch';
import type { UseAsyncSearchOptions } from '$hooks/useAsyncSearch';
import { useAsyncSearch } from '$hooks/useAsyncSearch';
import { useDebounce } from '$hooks/useDebounce';
@@ -6,6 +6,7 @@ import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback';
import { useSetting } from '$state/hooks/settings';
import { settingsAtom } from '$state/settings';
import { encodeBlurHash } from '$utils/blurHash';
import { fetch } from '$utils/fetch';
import { Attachment, AttachmentBox, AttachmentHeader } from '../message/attachment';
import { Image } from '../media';
import { UrlPreview } from './UrlPreview';
+1
View File
@@ -1,5 +1,6 @@
import { isTauri } from '@tauri-apps/api/core';
import { fetchMediaBlob, type MediaTransportOptions } from './mediaTransport';
import { fetch } from './fetch';
export const targetFromEvent = (evt: Event, selector: string): Element | undefined => {
const targets = evt.composedPath() as Element[];
+1
View File
@@ -12,6 +12,7 @@ import {
KnownMembership,
SyncState,
} from '$types/matrix-sdk';
import { fetch } from '$utils/fetch';
import { clearNavToActivePathStore } from '$state/navToActivePath';
import type { Session, SessionStoreName } from '$state/sessions';