1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

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

View File

@ -476,7 +476,7 @@ async function initialize(dispatch: Function) {
if (Setting.value('env') == 'prod') { if (Setting.value('env') == 'prod') {
await db.open({ name: 'joplin.sqlite' }); await db.open({ name: 'joplin.sqlite' });
} else { } else {
await db.open({ name: 'joplin-107.sqlite' }); await db.open({ name: 'joplin-1.sqlite' });
// await db.clearForTesting(); // await db.clearForTesting();
} }
@ -729,6 +729,11 @@ class AppComponent extends React.Component {
}); });
try { 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 // This will be called right after adding the event listener
// so there's no need to check netinfo on startup // so there's no need to check netinfo on startup
this.unsubscribeNetInfoHandler_ = NetInfo.addEventListener(({ type, details }) => { this.unsubscribeNetInfoHandler_ = NetInfo.addEventListener(({ type, details }) => {

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/