Reload page on android on launch to fix nodejs load issue
This commit is contained in:
@@ -7,8 +7,8 @@ android {
|
||||
applicationId "us.materialio.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 49
|
||||
versionName "1.5.8"
|
||||
versionCode 50
|
||||
versionName "1.5.9"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Materialious",
|
||||
"version": "1.5.8",
|
||||
"version": "1.5.9",
|
||||
"description": "Modern material design for Invidious.",
|
||||
"author": {
|
||||
"name": "Ward Pearce",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "materialious",
|
||||
"version": "1.5.8",
|
||||
"version": "1.5.9",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { goto } from "$app/navigation";
|
||||
import { Capacitor } from "@capacitor/core";
|
||||
import { NodeJS } from 'capacitor-nodejs';
|
||||
|
||||
if (Capacitor.getPlatform() === 'android') {
|
||||
const originalFetch = window.fetch;
|
||||
@@ -52,8 +51,5 @@ if (Capacitor.getPlatform() === 'android') {
|
||||
return originalXhrOpen.apply(this, args);
|
||||
};
|
||||
|
||||
// Must reload page after patches
|
||||
NodeJS.whenReady().then(() => {
|
||||
goto('/', { replaceState: true });
|
||||
});
|
||||
setTimeout(() => goto('/', { replaceState: true }), 300);
|
||||
}
|
||||
|
||||
@@ -108,15 +108,16 @@ attemptClickPlayButton();
|
||||
InAppBrowser.addListener('closeEvent', closeListener);
|
||||
InAppBrowser.addListener('urlChangeEvent', urlChangeListener);
|
||||
|
||||
setTimeout(() => {
|
||||
setTimeout(async () => {
|
||||
reject(new Error('Timeout trying to pull Po tokens'));
|
||||
InAppBrowser.removeAllListeners();
|
||||
}, 30000);
|
||||
await InAppBrowser.removeAllListeners();
|
||||
await InAppBrowser.close();
|
||||
}, 60000);
|
||||
|
||||
InAppBrowser.openWebView({
|
||||
url: 'https://www.youtube.com/embed/jNQXAC9IVRw',
|
||||
title: 'Pulling po tokens (This may take a moment)',
|
||||
headers: headers
|
||||
headers: headers,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import json
|
||||
import os
|
||||
import re
|
||||
|
||||
LATEST_VERSION = "1.5.8"
|
||||
LATEST_VERSION = "1.5.9"
|
||||
WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")
|
||||
|
||||
ROOT_PACKAGE = os.path.join(WORKING_DIR, "package.json")
|
||||
|
||||
Reference in New Issue
Block a user