mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 10:54:36 -06:00
[Lab] Fix full sync buttons.
This commit is contained in:
parent
9535f53563
commit
158b69a8d3
@ -62,6 +62,7 @@ class LabPageFragment : LazyFragment(), CoroutineScope {
|
|||||||
b.last10unseen.isVisible = false
|
b.last10unseen.isVisible = false
|
||||||
b.fullSync.isVisible = false
|
b.fullSync.isVisible = false
|
||||||
b.clearProfile.isVisible = false
|
b.clearProfile.isVisible = false
|
||||||
|
b.clearEndpointTimers.isVisible = false
|
||||||
b.rodo.isVisible = false
|
b.rodo.isVisible = false
|
||||||
b.removeHomework.isVisible = false
|
b.removeHomework.isVisible = false
|
||||||
b.unarchive.isVisible = false
|
b.unarchive.isVisible = false
|
||||||
@ -82,15 +83,19 @@ class LabPageFragment : LazyFragment(), CoroutineScope {
|
|||||||
app.db.teacherDao().query(SimpleSQLiteQuery("UPDATE teachers SET teacherSurname = \"\" WHERE profileId = ${App.profileId}"))
|
app.db.teacherDao().query(SimpleSQLiteQuery("UPDATE teachers SET teacherSurname = \"\" WHERE profileId = ${App.profileId}"))
|
||||||
}
|
}
|
||||||
|
|
||||||
b.fullSync.onClick {
|
b.fullSync.onClick {
|
||||||
app.db.query(SimpleSQLiteQuery("UPDATE profiles SET empty = 1 WHERE profileId = ${App.profileId}"))
|
app.profile.empty = true
|
||||||
app.db.query(SimpleSQLiteQuery("DELETE FROM endpointTimers WHERE profileId = ${App.profileId}"))
|
app.profileSave()
|
||||||
}
|
}
|
||||||
|
|
||||||
b.clearProfile.onClick {
|
b.clearProfile.onClick {
|
||||||
ProfileRemoveDialog(activity, App.profileId, "FAKE", noProfileRemoval = true).show()
|
ProfileRemoveDialog(activity, App.profileId, "FAKE", noProfileRemoval = true).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
b.clearEndpointTimers.onClick {
|
||||||
|
app.db.endpointTimerDao().clear(app.profileId)
|
||||||
|
}
|
||||||
|
|
||||||
b.removeHomework.onClick {
|
b.removeHomework.onClick {
|
||||||
app.db.eventDao().getRawNow("UPDATE events SET homeworkBody = NULL WHERE profileId = ${App.profileId}")
|
app.db.eventDao().getRawNow("UPDATE events SET homeworkBody = NULL WHERE profileId = ${App.profileId}")
|
||||||
}
|
}
|
||||||
|
@ -75,10 +75,17 @@
|
|||||||
android:id="@+id/clearProfile"
|
android:id="@+id/clearProfile"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="24dp"
|
|
||||||
android:text="Clear all profile data"
|
android:text="Clear all profile data"
|
||||||
android:textAllCaps="false" />
|
android:textAllCaps="false" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/clearEndpointTimers"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:text="Clear endpoint timers (force full sync)"
|
||||||
|
android:textAllCaps="false" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/rodo"
|
android:id="@+id/rodo"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
Reference in New Issue
Block a user