Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/improsocial/impro
An extensible Bluesky client for web impro.social
Something went wrong. Try again.
JavaScript
12345678910111213141516171819202122232425262728import { registerPlugin, Capacitor } from "/js/lib/capacitor.js";
// IOS only for now, because I couldn't get a custom capacitor plugin to work
function sendToNative(data) { if (window.webkit && window.webkit.messageHandlers.appHandler) { window.webkit.messageHandlers.appHandler.postMessage(data); }}
export async function enableNativeRefresh() { if (Capacitor.isNativePlatform()) { sendToNative({ type: "refresh", enabled: true }); }}
export async function disableNativeRefresh() { if (Capacitor.isNativePlatform()) { sendToNative({ type: "refresh", enabled: false }); }}
export async function dispatchNativeRefreshEnded() { if (Capacitor.isNativePlatform()) { sendToNative({ type: "refresh-ended" }); }}