Add dao methods to set drawer order

pull/1020/head
Alex Baker 4 years ago
parent 034bc6e3a0
commit 0350c8f861

@ -248,6 +248,9 @@ abstract class CaldavDao {
@Query("UPDATE caldav_lists SET cdl_order = $NO_ORDER")
abstract fun resetOrders()
@Query("UPDATE caldav_lists SET cdl_order = :order WHERE cdl_id = :id")
abstract fun setOrder(id: Long, order: Int)
fun setupLocalAccount(context: Context): CaldavAccount {
val account = getLocalAccount()
getLocalList(context, account)

@ -31,4 +31,7 @@ interface FilterDao {
@Query("UPDATE filters SET f_order = $NO_ORDER")
fun resetOrders()
@Query("UPDATE filters SET f_order = :order WHERE _id = :id")
fun setOrder(id: Long, order: Int)
}

@ -67,4 +67,7 @@ interface GoogleTaskListDao {
@Query("UPDATE google_task_lists SET gtl_remote_order = $NO_ORDER")
fun resetOrders()
@Query("UPDATE google_task_lists SET gtl_remote_order = :order WHERE gtl_id = :id")
fun setOrder(id: Long, order: Int)
}

@ -113,4 +113,7 @@ interface LocationDao {
@Query("UPDATE places SET place_order = $NO_ORDER")
fun resetOrders()
@Query("UPDATE places SET place_order = :order WHERE place_id = :id")
fun setOrder(id: Long, order: Int)
}

@ -152,4 +152,7 @@ abstract class TagDataDao {
@Query("UPDATE tagdata SET td_order = $NO_ORDER")
abstract fun resetOrders()
@Query("UPDATE tagdata SET td_order = :order WHERE _id = :id")
abstract fun setOrder(id: Long, order: Int)
}
Loading…
Cancel
Save