diff --git a/.kotlin/sessions/kotlin-compiler-1705345088425659687.salive b/.kotlin/sessions/kotlin-compiler-5606529168844077151.salive similarity index 100% rename from .kotlin/sessions/kotlin-compiler-1705345088425659687.salive rename to .kotlin/sessions/kotlin-compiler-5606529168844077151.salive diff --git a/app/src/main/kotlin/com/syncflow/SyncFlowApp.kt b/app/src/main/kotlin/com/syncflow/SyncFlowApp.kt index 8275229..ca6aca2 100644 --- a/app/src/main/kotlin/com/syncflow/SyncFlowApp.kt +++ b/app/src/main/kotlin/com/syncflow/SyncFlowApp.kt @@ -3,7 +3,13 @@ package com.syncflow import android.app.Application import androidx.hilt.work.HiltWorkerFactory import androidx.work.Configuration +import com.syncflow.data.db.SyncPairDao +import com.syncflow.domain.model.ScheduleType +import com.syncflow.worker.FileWatchService import dagger.hilt.android.HiltAndroidApp +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch import timber.log.Timber import javax.inject.Inject @@ -11,10 +17,16 @@ import javax.inject.Inject class SyncFlowApp : Application(), Configuration.Provider { @Inject lateinit var workerFactory: HiltWorkerFactory + @Inject lateinit var syncPairDao: SyncPairDao override fun onCreate() { super.onCreate() if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree()) + // Start file watcher on every app launch for any existing ON_CHANGE pairs + CoroutineScope(Dispatchers.IO).launch { + val hasOnChange = syncPairDao.getEnabled().any { it.scheduleType == ScheduleType.ON_CHANGE } + if (hasOnChange) FileWatchService.start(this@SyncFlowApp) + } } override val workManagerConfiguration: Configuration diff --git a/app/src/main/kotlin/com/syncflow/ui/settings/SettingsScreen.kt b/app/src/main/kotlin/com/syncflow/ui/settings/SettingsScreen.kt index 8ec7e52..24a7655 100644 --- a/app/src/main/kotlin/com/syncflow/ui/settings/SettingsScreen.kt +++ b/app/src/main/kotlin/com/syncflow/ui/settings/SettingsScreen.kt @@ -137,11 +137,17 @@ fun SettingsScreen( ) { Column(modifier = Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(4.dp)) { Text( - "SyncFlow v${com.syncflow.BuildConfig.VERSION_NAME} — Free, no subscription.", - style = MaterialTheme.typography.bodySmall, + "SyncFlow", + style = MaterialTheme.typography.titleSmall, ) Text( - "Open source. No ads. No tracking.", + "Version ${com.syncflow.BuildConfig.VERSION_NAME} (build ${com.syncflow.BuildConfig.VERSION_CODE})", + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + Spacer(Modifier.height(2.dp)) + Text( + "Free, no subscription. No ads. No tracking.", style = MaterialTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) diff --git a/releases/latest/SyncFlow.apk b/releases/latest/SyncFlow.apk index 4407b52..43d9f7e 100644 Binary files a/releases/latest/SyncFlow.apk and b/releases/latest/SyncFlow.apk differ diff --git a/version.properties b/version.properties index 26fa8e9..6146b77 100644 --- a/version.properties +++ b/version.properties @@ -1,2 +1,2 @@ -VERSION_NAME=1.0.17 -VERSION_CODE=18 +VERSION_NAME=1.0.18 +VERSION_CODE=19