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:
parent
2fd8f39293
commit
06ce4adc20
@ -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 }) => {
|
||||||
|
1
readme/connection_check.md
Normal file
1
readme/connection_check.md
Normal 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/
|
Loading…
Reference in New Issue
Block a user