Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f447e1ecad | |||
| ee9098b4f1 | |||
| f378329da3 | |||
| 0caec11826 |
@@ -13,6 +13,8 @@ example, mobile devices with limited storage available, wishing to access a sync
|
||||
|
||||
This project is based on [syncthing-java][3], a java implementation of Syncthing protocols.
|
||||
|
||||
[<img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" height="80">](https://play.google.com/store/apps/details?id=net.syncthing.lite)
|
||||
|
||||
## Building
|
||||
|
||||
The project uses a standard Android build, and requires the Android SDK. The easiest option is if
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@ android {
|
||||
applicationId "net.syncthing.lite"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 25
|
||||
versionCode 2
|
||||
versionName "0.1"
|
||||
versionCode 3
|
||||
versionName "0.1.1"
|
||||
multiDexEnabled true
|
||||
}
|
||||
sourceSets {
|
||||
|
||||
@@ -89,14 +89,12 @@ abstract class SyncthingActivity : AppCompatActivity() {
|
||||
}
|
||||
})
|
||||
|
||||
//trigger update if last was more than 10mins ago
|
||||
val lastUpdateMillis = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.getLong(UpdateIndexTask.LAST_INDEX_UPDATE_TS_PREF, -1)
|
||||
val lastUpdate =
|
||||
if (lastUpdateMillis < 0) null
|
||||
else Date(lastUpdateMillis)
|
||||
//trigger update if last was more than 10mins ago
|
||||
if (lastUpdate == null || Date().time - lastUpdate.time > 10 * 60 * 1000) {
|
||||
Log.d(TAG, "trigger index update, last was " + lastUpdate!!)
|
||||
val lastUpdateTimeAgo = Date().time - lastUpdateMillis
|
||||
if (lastUpdateMillis == -1L || lastUpdateTimeAgo > 10 * 60 * 1000) {
|
||||
Log.d(TAG, "trigger index update, last was " + Date(lastUpdateMillis))
|
||||
UpdateIndexTask(context, libraryHandler!!.syncthingClient!!).updateIndex()
|
||||
}
|
||||
onLibraryLoaded()
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Reference in New Issue
Block a user