forked from github/wulkanowy-mirror
Fix grade stats loading issues (#266)
This commit is contained in:
parent
1b7db4bfbb
commit
4f0021919c
@ -72,7 +72,7 @@ play {
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation('com.github.wulkanowy:api:46f09bdf34') { exclude module: "threetenbp" }
|
||||
implementation('com.github.wulkanowy:api:ea81799e98') { exclude module: "threetenbp" }
|
||||
|
||||
implementation "androidx.legacy:legacy-support-v4:1.0.0"
|
||||
implementation "androidx.appcompat:appcompat:1.0.2"
|
||||
|
@ -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)
|
||||
|
@ -56,7 +56,9 @@
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="5dp">
|
||||
android:paddingTop="5dp"
|
||||
android:visibility="invisible"
|
||||
tools:visibility="visible">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/gradeStatisticsTypePartial"
|
||||
@ -82,10 +84,10 @@
|
||||
android:id="@+id/gradeStatisticsChart"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:minHeight="400dp"
|
||||
android:visibility="gone"
|
||||
android:layout_margin="10dp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ProgressBar
|
||||
|
@ -60,7 +60,7 @@
|
||||
<string name="grade_summary_calculated_average">Obliczona średnia</string>
|
||||
<string name="grade_summary_final_average">Końcowa średnia</string>
|
||||
<string name="grade_menu_summary">Podsumowanie</string>
|
||||
<string name="grade_menu_statistics">Oceny klasy</string>
|
||||
<string name="grade_menu_statistics">Klasa</string>
|
||||
<string name="grade_menu_read">Oznacz jako przeczytane</string>
|
||||
<string name="grade_statistics_partial">Oceny cząstkowe</string>
|
||||
<string name="grade_statistics_semester">Oceny semestralne</string>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<string name="grade_summary_calculated_average">Calculated average</string>
|
||||
<string name="grade_summary_final_average">Final average</string>
|
||||
<string name="grade_menu_summary">Summary</string>
|
||||
<string name="grade_menu_statistics">Class grades</string>
|
||||
<string name="grade_menu_statistics">Class</string>
|
||||
<string name="grade_menu_read">Mark as read</string>
|
||||
<string name="grade_statistics_partial">Partial grades</string>
|
||||
<string name="grade_statistics_semester">Semester grades</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user