the sync process is a bit complex since it has several conditions, I'll try to explain it as clear as possible
We have 2 ways of synchronization: automatic and manual.
When you open an activity that can generate offline data it will always be synchronized if you are online. So opening a wiki in online will always try to synchronize that wiki (not all the wikis). If there is nothing to sync or the offline data is synchronized, the synchronization is successful.
Besides, each type of activity has an automatic sync process that runs every certain time (usually 10 minutes). Let's use wiki as example. When the wiki sync process runs, it will synchronize all the wikis that have offline data and haven't been synchronized in the last 5 minutes. This is to decrease the data usage of the app, since the server might be down and we don't want to send the data too often. This means that an activity could take up to 15 minutes to be synchronized in the worst case scenario. Example of the worst case scenario:
- Time = 0. The wiki automatic sync process runs. Nothing to sync.
- Time = 5 minutes and 1 second. The user opens a wiki with no offline data, so the synchronization is successful.
- Time = 5 minutes and a few seconds. The user generates some offline data for that wiki.
- Time = 10minutes. The wiki automatic sync process runs again. The wiki has offline data, but it has been synchronized in less than 5 minutes (step 2), so it isn't synchronized again.
- Time = 20 minutes. The wiki automatic sync process runs again. Now the wiki is synchronized.
If an automatic sync runs when the app is offline, it will stop running until the app is online again. When the app goes back online, all the automatic sync processes that were stopped will be run immediately, synchronizing the activities with offline data that weren't synchronized in the last 5 minutes. Example:
- Forum sync process runs. App is online, so it is executed.
- App goes offline.
- Wiki sync process runs. App is offline, so it stops being executed.
- App goes online.
- Wiki sync process is executed since it was stopped. Forum isn't executed yet because it wasn't stopped, it will be executed after 10 minutes from step 1.
Finally, in App Settings > Synchronization you'll see a setting "Allow sync only when on Wi-Fi". If this is enabled and you're using a 3G/4G connection, the automatic sync proccesses won't be run, their execution will be delayed for 10 minutes until you use a Wi-Fi connection.
Please notice that the automatic sync processes will only run if the app is alive, so if you close the app the data won't be synchronized until you start it again. Also, in iOS the app needs to be in foreground (active) in order to execute them, if you put it in background (minimize it) the processes won't be executed until you put the app in foreground again.
When you do some action in offline and it is stored, you should see a message telling you that there is some data to be synchronized inside the activity. Performing a Pull To Refresh in that screen will synchronize the data of that activity, but not the rest of activities. You can also synchronize the data by opening the context menu (in the top right) and clicking "Synchronize". So if you perform a Pull To Refresh in a certain wiki, only that wiki will be synchronized. Performing a Pull To Refresh outside of the activity (e.g. in the Topic section) will do nothing.
If you go to App Settings > Synchronization you'll see a list of the sites you have stored in the app. Clicking the refresh button next to a site is going to execute all the automatic sync processes right now, so all the activities with offline data that haven't been synchronized in the last 5 minutes will be synchronized.
That's it, I hope I explained myself. Please let me know if you have any doubt about this.