1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-29 15:51:17 +00:00

Poll faster on "modern" devices

This commit is contained in:
Catfriend1 2019-03-06 01:18:00 +01:00
parent 044404e9f0
commit 0f135c1ed2

View file

@ -110,9 +110,14 @@ public class Constants {
public static final int PERM_REQ_ACCESS_COARSE_LOCATION = 999; // for issue #999 public static final int PERM_REQ_ACCESS_COARSE_LOCATION = 999; // for issue #999
/** /**
* Interval in ms at which the GUI is updated (eg {@link com.nutomic.syncthingandroid.fragments.DrawerFragment}). * Interval in ms at which RestAPI is polled.
* As a rule of thumb: Poll faster on "modern" devices.
*/ */
public static final long GUI_UPDATE_INTERVAL = TimeUnit.SECONDS.toMillis(5); public static final long GUI_UPDATE_INTERVAL = TimeUnit.SECONDS.toMillis(
(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
? 3
: 5
);
/** /**
* Directory where config is exported to and imported from. * Directory where config is exported to and imported from.