422e8f0f0f
- Fix SYNC_COMPLETED showing ↑0 ↓0 ✗0 when only deletions occurred: add ✕N for deleted files to the summary message (↑N ↓N ✕N ✗N format) - Fix PairDetail Activity section showing raw "SYNC_STARTED" enum names and "remote" as a plain subtitle: replace dot-based EventRow with the same polished icon-bubble rows as the global Log tab - Extract shared SyncEventRow composable + iconAndTint/label helpers to ui/shared/SyncEventRow.kt; both LogScreen and PairDetailScreen now use it - Add Files tab (4th tab between Log and Accounts): folder browser showing all synced files per pair, grouped by subdirectory, with file-type icons, size, last-synced date, and a summary header (N files, total size) - Add SyncFileStateDao.observeForPair() reactive Flow query for Files tab - Completely redesign app icon: near-black radial gradient background with three bold directional arrows in an S-pattern (coral → silver → teal), each with gradient fills and tip-glow dots — entirely different from the typical circular sync-arrow style - Bump version to 1.0.22 (build 23) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
1.1 KiB
Kotlin
30 lines
1.1 KiB
Kotlin
package com.syncflow.data.db
|
|
|
|
import androidx.room.*
|
|
import com.syncflow.data.db.entities.SyncFileStateEntity
|
|
import kotlinx.coroutines.flow.Flow
|
|
|
|
@Dao
|
|
interface SyncFileStateDao {
|
|
@Query("SELECT * FROM sync_file_states WHERE syncPairId = :pairId ORDER BY relativePath ASC")
|
|
fun observeForPair(pairId: Long): Flow<List<SyncFileStateEntity>>
|
|
|
|
@Query("SELECT * FROM sync_file_states WHERE syncPairId = :pairId")
|
|
suspend fun getForPair(pairId: Long): List<SyncFileStateEntity>
|
|
|
|
@Query("SELECT * FROM sync_file_states WHERE syncPairId = :pairId AND relativePath = :path")
|
|
suspend fun get(pairId: Long, path: String): SyncFileStateEntity?
|
|
|
|
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
|
suspend fun upsert(entity: SyncFileStateEntity)
|
|
|
|
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
|
suspend fun upsertAll(entities: List<SyncFileStateEntity>)
|
|
|
|
@Query("DELETE FROM sync_file_states WHERE syncPairId = :pairId AND relativePath = :path")
|
|
suspend fun delete(pairId: Long, path: String)
|
|
|
|
@Query("DELETE FROM sync_file_states WHERE syncPairId = :pairId")
|
|
suspend fun deleteForPair(pairId: Long)
|
|
}
|