forked from github/wulkanowy-mirror
Don't copy teacher from previous lesson with changes if new one… (#622)
This commit is contained in:

committed by
Rafał Borcz

parent
2e7d2b66f8
commit
9d27723f30
@ -36,7 +36,7 @@ class TimetableRepository @Inject constructor(
|
||||
old.singleOrNull { new.start == it.start }?.let { old ->
|
||||
return@map new.copy(
|
||||
room = if (new.room.isEmpty()) old.room else new.room,
|
||||
teacher = if (new.teacher.isEmpty() && !new.changes) old.teacher else new.teacher
|
||||
teacher = if (new.teacher.isEmpty() && !new.changes && !old.changes) old.teacher else new.teacher
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user