mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2025-01-31 17:42:44 +01:00
parent
c6c7357623
commit
b97b94ae29
@ -11,10 +11,10 @@ cache:
|
|||||||
- $HOME/.gradle/caches/
|
- $HOME/.gradle/caches/
|
||||||
- $HOME/.gradle/wrapper/
|
- $HOME/.gradle/wrapper/
|
||||||
|
|
||||||
#branches:
|
branches:
|
||||||
# only:
|
only:
|
||||||
# - master
|
- master
|
||||||
# - 0.7.x
|
- 0.7.x
|
||||||
|
|
||||||
android:
|
android:
|
||||||
licenses:
|
licenses:
|
||||||
|
@ -25,8 +25,8 @@ interface StudentDao {
|
|||||||
@Query("SELECT * FROM Students")
|
@Query("SELECT * FROM Students")
|
||||||
fun loadAll(): Maybe<List<Student>>
|
fun loadAll(): Maybe<List<Student>>
|
||||||
|
|
||||||
@Query("UPDATE Students SET is_current = 1 WHERE student_id = :studentId")
|
@Query("UPDATE Students SET is_current = 1 WHERE id = :id")
|
||||||
fun updateCurrent(studentId: Int)
|
fun updateCurrent(id: Long)
|
||||||
|
|
||||||
@Query("UPDATE Students SET is_current = 0")
|
@Query("UPDATE Students SET is_current = 0")
|
||||||
fun resetCurrent()
|
fun resetCurrent()
|
||||||
|
@ -35,7 +35,7 @@ class StudentLocal @Inject constructor(
|
|||||||
return Completable.fromCallable {
|
return Completable.fromCallable {
|
||||||
studentDb.run {
|
studentDb.run {
|
||||||
resetCurrent()
|
resetCurrent()
|
||||||
updateCurrent(student.studentId)
|
updateCurrent(student.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user