fix: make gelocation work reliably

Closes #249
This commit is contained in:
Jovan Krunić
2026-10-07 14:30:10 +02:00
parent c843e435a4
commit b476aeebe4
9 changed files with 986 additions and 94 deletions
+41
View File
@@ -0,0 +1,41 @@
/*
* Copyright (C) 2026 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
export interface URLOpenListenerEvent {
url: string;
}
export interface AppInfo {
name: string;
id: string;
build: string;
version: string;
}
export interface PluginListenerHandle {
remove: () => Promise<void>;
}
export class AppMock {
addListener<T>(_eventName: string, _listener: (event: T) => void): Promise<PluginListenerHandle> {
return Promise.resolve({remove: () => Promise.resolve()});
}
getInfo(): Promise<AppInfo> {
return Promise.resolve({name: 'StApps', id: 'de.anyschool.app', build: '1', version: '1.2.3'});
}
}
export const App = new AppMock();