forked from github/szkolny
[Hotfix] Fix merge problems and migration 96 crashing.
This commit is contained in:
parent
ca3e6f7fc9
commit
fd62653d79
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
package pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.data.hebe
|
package pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.data.hebe
|
||||||
|
|
||||||
import pl.szczodrzynski.edziennik.DAY
|
|
||||||
import pl.szczodrzynski.edziennik.data.api.VULCAN_HEBE_ENDPOINT_TEACHERS
|
import pl.szczodrzynski.edziennik.data.api.VULCAN_HEBE_ENDPOINT_TEACHERS
|
||||||
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.DataVulcan
|
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.DataVulcan
|
||||||
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.ENDPOINT_VULCAN_HEBE_TEACHERS
|
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.ENDPOINT_VULCAN_HEBE_TEACHERS
|
||||||
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.data.VulcanHebe
|
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.data.VulcanHebe
|
||||||
import pl.szczodrzynski.edziennik.getString
|
import pl.szczodrzynski.edziennik.ext.DAY
|
||||||
|
import pl.szczodrzynski.edziennik.ext.getString
|
||||||
|
|
||||||
class VulcanHebeTeachers(
|
class VulcanHebeTeachers(
|
||||||
override val data: DataVulcan,
|
override val data: DataVulcan,
|
||||||
|
@ -10,6 +10,6 @@ import androidx.sqlite.db.SupportSQLiteDatabase
|
|||||||
class Migration96 : Migration(95, 96) {
|
class Migration96 : Migration(95, 96) {
|
||||||
override fun migrate(database: SupportSQLiteDatabase) {
|
override fun migrate(database: SupportSQLiteDatabase) {
|
||||||
// teachers - associated subjects list
|
// teachers - associated subjects list
|
||||||
database.execSQL("ALTER TABLE teachers ADD COLUMN teacherSubjects TEXT NOT NULL;")
|
database.execSQL("ALTER TABLE teachers ADD COLUMN teacherSubjects TEXT NOT NULL DEFAULT '[]';")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ class TeachersListFragment : Fragment(), CoroutineScope {
|
|||||||
|
|
||||||
val adapter = TeachersAdapter(activity)
|
val adapter = TeachersAdapter(activity)
|
||||||
|
|
||||||
app.db.teacherDao().getAllTeachers(App.profileId).observe(this@TeachersListFragment, Observer { items ->
|
app.db.teacherDao().getAllTeachers(App.profileId).observe(viewLifecycleOwner, Observer { items ->
|
||||||
if (!isAdded) return@Observer
|
if (!isAdded) return@Observer
|
||||||
|
|
||||||
// load & configure the adapter
|
// load & configure the adapter
|
||||||
|
Loading…
Reference in New Issue
Block a user