feat: implement device verification flow with new UI components and protocol handling
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.rosetta.messenger.database
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Entity
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.PrimaryKey
|
||||
import androidx.room.Query
|
||||
|
||||
@Entity(tableName = "accounts_sync_times")
|
||||
data class AccountSyncTimeEntity(
|
||||
@PrimaryKey @ColumnInfo(name = "account") val account: String,
|
||||
@ColumnInfo(name = "last_sync") val lastSync: Long
|
||||
)
|
||||
|
||||
@Dao
|
||||
interface SyncTimeDao {
|
||||
@Query("SELECT last_sync FROM accounts_sync_times WHERE account = :account LIMIT 1")
|
||||
suspend fun getLastSync(account: String): Long?
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun upsert(entity: AccountSyncTimeEntity)
|
||||
}
|
||||
Reference in New Issue
Block a user