select a server on tap and refuse to delete the active one

This commit is contained in:
austinried
2026-10-04 00:30:03 +00:00
parent a77ce6984e
commit 46dc6bda0e
6 changed files with 23 additions and 29 deletions
@@ -20,9 +20,6 @@ interface SourcesDao {
@Query("SELECT * FROM sources WHERE id = :id")
suspend fun sourceOnce(id: Long): Source?
@Query("SELECT COUNT(*) FROM sources")
suspend fun sourceCount(): Int
@Query("SELECT id FROM sources WHERE isActive = 1 LIMIT 1")
fun activeSourceId(): Flow<Long?>
@@ -32,9 +29,6 @@ interface SourcesDao {
@Query("SELECT id FROM sources WHERE isActive = 1 LIMIT 1")
suspend fun activeSourceIdOnce(): Long?
@Query("SELECT id FROM sources ORDER BY createdAt LIMIT 1")
suspend fun firstSourceId(): Long?
@Insert
suspend fun insertSource(source: Source): Long