Add a prompt to launch Element X on mobile
This shows a bottom sheet on mobile asking the user whether they want to open the call in Element X, as soon as the page is loaded.
This commit is contained in:
@@ -94,6 +94,22 @@ interface UrlParams {
|
||||
password: string | null;
|
||||
}
|
||||
|
||||
export function editFragmentQuery(
|
||||
hash: string,
|
||||
edit: (params: URLSearchParams) => URLSearchParams
|
||||
): string {
|
||||
const fragmentQueryStart = hash.indexOf("?");
|
||||
const fragmentParams = edit(
|
||||
new URLSearchParams(
|
||||
fragmentQueryStart === -1 ? "" : hash.substring(fragmentQueryStart)
|
||||
)
|
||||
);
|
||||
return `${hash.substring(
|
||||
0,
|
||||
fragmentQueryStart
|
||||
)}?${fragmentParams.toString()}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the app parameters for the current URL.
|
||||
* @param ignoreRoomAlias If true, does not try to parse a room alias from the URL
|
||||
|
||||
Reference in New Issue
Block a user