mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 09:52:49 +08:00
chore: disable rules in oxlint (#9154)
This commit is contained in:
@@ -86,10 +86,14 @@ framework.impl(ValidatorProvider, {
|
||||
});
|
||||
framework.impl(VirtualKeyboardProvider, {
|
||||
addEventListener: (event, callback) => {
|
||||
Keyboard.addListener(event as any, callback as any);
|
||||
Keyboard.addListener(event as any, callback as any).catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
},
|
||||
removeAllListeners: () => {
|
||||
Keyboard.removeAllListeners();
|
||||
Keyboard.removeAllListeners().catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
},
|
||||
});
|
||||
framework.impl(NavigationGestureProvider, {
|
||||
@@ -145,6 +149,8 @@ CapacitorApp.addListener('appUrlOpen', ({ url }) => {
|
||||
.catch(console.error);
|
||||
}
|
||||
}
|
||||
}).catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
|
||||
export function App() {
|
||||
|
||||
@@ -115,7 +115,7 @@ const convertBody = async (body: unknown, contentType: string) => {
|
||||
};
|
||||
function base64ToUint8Array(base64: string) {
|
||||
const binaryString = atob(base64);
|
||||
const binaryArray = binaryString.split('').map(function (char) {
|
||||
const binaryArray = [...binaryString].map(function (char) {
|
||||
return char.charCodeAt(0);
|
||||
});
|
||||
return new Uint8Array(binaryArray);
|
||||
|
||||
@@ -13,7 +13,7 @@ class NavigatorVirtualKeyboard implements VirtualKeyboard {
|
||||
|
||||
private readonly _overlaysContent = false;
|
||||
|
||||
private _listeners = new Map<
|
||||
private readonly _listeners = new Map<
|
||||
string,
|
||||
Set<{
|
||||
cb: VirtualKeyboardCallback;
|
||||
@@ -53,11 +53,17 @@ class NavigatorVirtualKeyboard implements VirtualKeyboard {
|
||||
};
|
||||
|
||||
constructor() {
|
||||
this._bindListener();
|
||||
this._bindListener().catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this._capacitorListenerHandles.forEach(handle => handle.remove());
|
||||
this._capacitorListenerHandles.forEach(handle => {
|
||||
handle.remove().catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
get boundingRect(): DOMRect {
|
||||
@@ -75,11 +81,15 @@ class NavigatorVirtualKeyboard implements VirtualKeyboard {
|
||||
}
|
||||
|
||||
hide() {
|
||||
Keyboard.hide();
|
||||
Keyboard.hide().catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
}
|
||||
|
||||
show() {
|
||||
Keyboard.show();
|
||||
Keyboard.show().catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
}
|
||||
|
||||
ongeometrychange: ((this: VirtualKeyboard, ev: Event) => any) | null = null;
|
||||
|
||||
Reference in New Issue
Block a user