forked from github/wulkanowy-mirror
Fix grade stats loading issues (#266)
This commit is contained in:

committed by
Rafał Borcz

parent
1b7db4bfbb
commit
4f0021919c
@ -26,7 +26,7 @@ class MessageRemote @Inject constructor(private val api: Api) {
|
||||
sender = it.sender.orEmpty(),
|
||||
senderId = it.senderId ?: 0,
|
||||
recipient = it.recipient.orEmpty(),
|
||||
recipientId = it.recipientId,
|
||||
recipientId = 0,
|
||||
subject = it.subject.trim(),
|
||||
date = it.date?.toLocalDateTime() ?: now(),
|
||||
folderId = it.folderId,
|
||||
@ -50,7 +50,7 @@ class MessageRemote @Inject constructor(private val api: Api) {
|
||||
recipients = recipients.map {
|
||||
ApiRecipient(
|
||||
id = it.realId,
|
||||
realName = it.realName,
|
||||
name = it.realName,
|
||||
loginId = it.loginId,
|
||||
reportingUnitId = it.unitId,
|
||||
role = it.role,
|
||||
|
@ -17,12 +17,12 @@ class RecipientRemote @Inject constructor(private val api: Api) {
|
||||
Recipient(
|
||||
studentId = api.studentId,
|
||||
name = it.name,
|
||||
realName = it.realName,
|
||||
realName = it.name,
|
||||
realId = it.id,
|
||||
hash = it.hash,
|
||||
loginId = it.loginId,
|
||||
role = it.role,
|
||||
unitId = it.reportingUnitId
|
||||
unitId = it.reportingUnitId ?: 0
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -130,6 +130,7 @@ class GradeStatisticsFragment : BaseSessionFragment(), GradeStatisticsView, Grad
|
||||
|
||||
override fun showSubjects(show: Boolean) {
|
||||
gradeStatisticsSubjectsContainer.visibility = if (show) View.VISIBLE else View.INVISIBLE
|
||||
gradeStatisticsTypeSwitch.visibility = if (show) View.VISIBLE else View.INVISIBLE
|
||||
}
|
||||
|
||||
override fun clearView() {
|
||||
|
@ -74,6 +74,7 @@ class GradeStatisticsPresenter @Inject constructor(
|
||||
|
||||
fun onTypeChange(isSemester: Boolean) {
|
||||
Timber.i("Select attendance stats semester: $isSemester")
|
||||
disposable.clear()
|
||||
view?.run {
|
||||
showContent(false)
|
||||
showProgress(true)
|
||||
|
Reference in New Issue
Block a user