iOS: Resolves #5705 (partially): Ping joplinapp.org domain instead of Google when doing the WiFi connection check

This commit is contained in:
Laurent Cozic
2021-11-29 12:51:11 +00:00
parent 2fd8f39293
commit 06ce4adc20
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -476,7 +476,7 @@ async function initialize(dispatch: Function) {
if (Setting.value('env') == 'prod') {
await db.open({ name: 'joplin.sqlite' });
} else {
await db.open({ name: 'joplin-107.sqlite' });
await db.open({ name: 'joplin-1.sqlite' });
// await db.clearForTesting();
}
@@ -729,6 +729,11 @@ class AppComponent extends React.Component {
});
try {
NetInfo.configure({
reachabilityUrl: 'https://joplinapp.org/connection_check/',
reachabilityTest: async (response) => response.status === 200,
});
// This will be called right after adding the event listener
// so there's no need to check netinfo on startup
this.unsubscribeNetInfoHandler_ = NetInfo.addEventListener(({ type, details }) => {
+1
View File
@@ -0,0 +1 @@
This page is used by default on the Joplin iOS app to perform the WiFi connection check. More info at https://joplinapp.org/privacy/