Loading app/src/main/java/at/bitfire/davdroid/DavService.kt +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ class DavService: android.app.Service() { val homeSetDao = db.homeSetDao() val collectionDao = db.collectionDao() val service = db.serviceDao().getById(serviceId) ?: throw IllegalArgumentException("Service not found") val service = db.serviceDao().get(serviceId) ?: throw IllegalArgumentException("Service not found") val account = Account(service.accountName, getString(R.string.account_type)) val homeSets = homeSetDao.getByService(serviceId) Loading app/src/main/java/at/bitfire/davdroid/model/CollectionDao.kt +0 −3 Original line number Diff line number Diff line Loading @@ -22,9 +22,6 @@ interface CollectionDao { @Query("SELECT * FROM collection WHERE serviceId=:serviceId AND sync ORDER BY displayName, url") fun getByServiceAndSync(serviceId: Long): List<Collection> @Query("SELECT * FROM collection WHERE serviceId=:serviceId AND type=:type ORDER BY displayName, url") fun observeByServiceAndType(serviceId: Long, type: String): LiveData<List<Collection>> @Query("SELECT COUNT(*) FROM collection WHERE serviceId=:serviceId AND sync") fun observeHasSyncByService(serviceId: Long): LiveData<Boolean> Loading app/src/main/java/at/bitfire/davdroid/model/HomeSetDao.kt +0 −3 Original line number Diff line number Diff line Loading @@ -9,9 +9,6 @@ interface HomeSetDao { @Query("SELECT * FROM homeset WHERE serviceId=:serviceId") fun getByService(serviceId: Long): List<HomeSet> @Query("SELECT COUNT(*) FROM homeset WHERE serviceId=:serviceId") fun observeAvailableByService(serviceId: Long): LiveData<Boolean> @Insert(onConflict = OnConflictStrategy.REPLACE) fun insertOrReplace(homeSet: HomeSet): Long Loading app/src/main/java/at/bitfire/davdroid/model/ServiceDao.kt +1 −7 Original line number Diff line number Diff line Loading @@ -9,12 +9,6 @@ import androidx.room.Query @Dao interface ServiceDao { @Query("SELECT * FROM service WHERE accountName=:accountName") fun getByAccount(accountName: String): List<Service> @Query("SELECT * FROM service WHERE accountName=:accountName") fun observeByAccount(accountName: String): LiveData<List<Service>> @Query("SELECT * FROM service WHERE accountName=:accountName AND type=:type") fun getByAccountAndType(accountName: String, type: String): Service? Loading @@ -22,7 +16,7 @@ interface ServiceDao { fun getIdByAccountAndType(accountName: String, type: String): Long? @Query("SELECT * FROM service WHERE id=:id") fun getById(id: Long): Service? fun get(id: Long): Service? @Query("SELECT * FROM service WHERE type=:type") fun getByType(type: String): List<Service> Loading app/src/main/java/at/bitfire/davdroid/ui/CreateCalendarActivity.kt +2 −1 Original line number Diff line number Diff line Loading @@ -151,9 +151,10 @@ class CreateCalendarActivity: AppCompatActivity(), ColorPickerDialogListener { } if (ok) { val frag = CreateCollectionFragment() args.putParcelable(CreateCollectionFragment.ARG_ACCOUNT, model.account) args.putString(CreateCollectionFragment.ARG_TYPE, Collection.TYPE_CALENDAR) val frag = CreateCollectionFragment() frag.arguments = args frag.show(supportFragmentManager, null) } } Loading Loading
app/src/main/java/at/bitfire/davdroid/DavService.kt +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ class DavService: android.app.Service() { val homeSetDao = db.homeSetDao() val collectionDao = db.collectionDao() val service = db.serviceDao().getById(serviceId) ?: throw IllegalArgumentException("Service not found") val service = db.serviceDao().get(serviceId) ?: throw IllegalArgumentException("Service not found") val account = Account(service.accountName, getString(R.string.account_type)) val homeSets = homeSetDao.getByService(serviceId) Loading
app/src/main/java/at/bitfire/davdroid/model/CollectionDao.kt +0 −3 Original line number Diff line number Diff line Loading @@ -22,9 +22,6 @@ interface CollectionDao { @Query("SELECT * FROM collection WHERE serviceId=:serviceId AND sync ORDER BY displayName, url") fun getByServiceAndSync(serviceId: Long): List<Collection> @Query("SELECT * FROM collection WHERE serviceId=:serviceId AND type=:type ORDER BY displayName, url") fun observeByServiceAndType(serviceId: Long, type: String): LiveData<List<Collection>> @Query("SELECT COUNT(*) FROM collection WHERE serviceId=:serviceId AND sync") fun observeHasSyncByService(serviceId: Long): LiveData<Boolean> Loading
app/src/main/java/at/bitfire/davdroid/model/HomeSetDao.kt +0 −3 Original line number Diff line number Diff line Loading @@ -9,9 +9,6 @@ interface HomeSetDao { @Query("SELECT * FROM homeset WHERE serviceId=:serviceId") fun getByService(serviceId: Long): List<HomeSet> @Query("SELECT COUNT(*) FROM homeset WHERE serviceId=:serviceId") fun observeAvailableByService(serviceId: Long): LiveData<Boolean> @Insert(onConflict = OnConflictStrategy.REPLACE) fun insertOrReplace(homeSet: HomeSet): Long Loading
app/src/main/java/at/bitfire/davdroid/model/ServiceDao.kt +1 −7 Original line number Diff line number Diff line Loading @@ -9,12 +9,6 @@ import androidx.room.Query @Dao interface ServiceDao { @Query("SELECT * FROM service WHERE accountName=:accountName") fun getByAccount(accountName: String): List<Service> @Query("SELECT * FROM service WHERE accountName=:accountName") fun observeByAccount(accountName: String): LiveData<List<Service>> @Query("SELECT * FROM service WHERE accountName=:accountName AND type=:type") fun getByAccountAndType(accountName: String, type: String): Service? Loading @@ -22,7 +16,7 @@ interface ServiceDao { fun getIdByAccountAndType(accountName: String, type: String): Long? @Query("SELECT * FROM service WHERE id=:id") fun getById(id: Long): Service? fun get(id: Long): Service? @Query("SELECT * FROM service WHERE type=:type") fun getByType(type: String): List<Service> Loading
app/src/main/java/at/bitfire/davdroid/ui/CreateCalendarActivity.kt +2 −1 Original line number Diff line number Diff line Loading @@ -151,9 +151,10 @@ class CreateCalendarActivity: AppCompatActivity(), ColorPickerDialogListener { } if (ok) { val frag = CreateCollectionFragment() args.putParcelable(CreateCollectionFragment.ARG_ACCOUNT, model.account) args.putString(CreateCollectionFragment.ARG_TYPE, Collection.TYPE_CALENDAR) val frag = CreateCollectionFragment() frag.arguments = args frag.show(supportFragmentManager, null) } } Loading