mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 10:54:36 -06:00
[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
|
||||
|
||||
import pl.szczodrzynski.edziennik.DAY
|
||||
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.ENDPOINT_VULCAN_HEBE_TEACHERS
|
||||
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(
|
||||
override val data: DataVulcan,
|
||||
|
@ -10,6 +10,6 @@ import androidx.sqlite.db.SupportSQLiteDatabase
|
||||
class Migration96 : Migration(95, 96) {
|
||||
override fun migrate(database: SupportSQLiteDatabase) {
|
||||
// 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)
|
||||
|
||||
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
|
||||
|
||||
// load & configure the adapter
|
||||
|
Loading…
Reference in New Issue
Block a user