forked from github/wulkanowy-mirror
Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
c69bb2ef71 | |||
9cb4754132 | |||
5ba8289c87 | |||
258782c648 | |||
c568bc1515 | |||
da668f93cf | |||
037dbd792f | |||
7ec7afed87 | |||
bea50e6db5 | |||
6a00e75816 | |||
957adaf6ee | |||
827fb33eeb | |||
19c96ee83f | |||
5a7f52c773 | |||
dddeff802f | |||
91f6310892 | |||
0389642543 | |||
8528e0beff | |||
e665a8f18b | |||
6d5acbad2c | |||
7217d0f753 | |||
16a5d88dfb | |||
646a46727f | |||
f5e9197f98 | |||
b47f26684b | |||
3a03b5f1c6 |
2
.github/workflows/deploy-store.yml
vendored
2
.github/workflows/deploy-store.yml
vendored
@ -71,4 +71,4 @@ jobs:
|
|||||||
PLAY_KEY_ALIAS: ${{ secrets.PLAY_KEY_ALIAS }}
|
PLAY_KEY_ALIAS: ${{ secrets.PLAY_KEY_ALIAS }}
|
||||||
PLAY_KEY_PASSWORD: ${{ secrets.PLAY_KEY_PASSWORD }}
|
PLAY_KEY_PASSWORD: ${{ secrets.PLAY_KEY_PASSWORD }}
|
||||||
PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }}
|
PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }}
|
||||||
run: ./gradlew assembleHmsRelease --stacktrace && ./gradlew publishHuaweiAppGalleryHmsRelease --stacktrace
|
run: ./gradlew bundleHmsRelease --stacktrace && ./gradlew publishHuaweiAppGalleryHmsRelease --stacktrace
|
||||||
|
@ -21,8 +21,8 @@ android {
|
|||||||
testApplicationId "io.github.tests.wulkanowy"
|
testApplicationId "io.github.tests.wulkanowy"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 94
|
versionCode 96
|
||||||
versionName "1.2.1"
|
versionName "1.2.3"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
@ -141,14 +141,14 @@ huaweiPublish {
|
|||||||
instances {
|
instances {
|
||||||
hmsRelease {
|
hmsRelease {
|
||||||
credentialsPath = "$rootDir/app/src/release/agconnect-credentials.json"
|
credentialsPath = "$rootDir/app/src/release/agconnect-credentials.json"
|
||||||
buildFormat = "apk"
|
buildFormat = "aab"
|
||||||
deployType = "draft"
|
deployType = "draft"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
work_manager = "2.5.0"
|
work_manager = "2.6.0"
|
||||||
android_hilt = "1.0.0"
|
android_hilt = "1.0.0"
|
||||||
room = "2.3.0"
|
room = "2.3.0"
|
||||||
chucker = "3.5.2"
|
chucker = "3.5.2"
|
||||||
@ -157,7 +157,7 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "io.github.wulkanowy:sdk:1.2.1"
|
implementation "io.github.wulkanowy:sdk:1.2.3"
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ dependencies {
|
|||||||
implementation "androidx.constraintlayout:constraintlayout:2.1.0"
|
implementation "androidx.constraintlayout:constraintlayout:2.1.0"
|
||||||
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"
|
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"
|
||||||
implementation "com.google.android.material:material:1.4.0"
|
implementation "com.google.android.material:material:1.4.0"
|
||||||
implementation "com.github.wulkanowy:material-chips-input:2.2.0"
|
implementation "com.github.wulkanowy:material-chips-input:2.3.1"
|
||||||
implementation "com.github.PhilJay:MPAndroidChart:v3.1.0"
|
implementation "com.github.PhilJay:MPAndroidChart:v3.1.0"
|
||||||
implementation 'com.github.lopspower:CircularImageView:4.2.0'
|
implementation 'com.github.lopspower:CircularImageView:4.2.0'
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ dependencies {
|
|||||||
implementation 'me.xdrop:fuzzywuzzy:1.3.1'
|
implementation 'me.xdrop:fuzzywuzzy:1.3.1'
|
||||||
implementation 'com.fredporciuncula:flow-preferences:1.5.0'
|
implementation 'com.fredporciuncula:flow-preferences:1.5.0'
|
||||||
|
|
||||||
playImplementation platform('com.google.firebase:firebase-bom:28.4.0')
|
playImplementation platform('com.google.firebase:firebase-bom:28.4.1')
|
||||||
playImplementation 'com.google.firebase:firebase-analytics-ktx'
|
playImplementation 'com.google.firebase:firebase-analytics-ktx'
|
||||||
playImplementation 'com.google.firebase:firebase-messaging:'
|
playImplementation 'com.google.firebase:firebase-messaging:'
|
||||||
playImplementation 'com.google.firebase:firebase-crashlytics:'
|
playImplementation 'com.google.firebase:firebase-crashlytics:'
|
||||||
|
@ -119,11 +119,9 @@
|
|||||||
<receiver android:name=".services.alarm.TimetableNotificationReceiver" />
|
<receiver android:name=".services.alarm.TimetableNotificationReceiver" />
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.work.impl.WorkManagerInitializer"
|
android:name="androidx.startup.InitializationProvider"
|
||||||
android:authorities="${applicationId}.workmanager-init"
|
android:authorities="${applicationId}.androidx-startup"
|
||||||
android:exported="false"
|
|
||||||
tools:node="remove" />
|
tools:node="remove" />
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="${applicationId}.fileprovider"
|
android:authorities="${applicationId}.fileprovider"
|
||||||
|
@ -14,33 +14,39 @@ import javax.inject.Singleton
|
|||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
@Dao
|
@Dao
|
||||||
interface StudentDao {
|
abstract class StudentDao {
|
||||||
|
|
||||||
@Insert(onConflict = ABORT)
|
@Insert(onConflict = ABORT)
|
||||||
suspend fun insertAll(student: List<Student>): List<Long>
|
abstract suspend fun insertAll(student: List<Student>): List<Long>
|
||||||
|
|
||||||
@Delete
|
@Delete
|
||||||
suspend fun delete(student: Student)
|
abstract suspend fun delete(student: Student)
|
||||||
|
|
||||||
@Update(entity = Student::class)
|
@Update(entity = Student::class)
|
||||||
suspend fun update(studentNickAndAvatar: StudentNickAndAvatar)
|
abstract suspend fun update(studentNickAndAvatar: StudentNickAndAvatar)
|
||||||
|
|
||||||
@Query("SELECT * FROM Students WHERE is_current = 1")
|
@Query("SELECT * FROM Students WHERE is_current = 1")
|
||||||
suspend fun loadCurrent(): Student?
|
abstract suspend fun loadCurrent(): Student?
|
||||||
|
|
||||||
@Query("SELECT * FROM Students WHERE id = :id")
|
@Query("SELECT * FROM Students WHERE id = :id")
|
||||||
suspend fun loadById(id: Long): Student?
|
abstract suspend fun loadById(id: Long): Student?
|
||||||
|
|
||||||
@Query("SELECT * FROM Students")
|
@Query("SELECT * FROM Students")
|
||||||
suspend fun loadAll(): List<Student>
|
abstract suspend fun loadAll(): List<Student>
|
||||||
|
|
||||||
@Transaction
|
@Transaction
|
||||||
@Query("SELECT * FROM Students")
|
@Query("SELECT * FROM Students")
|
||||||
suspend fun loadStudentsWithSemesters(): List<StudentWithSemesters>
|
abstract suspend fun loadStudentsWithSemesters(): List<StudentWithSemesters>
|
||||||
|
|
||||||
@Query("UPDATE Students SET is_current = 1 WHERE id = :id")
|
@Query("UPDATE Students SET is_current = 1 WHERE id = :id")
|
||||||
suspend fun updateCurrent(id: Long)
|
abstract suspend fun updateCurrent(id: Long)
|
||||||
|
|
||||||
@Query("UPDATE Students SET is_current = 0")
|
@Query("UPDATE Students SET is_current = 0")
|
||||||
suspend fun resetCurrent()
|
abstract suspend fun resetCurrent()
|
||||||
|
|
||||||
|
@Transaction
|
||||||
|
open suspend fun switchCurrent(id: Long) {
|
||||||
|
resetCurrent()
|
||||||
|
updateCurrent(id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package io.github.wulkanowy.data.repositories
|
package io.github.wulkanowy.data.repositories
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import androidx.room.withTransaction
|
||||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||||
|
import io.github.wulkanowy.data.db.AppDatabase
|
||||||
import io.github.wulkanowy.data.db.dao.SemesterDao
|
import io.github.wulkanowy.data.db.dao.SemesterDao
|
||||||
import io.github.wulkanowy.data.db.dao.StudentDao
|
import io.github.wulkanowy.data.db.dao.StudentDao
|
||||||
import io.github.wulkanowy.data.db.entities.Student
|
import io.github.wulkanowy.data.db.entities.Student
|
||||||
@ -25,7 +27,8 @@ class StudentRepository @Inject constructor(
|
|||||||
private val studentDb: StudentDao,
|
private val studentDb: StudentDao,
|
||||||
private val semesterDb: SemesterDao,
|
private val semesterDb: SemesterDao,
|
||||||
private val sdk: Sdk,
|
private val sdk: Sdk,
|
||||||
private val appInfo: AppInfo
|
private val appInfo: AppInfo,
|
||||||
|
private val appDatabase: AppDatabase
|
||||||
) {
|
) {
|
||||||
|
|
||||||
suspend fun isStudentSaved() = getSavedStudents(false).isNotEmpty()
|
suspend fun isStudentSaved() = getSavedStudents(false).isNotEmpty()
|
||||||
@ -92,7 +95,7 @@ class StudentRepository @Inject constructor(
|
|||||||
return student
|
return student
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun saveStudents(studentsWithSemesters: List<StudentWithSemesters>): List<Long> {
|
suspend fun saveStudents(studentsWithSemesters: List<StudentWithSemesters>) {
|
||||||
val semesters = studentsWithSemesters.flatMap { it.semesters }
|
val semesters = studentsWithSemesters.flatMap { it.semesters }
|
||||||
val students = studentsWithSemesters.map { it.student }
|
val students = studentsWithSemesters.map { it.student }
|
||||||
.map {
|
.map {
|
||||||
@ -104,16 +107,21 @@ class StudentRepository @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.mapIndexed { index, student ->
|
||||||
|
if (index == 0) {
|
||||||
|
student.copy(isCurrent = true).apply { avatarColor = student.avatarColor }
|
||||||
|
} else student
|
||||||
|
}
|
||||||
|
|
||||||
semesterDb.insertSemesters(semesters)
|
appDatabase.withTransaction {
|
||||||
return studentDb.insertAll(students)
|
studentDb.resetCurrent()
|
||||||
|
semesterDb.insertSemesters(semesters)
|
||||||
|
studentDb.insertAll(students)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun switchStudent(studentWithSemesters: StudentWithSemesters) {
|
suspend fun switchStudent(studentWithSemesters: StudentWithSemesters) {
|
||||||
with(studentDb) {
|
studentDb.switchCurrent(studentWithSemesters.student.id)
|
||||||
resetCurrent()
|
|
||||||
updateCurrent(studentWithSemesters.student.id)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun logoutStudent(student: Student) = studentDb.delete(student)
|
suspend fun logoutStudent(student: Student) = studentDb.delete(student)
|
||||||
|
@ -121,10 +121,14 @@ class AccountDetailsFragment :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun popView() {
|
override fun popViewToMain() {
|
||||||
(requireActivity() as MainActivity).popView(2)
|
(requireActivity() as MainActivity).popView(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun popViewToAccounts() {
|
||||||
|
(requireActivity() as MainActivity).popView(1)
|
||||||
|
}
|
||||||
|
|
||||||
override fun recreateMainView() {
|
override fun recreateMainView() {
|
||||||
requireActivity().recreate()
|
requireActivity().recreate()
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ class AccountDetailsPresenter @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.afterLoading {
|
}.afterLoading {
|
||||||
view?.popView()
|
view?.popViewToMain()
|
||||||
}.launch("switch")
|
}.launch("switch")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,11 +152,14 @@ class AccountDetailsPresenter @Inject constructor(
|
|||||||
syncManager.stopSyncWorker()
|
syncManager.stopSyncWorker()
|
||||||
openClearLoginView()
|
openClearLoginView()
|
||||||
}
|
}
|
||||||
studentWithSemesters!!.student.isCurrent -> {
|
studentWithSemesters?.student?.isCurrent == true -> {
|
||||||
Timber.i("Logout result: Logout student and switch to another")
|
Timber.i("Logout result: Logout student and switch to another")
|
||||||
recreateMainView()
|
recreateMainView()
|
||||||
}
|
}
|
||||||
else -> Timber.i("Logout result: Logout student")
|
else -> {
|
||||||
|
Timber.i("Logout result: Logout student")
|
||||||
|
recreateMainView()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Status.ERROR -> {
|
Status.ERROR -> {
|
||||||
@ -165,7 +168,11 @@ class AccountDetailsPresenter @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.afterLoading {
|
}.afterLoading {
|
||||||
view?.popView()
|
if (studentWithSemesters?.student?.isCurrent == true) {
|
||||||
|
view?.popViewToMain()
|
||||||
|
} else {
|
||||||
|
view?.popViewToAccounts()
|
||||||
|
}
|
||||||
}.launch("logout")
|
}.launch("logout")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,9 @@ interface AccountDetailsView : BaseView {
|
|||||||
|
|
||||||
fun showLogoutConfirmDialog()
|
fun showLogoutConfirmDialog()
|
||||||
|
|
||||||
fun popView()
|
fun popViewToMain()
|
||||||
|
|
||||||
|
fun popViewToAccounts()
|
||||||
|
|
||||||
fun recreateMainView()
|
fun recreateMainView()
|
||||||
|
|
||||||
|
@ -245,7 +245,9 @@ class AttendanceFragment : BaseFragment<FragmentAttendanceBinding>(R.layout.frag
|
|||||||
presenter.onDateSet(date.year, date.monthValue, date.dayOfMonth)
|
presenter.onDateSet(date.year, date.monthValue, date.dayOfMonth)
|
||||||
}
|
}
|
||||||
|
|
||||||
datePicker.show(this@AttendanceFragment.parentFragmentManager, null)
|
if (!parentFragmentManager.isStateSaved) {
|
||||||
|
datePicker.show(parentFragmentManager, null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showExcuseDialog() {
|
override fun showExcuseDialog() {
|
||||||
|
@ -152,6 +152,8 @@ class AttendancePresenter @Inject constructor(
|
|||||||
fun onExcuseDialogSubmit(reason: String) {
|
fun onExcuseDialogSubmit(reason: String) {
|
||||||
view?.finishActionMode()
|
view?.finishActionMode()
|
||||||
|
|
||||||
|
if (attendanceToExcuseList.isEmpty()) return
|
||||||
|
|
||||||
if (isVulcanExcusedFunctionEnabled) {
|
if (isVulcanExcusedFunctionEnabled) {
|
||||||
excuseAbsence(
|
excuseAbsence(
|
||||||
reason = reason.takeIf { it.isNotBlank() },
|
reason = reason.takeIf { it.isNotBlank() },
|
||||||
@ -234,6 +236,7 @@ class AttendancePresenter @Inject constructor(
|
|||||||
enableSwipe(true)
|
enableSwipe(true)
|
||||||
showRefresh(true)
|
showRefresh(true)
|
||||||
showProgress(false)
|
showProgress(false)
|
||||||
|
showErrorView(false)
|
||||||
showEmpty(filteredAttendance.isEmpty())
|
showEmpty(filteredAttendance.isEmpty())
|
||||||
showContent(filteredAttendance.isNotEmpty())
|
showContent(filteredAttendance.isNotEmpty())
|
||||||
updateData(filteredAttendance.sortedBy { item -> item.number })
|
updateData(filteredAttendance.sortedBy { item -> item.number })
|
||||||
|
@ -82,7 +82,13 @@ class AttendanceSummaryPresenter @Inject constructor(
|
|||||||
flowWithResourceIn {
|
flowWithResourceIn {
|
||||||
val student = studentRepository.getCurrentStudent()
|
val student = studentRepository.getCurrentStudent()
|
||||||
val semester = semesterRepository.getCurrentSemester(student)
|
val semester = semesterRepository.getCurrentSemester(student)
|
||||||
attendanceSummaryRepository.getAttendanceSummary(student, semester, subjectId, forceRefresh)
|
|
||||||
|
attendanceSummaryRepository.getAttendanceSummary(
|
||||||
|
student = student,
|
||||||
|
semester = semester,
|
||||||
|
subjectId = subjectId,
|
||||||
|
forceRefresh = forceRefresh
|
||||||
|
)
|
||||||
}.onEach {
|
}.onEach {
|
||||||
when (it.status) {
|
when (it.status) {
|
||||||
Status.LOADING -> {
|
Status.LOADING -> {
|
||||||
@ -92,6 +98,7 @@ class AttendanceSummaryPresenter @Inject constructor(
|
|||||||
showRefresh(true)
|
showRefresh(true)
|
||||||
showProgress(false)
|
showProgress(false)
|
||||||
showContent(true)
|
showContent(true)
|
||||||
|
showErrorView(false)
|
||||||
updateDataSet(sortItems(it.data))
|
updateDataSet(sortItems(it.data))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -99,6 +106,7 @@ class AttendanceSummaryPresenter @Inject constructor(
|
|||||||
Status.SUCCESS -> {
|
Status.SUCCESS -> {
|
||||||
Timber.i("Loading attendance summary result: Success")
|
Timber.i("Loading attendance summary result: Success")
|
||||||
view?.apply {
|
view?.apply {
|
||||||
|
showErrorView(false)
|
||||||
showEmpty(it.data!!.isEmpty())
|
showEmpty(it.data!!.isEmpty())
|
||||||
showContent(it.data.isNotEmpty())
|
showContent(it.data.isNotEmpty())
|
||||||
updateDataSet(sortItems(it.data))
|
updateDataSet(sortItems(it.data))
|
||||||
|
@ -14,6 +14,8 @@ class ConferenceAdapter @Inject constructor() :
|
|||||||
|
|
||||||
var items = emptyList<Conference>()
|
var items = emptyList<Conference>()
|
||||||
|
|
||||||
|
var onItemClickListener: (Conference) -> Unit = {}
|
||||||
|
|
||||||
override fun getItemCount() = items.size
|
override fun getItemCount() = items.size
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ItemViewHolder(
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ItemViewHolder(
|
||||||
@ -28,7 +30,10 @@ class ConferenceAdapter @Inject constructor() :
|
|||||||
conferenceItemTitle.text = item.title
|
conferenceItemTitle.text = item.title
|
||||||
conferenceItemSubject.text = item.subject
|
conferenceItemSubject.text = item.subject
|
||||||
conferenceItemContent.text = item.agenda
|
conferenceItemContent.text = item.agenda
|
||||||
conferenceItemContent.visibility = if (item.agenda.isBlank()) View.GONE else View.VISIBLE
|
conferenceItemContent.visibility =
|
||||||
|
if (item.agenda.isBlank()) View.GONE else View.VISIBLE
|
||||||
|
|
||||||
|
root.setOnClickListener { onItemClickListener(item) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,60 @@
|
|||||||
|
package io.github.wulkanowy.ui.modules.conference
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.core.view.isVisible
|
||||||
|
import androidx.fragment.app.DialogFragment
|
||||||
|
import io.github.wulkanowy.data.db.entities.Conference
|
||||||
|
import io.github.wulkanowy.databinding.DialogConferenceBinding
|
||||||
|
import io.github.wulkanowy.utils.lifecycleAwareVariable
|
||||||
|
import io.github.wulkanowy.utils.toFormattedString
|
||||||
|
|
||||||
|
class ConferenceDialog : DialogFragment() {
|
||||||
|
|
||||||
|
private var binding: DialogConferenceBinding by lifecycleAwareVariable()
|
||||||
|
|
||||||
|
private lateinit var conference: Conference
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
private const val ARGUMENT_KEY = "item"
|
||||||
|
|
||||||
|
fun newInstance(conference: Conference) = ConferenceDialog().apply {
|
||||||
|
arguments = Bundle().apply { putSerializable(ARGUMENT_KEY, conference) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
setStyle(STYLE_NO_TITLE, 0)
|
||||||
|
arguments?.let {
|
||||||
|
conference = it.getSerializable(ARGUMENT_KEY) as Conference
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
) = DialogConferenceBinding.inflate(inflater).also { binding = it }.root
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
with(binding) {
|
||||||
|
conferenceDialogClose.setOnClickListener { dismiss() }
|
||||||
|
|
||||||
|
conferenceDialogSubjectValue.text = conference.subject
|
||||||
|
conferenceDialogDateValue.text = conference.date.toFormattedString("dd.MM.yyyy HH:mm")
|
||||||
|
conferenceDialogHeaderValue.text = conference.title
|
||||||
|
conferenceDialogAgendaValue.text = conference.agenda
|
||||||
|
conferenceDialogPresentValue.text = conference.presentOnConference
|
||||||
|
conferenceDialogPresentValue.isVisible = conference.presentOnConference.isNotBlank()
|
||||||
|
conferenceDialogPresentTitle.isVisible = conference.presentOnConference.isNotBlank()
|
||||||
|
conferenceDialogAgendaValue.isVisible = conference.agenda.isNotBlank()
|
||||||
|
conferenceDialogAgendaTitle.isVisible = conference.agenda.isNotBlank()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -8,6 +8,7 @@ import io.github.wulkanowy.R
|
|||||||
import io.github.wulkanowy.data.db.entities.Conference
|
import io.github.wulkanowy.data.db.entities.Conference
|
||||||
import io.github.wulkanowy.databinding.FragmentConferenceBinding
|
import io.github.wulkanowy.databinding.FragmentConferenceBinding
|
||||||
import io.github.wulkanowy.ui.base.BaseFragment
|
import io.github.wulkanowy.ui.base.BaseFragment
|
||||||
|
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||||
import io.github.wulkanowy.ui.modules.main.MainView
|
import io.github.wulkanowy.ui.modules.main.MainView
|
||||||
import io.github.wulkanowy.ui.widgets.DividerItemDecoration
|
import io.github.wulkanowy.ui.widgets.DividerItemDecoration
|
||||||
import io.github.wulkanowy.utils.getThemeAttrColor
|
import io.github.wulkanowy.utils.getThemeAttrColor
|
||||||
@ -41,6 +42,8 @@ class ConferenceFragment : BaseFragment<FragmentConferenceBinding>(R.layout.frag
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun initView() {
|
override fun initView() {
|
||||||
|
conferencesAdapter.onItemClickListener = presenter::onItemSelected
|
||||||
|
|
||||||
with(binding.conferenceRecycler) {
|
with(binding.conferenceRecycler) {
|
||||||
layoutManager = LinearLayoutManager(context)
|
layoutManager = LinearLayoutManager(context)
|
||||||
adapter = conferencesAdapter
|
adapter = conferencesAdapter
|
||||||
@ -50,7 +53,11 @@ class ConferenceFragment : BaseFragment<FragmentConferenceBinding>(R.layout.frag
|
|||||||
with(binding) {
|
with(binding) {
|
||||||
conferenceSwipe.setOnRefreshListener(presenter::onSwipeRefresh)
|
conferenceSwipe.setOnRefreshListener(presenter::onSwipeRefresh)
|
||||||
conferenceSwipe.setColorSchemeColors(requireContext().getThemeAttrColor(R.attr.colorPrimary))
|
conferenceSwipe.setColorSchemeColors(requireContext().getThemeAttrColor(R.attr.colorPrimary))
|
||||||
conferenceSwipe.setProgressBackgroundColorSchemeColor(requireContext().getThemeAttrColor(R.attr.colorSwipeRefresh))
|
conferenceSwipe.setProgressBackgroundColorSchemeColor(
|
||||||
|
requireContext().getThemeAttrColor(
|
||||||
|
R.attr.colorSwipeRefresh
|
||||||
|
)
|
||||||
|
)
|
||||||
conferenceErrorRetry.setOnClickListener { presenter.onRetry() }
|
conferenceErrorRetry.setOnClickListener { presenter.onRetry() }
|
||||||
conferenceErrorDetails.setOnClickListener { presenter.onDetailsClick() }
|
conferenceErrorDetails.setOnClickListener { presenter.onDetailsClick() }
|
||||||
}
|
}
|
||||||
@ -98,6 +105,10 @@ class ConferenceFragment : BaseFragment<FragmentConferenceBinding>(R.layout.frag
|
|||||||
binding.conferenceRecycler.visibility = if (show) View.VISIBLE else View.GONE
|
binding.conferenceRecycler.visibility = if (show) View.VISIBLE else View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun openConferenceDialog(conference: Conference) {
|
||||||
|
(activity as? MainActivity)?.showDialogFragment(ConferenceDialog.newInstance(conference))
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
presenter.onDetachView()
|
presenter.onDetachView()
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package io.github.wulkanowy.ui.modules.conference
|
package io.github.wulkanowy.ui.modules.conference
|
||||||
|
|
||||||
import io.github.wulkanowy.data.Status
|
import io.github.wulkanowy.data.Status
|
||||||
|
import io.github.wulkanowy.data.db.entities.Conference
|
||||||
import io.github.wulkanowy.data.repositories.ConferenceRepository
|
import io.github.wulkanowy.data.repositories.ConferenceRepository
|
||||||
import io.github.wulkanowy.data.repositories.SemesterRepository
|
import io.github.wulkanowy.data.repositories.SemesterRepository
|
||||||
import io.github.wulkanowy.data.repositories.StudentRepository
|
import io.github.wulkanowy.data.repositories.StudentRepository
|
||||||
@ -43,6 +44,10 @@ class ConferencePresenter @Inject constructor(
|
|||||||
loadData(true)
|
loadData(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun onItemSelected(conference: Conference) {
|
||||||
|
view?.openConferenceDialog(conference)
|
||||||
|
}
|
||||||
|
|
||||||
fun onDetailsClick() {
|
fun onDetailsClick() {
|
||||||
view?.showErrorDetailsDialog(lastError)
|
view?.showErrorDetailsDialog(lastError)
|
||||||
}
|
}
|
||||||
|
@ -26,4 +26,6 @@ interface ConferenceView : BaseView {
|
|||||||
fun enableSwipe(enable: Boolean)
|
fun enableSwipe(enable: Boolean)
|
||||||
|
|
||||||
fun showContent(show: Boolean)
|
fun showContent(show: Boolean)
|
||||||
|
|
||||||
|
fun openConferenceDialog(conference: Conference)
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ import io.github.wulkanowy.utils.getThemeAttrColor
|
|||||||
import io.github.wulkanowy.utils.left
|
import io.github.wulkanowy.utils.left
|
||||||
import io.github.wulkanowy.utils.nickOrName
|
import io.github.wulkanowy.utils.nickOrName
|
||||||
import io.github.wulkanowy.utils.toFormattedString
|
import io.github.wulkanowy.utils.toFormattedString
|
||||||
|
import timber.log.Timber
|
||||||
import java.time.Duration
|
import java.time.Duration
|
||||||
import java.time.LocalDate
|
import java.time.LocalDate
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
@ -52,7 +53,7 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
|||||||
|
|
||||||
var onAttendanceTileClickListener: () -> Unit = {}
|
var onAttendanceTileClickListener: () -> Unit = {}
|
||||||
|
|
||||||
var onLessonsTileClickListener: () -> Unit = {}
|
var onLessonsTileClickListener: (LocalDate) -> Unit = {}
|
||||||
|
|
||||||
var onHomeworkTileClickListener: () -> Unit = {}
|
var onHomeworkTileClickListener: () -> Unit = {}
|
||||||
|
|
||||||
@ -170,6 +171,8 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
|||||||
val isLoading = item.isLoading
|
val isLoading = item.isLoading
|
||||||
val binding = horizontalGroupViewHolder.binding
|
val binding = horizontalGroupViewHolder.binding
|
||||||
val context = binding.root.context
|
val context = binding.root.context
|
||||||
|
val isLoadingVisible =
|
||||||
|
(isLoading && !item.isDataLoaded) || (isLoading && !item.isFullDataLoaded)
|
||||||
val attendanceColor = when {
|
val attendanceColor = when {
|
||||||
attendancePercentage == null || attendancePercentage == .0 -> {
|
attendancePercentage == null || attendancePercentage == .0 -> {
|
||||||
context.getThemeAttrColor(R.attr.colorOnSurface)
|
context.getThemeAttrColor(R.attr.colorOnSurface)
|
||||||
@ -199,13 +202,12 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
|||||||
context.getString(R.string.dashboard_horizontal_group_no_data)
|
context.getString(R.string.dashboard_horizontal_group_no_data)
|
||||||
} else luckyNumber?.toString()
|
} else luckyNumber?.toString()
|
||||||
|
|
||||||
dashboardHorizontalGroupItemInfoContainer.isVisible = error != null || isLoading
|
dashboardHorizontalGroupItemInfoContainer.isVisible = error != null || isLoadingVisible
|
||||||
dashboardHorizontalGroupItemInfoProgress.isVisible =
|
dashboardHorizontalGroupItemInfoProgress.isVisible = isLoadingVisible
|
||||||
(isLoading && !item.isDataLoaded) || (isLoading && !item.isFullDataLoaded)
|
|
||||||
dashboardHorizontalGroupItemInfoErrorText.isVisible = error != null
|
dashboardHorizontalGroupItemInfoErrorText.isVisible = error != null
|
||||||
|
|
||||||
with(dashboardHorizontalGroupItemLuckyContainer) {
|
with(dashboardHorizontalGroupItemLuckyContainer) {
|
||||||
isVisible = luckyNumber != null && luckyNumber != -1
|
isVisible = luckyNumber != null && luckyNumber != -1 && !isLoadingVisible
|
||||||
setOnClickListener { onLuckyNumberTileClickListener() }
|
setOnClickListener { onLuckyNumberTileClickListener() }
|
||||||
|
|
||||||
updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||||
@ -220,7 +222,8 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
|||||||
}
|
}
|
||||||
|
|
||||||
with(dashboardHorizontalGroupItemAttendanceContainer) {
|
with(dashboardHorizontalGroupItemAttendanceContainer) {
|
||||||
isVisible = attendancePercentage != null && attendancePercentage != -1.0
|
isVisible =
|
||||||
|
attendancePercentage != null && attendancePercentage != -1.0 && !isLoadingVisible
|
||||||
updateLayoutParams<ConstraintLayout.LayoutParams> {
|
updateLayoutParams<ConstraintLayout.LayoutParams> {
|
||||||
matchConstraintPercentWidth = when {
|
matchConstraintPercentWidth = when {
|
||||||
luckyNumber == null && unreadMessagesCount == null -> 1.0f
|
luckyNumber == null && unreadMessagesCount == null -> 1.0f
|
||||||
@ -232,7 +235,8 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
|||||||
}
|
}
|
||||||
|
|
||||||
with(dashboardHorizontalGroupItemMessageContainer) {
|
with(dashboardHorizontalGroupItemMessageContainer) {
|
||||||
isVisible = unreadMessagesCount != null && unreadMessagesCount != -1
|
isVisible =
|
||||||
|
unreadMessagesCount != null && unreadMessagesCount != -1 && !isLoadingVisible
|
||||||
setOnClickListener { onMessageTileClickListener() }
|
setOnClickListener { onMessageTileClickListener() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -271,10 +275,12 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
|||||||
val item = items[position] as DashboardItem.Lessons
|
val item = items[position] as DashboardItem.Lessons
|
||||||
val timetableFull = item.lessons
|
val timetableFull = item.lessons
|
||||||
val binding = lessonsViewHolder.binding
|
val binding = lessonsViewHolder.binding
|
||||||
|
var dateToNavigate = LocalDate.now()
|
||||||
|
|
||||||
fun updateLessonState() {
|
fun updateLessonState() {
|
||||||
val currentDateTime = LocalDateTime.now()
|
val currentDateTime = LocalDateTime.now()
|
||||||
val currentDate = LocalDate.now()
|
val currentDate = LocalDate.now()
|
||||||
|
val tomorrowDate = currentDate.plusDays(1)
|
||||||
|
|
||||||
val currentTimetable = timetableFull?.lessons
|
val currentTimetable = timetableFull?.lessons
|
||||||
.orEmpty()
|
.orEmpty()
|
||||||
@ -292,22 +298,27 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
|||||||
|
|
||||||
when {
|
when {
|
||||||
currentTimetable.isNotEmpty() -> {
|
currentTimetable.isNotEmpty() -> {
|
||||||
|
dateToNavigate = currentDate
|
||||||
updateLessonView(item, currentTimetable, binding)
|
updateLessonView(item, currentTimetable, binding)
|
||||||
binding.dashboardLessonsItemTitleTomorrow.isVisible = false
|
binding.dashboardLessonsItemTitleTomorrow.isVisible = false
|
||||||
}
|
}
|
||||||
tomorrowTimetable.isNotEmpty() -> {
|
tomorrowTimetable.isNotEmpty() -> {
|
||||||
|
dateToNavigate = tomorrowDate
|
||||||
updateLessonView(item, tomorrowTimetable, binding)
|
updateLessonView(item, tomorrowTimetable, binding)
|
||||||
binding.dashboardLessonsItemTitleTomorrow.isVisible = true
|
binding.dashboardLessonsItemTitleTomorrow.isVisible = true
|
||||||
}
|
}
|
||||||
currentDayHeader != null && currentDayHeader.content.isNotBlank() -> {
|
currentDayHeader != null && currentDayHeader.content.isNotBlank() -> {
|
||||||
|
dateToNavigate = currentDate
|
||||||
updateLessonView(item, emptyList(), binding, currentDayHeader)
|
updateLessonView(item, emptyList(), binding, currentDayHeader)
|
||||||
binding.dashboardLessonsItemTitleTomorrow.isVisible = false
|
binding.dashboardLessonsItemTitleTomorrow.isVisible = false
|
||||||
}
|
}
|
||||||
tomorrowDayHeader != null && tomorrowDayHeader.content.isNotBlank() -> {
|
tomorrowDayHeader != null && tomorrowDayHeader.content.isNotBlank() -> {
|
||||||
|
dateToNavigate = tomorrowDate
|
||||||
updateLessonView(item, emptyList(), binding, tomorrowDayHeader)
|
updateLessonView(item, emptyList(), binding, tomorrowDayHeader)
|
||||||
binding.dashboardLessonsItemTitleTomorrow.isVisible = true
|
binding.dashboardLessonsItemTitleTomorrow.isVisible = true
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
|
dateToNavigate = tomorrowDate
|
||||||
updateLessonView(item, emptyList(), binding)
|
updateLessonView(item, emptyList(), binding)
|
||||||
binding.dashboardLessonsItemTitleTomorrow.isVisible =
|
binding.dashboardLessonsItemTitleTomorrow.isVisible =
|
||||||
!(item.isLoading && item.error == null)
|
!(item.isLoading && item.error == null)
|
||||||
@ -322,7 +333,7 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
|||||||
Handler(Looper.getMainLooper()).post { updateLessonState() }
|
Handler(Looper.getMainLooper()).post { updateLessonState() }
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.root.setOnClickListener { onLessonsTileClickListener() }
|
binding.root.setOnClickListener { onLessonsTileClickListener(dateToNavigate) }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateLessonView(
|
private fun updateLessonView(
|
||||||
@ -426,7 +437,10 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
val minutesToEndLesson = firstLesson.left!!.toMinutes() + 1
|
val minutesToEndLesson = firstLesson.left?.toMinutes()?.plus(1) ?: run {
|
||||||
|
Timber.e(IllegalArgumentException("Lesson left is null. START ${firstLesson.start} ; END ${firstLesson.end} ; CURRENT ${LocalDateTime.now()}"))
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
firstTimeText = context.resources.getQuantityString(
|
firstTimeText = context.resources.getQuantityString(
|
||||||
R.plurals.dashboard_timetable_first_lesson_time_more_minutes,
|
R.plurals.dashboard_timetable_first_lesson_time_more_minutes,
|
||||||
|
@ -70,10 +70,7 @@ class DashboardFragment : BaseFragment<FragmentDashboardBinding>(R.layout.fragme
|
|||||||
override fun initView() {
|
override fun initView() {
|
||||||
val mainActivity = requireActivity() as MainActivity
|
val mainActivity = requireActivity() as MainActivity
|
||||||
val itemTouchHelper = ItemTouchHelper(
|
val itemTouchHelper = ItemTouchHelper(
|
||||||
DashboardItemMoveCallback(
|
DashboardItemMoveCallback(dashboardAdapter, presenter::onDragAndDropEnd)
|
||||||
dashboardAdapter,
|
|
||||||
presenter::onDragAndDropEnd
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
dashboardAdapter.apply {
|
dashboardAdapter.apply {
|
||||||
@ -87,7 +84,9 @@ class DashboardFragment : BaseFragment<FragmentDashboardBinding>(R.layout.fragme
|
|||||||
onAttendanceTileClickListener = {
|
onAttendanceTileClickListener = {
|
||||||
mainActivity.pushView(AttendanceSummaryFragment.newInstance())
|
mainActivity.pushView(AttendanceSummaryFragment.newInstance())
|
||||||
}
|
}
|
||||||
onLessonsTileClickListener = { mainActivity.pushView(TimetableFragment.newInstance()) }
|
onLessonsTileClickListener = {
|
||||||
|
mainActivity.pushView(TimetableFragment.newInstance(it))
|
||||||
|
}
|
||||||
onGradeTileClickListener = { mainActivity.pushView(GradeFragment.newInstance()) }
|
onGradeTileClickListener = { mainActivity.pushView(GradeFragment.newInstance()) }
|
||||||
onHomeworkTileClickListener = { mainActivity.pushView(HomeworkFragment.newInstance()) }
|
onHomeworkTileClickListener = { mainActivity.pushView(HomeworkFragment.newInstance()) }
|
||||||
onAnnouncementsTileClickListener = {
|
onAnnouncementsTileClickListener = {
|
||||||
|
@ -492,31 +492,37 @@ class DashboardPresenter @Inject constructor(
|
|||||||
end = LocalDate.now().plusDays(7),
|
end = LocalDate.now().plusDays(7),
|
||||||
forceRefresh = forceRefresh
|
forceRefresh = forceRefresh
|
||||||
)
|
)
|
||||||
}.onEach {
|
}
|
||||||
when (it.status) {
|
.map { examResource ->
|
||||||
Status.LOADING -> {
|
val sortedExams = examResource.data?.sortedBy { it.date }
|
||||||
Timber.i("Loading dashboard exams data started")
|
|
||||||
if (forceRefresh) return@onEach
|
|
||||||
updateData(
|
|
||||||
DashboardItem.Exams(it.data.orEmpty(), isLoading = true),
|
|
||||||
forceRefresh
|
|
||||||
)
|
|
||||||
|
|
||||||
if (!it.data.isNullOrEmpty()) {
|
examResource.copy(data = sortedExams)
|
||||||
firstLoadedItemList += DashboardItem.Type.EXAMS
|
}
|
||||||
|
.onEach {
|
||||||
|
when (it.status) {
|
||||||
|
Status.LOADING -> {
|
||||||
|
Timber.i("Loading dashboard exams data started")
|
||||||
|
if (forceRefresh) return@onEach
|
||||||
|
updateData(
|
||||||
|
DashboardItem.Exams(it.data.orEmpty(), isLoading = true),
|
||||||
|
forceRefresh
|
||||||
|
)
|
||||||
|
|
||||||
|
if (!it.data.isNullOrEmpty()) {
|
||||||
|
firstLoadedItemList += DashboardItem.Type.EXAMS
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Status.SUCCESS -> {
|
||||||
|
Timber.i("Loading dashboard exams result: Success")
|
||||||
|
updateData(DashboardItem.Exams(it.data ?: emptyList()), forceRefresh)
|
||||||
|
}
|
||||||
|
Status.ERROR -> {
|
||||||
|
Timber.i("Loading dashboard exams result: An exception occurred")
|
||||||
|
errorHandler.dispatch(it.error!!)
|
||||||
|
updateData(DashboardItem.Exams(error = it.error), forceRefresh)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Status.SUCCESS -> {
|
}.launch("dashboard_exams")
|
||||||
Timber.i("Loading dashboard exams result: Success")
|
|
||||||
updateData(DashboardItem.Exams(it.data ?: emptyList()), forceRefresh)
|
|
||||||
}
|
|
||||||
Status.ERROR -> {
|
|
||||||
Timber.i("Loading dashboard exams result: An exception occurred")
|
|
||||||
errorHandler.dispatch(it.error!!)
|
|
||||||
updateData(DashboardItem.Exams(error = it.error), forceRefresh)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}.launch("dashboard_exams")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun loadConferences(student: Student, forceRefresh: Boolean) {
|
private fun loadConferences(student: Student, forceRefresh: Boolean) {
|
||||||
|
@ -90,10 +90,10 @@ class LoginFormPresenter @Inject constructor(
|
|||||||
|
|
||||||
flowWithResource {
|
flowWithResource {
|
||||||
studentRepository.getStudentsScrapper(
|
studentRepository.getStudentsScrapper(
|
||||||
email,
|
email = email,
|
||||||
password,
|
password = password,
|
||||||
host,
|
scrapperBaseUrl = host,
|
||||||
symbol
|
symbol = symbol
|
||||||
)
|
)
|
||||||
}.onEach {
|
}.onEach {
|
||||||
when (it.status) {
|
when (it.status) {
|
||||||
|
@ -78,7 +78,9 @@ class LoginStudentSelectPresenter @Inject constructor(
|
|||||||
when (it.status) {
|
when (it.status) {
|
||||||
Status.LOADING -> Timber.d("Login student select students load started")
|
Status.LOADING -> Timber.d("Login student select students load started")
|
||||||
Status.SUCCESS -> view?.updateData(studentsWithSemesters.map { studentWithSemesters ->
|
Status.SUCCESS -> view?.updateData(studentsWithSemesters.map { studentWithSemesters ->
|
||||||
studentWithSemesters to it.data!!.any { item -> compareStudents(studentWithSemesters.student, item.student) }
|
studentWithSemesters to it.data!!.any { item ->
|
||||||
|
compareStudents(studentWithSemesters.student, item.student)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
Status.ERROR -> {
|
Status.ERROR -> {
|
||||||
errorHandler.dispatch(it.error!!)
|
errorHandler.dispatch(it.error!!)
|
||||||
@ -95,35 +97,32 @@ class LoginStudentSelectPresenter @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun registerStudents(studentsWithSemesters: List<StudentWithSemesters>) {
|
private fun registerStudents(studentsWithSemesters: List<StudentWithSemesters>) {
|
||||||
flowWithResource {
|
flowWithResource { studentRepository.saveStudents(studentsWithSemesters) }
|
||||||
val savedStudents = studentRepository.saveStudents(studentsWithSemesters)
|
.onEach {
|
||||||
val firstRegistered = studentsWithSemesters.first().apply { student.id = savedStudents.first() }
|
when (it.status) {
|
||||||
studentRepository.switchStudent(firstRegistered)
|
Status.LOADING -> view?.run {
|
||||||
}.onEach {
|
Timber.i("Registration started")
|
||||||
when (it.status) {
|
showProgress(true)
|
||||||
Status.LOADING -> view?.run {
|
showContent(false)
|
||||||
Timber.i("Registration started")
|
}
|
||||||
showProgress(true)
|
Status.SUCCESS -> {
|
||||||
showContent(false)
|
Timber.i("Registration result: Success")
|
||||||
}
|
view?.openMainView()
|
||||||
Status.SUCCESS -> {
|
logRegisterEvent(studentsWithSemesters)
|
||||||
Timber.i("Registration result: Success")
|
}
|
||||||
view?.openMainView()
|
Status.ERROR -> {
|
||||||
logRegisterEvent(studentsWithSemesters)
|
Timber.i("Registration result: An exception occurred ")
|
||||||
}
|
view?.apply {
|
||||||
Status.ERROR -> {
|
showProgress(false)
|
||||||
Timber.i("Registration result: An exception occurred ")
|
showContent(true)
|
||||||
view?.apply {
|
showContact(true)
|
||||||
showProgress(false)
|
}
|
||||||
showContent(true)
|
lastError = it.error
|
||||||
showContact(true)
|
loginErrorHandler.dispatch(it.error!!)
|
||||||
|
logRegisterEvent(studentsWithSemesters, it.error)
|
||||||
}
|
}
|
||||||
lastError = it.error
|
|
||||||
loginErrorHandler.dispatch(it.error!!)
|
|
||||||
logRegisterEvent(studentsWithSemesters, it.error)
|
|
||||||
}
|
}
|
||||||
}
|
}.launch("register")
|
||||||
}.launch("register")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onDiscordClick() {
|
fun onDiscordClick() {
|
||||||
@ -134,7 +133,10 @@ class LoginStudentSelectPresenter @Inject constructor(
|
|||||||
view?.openEmail(lastError?.message.ifNullOrBlank { "empty" })
|
view?.openEmail(lastError?.message.ifNullOrBlank { "empty" })
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun logRegisterEvent(studentsWithSemesters: List<StudentWithSemesters>, error: Throwable? = null) {
|
private fun logRegisterEvent(
|
||||||
|
studentsWithSemesters: List<StudentWithSemesters>,
|
||||||
|
error: Throwable? = null
|
||||||
|
) {
|
||||||
studentsWithSemesters.forEach { student ->
|
studentsWithSemesters.forEach { student ->
|
||||||
analytics.logEvent(
|
analytics.logEvent(
|
||||||
"registration_student_select",
|
"registration_student_select",
|
||||||
|
@ -131,7 +131,9 @@ class LuckyNumberHistoryFragment :
|
|||||||
presenter.onDateSet(date.year, date.monthValue, date.dayOfMonth)
|
presenter.onDateSet(date.year, date.monthValue, date.dayOfMonth)
|
||||||
}
|
}
|
||||||
|
|
||||||
datePicker.show(this@LuckyNumberHistoryFragment.parentFragmentManager, null)
|
if (!parentFragmentManager.isStateSaved) {
|
||||||
|
datePicker.show(parentFragmentManager, null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showContent(show: Boolean) {
|
override fun showContent(show: Boolean) {
|
||||||
|
@ -117,6 +117,7 @@ class MessageTabPresenter @Inject constructor(
|
|||||||
if (!it.data.isNullOrEmpty()) {
|
if (!it.data.isNullOrEmpty()) {
|
||||||
view?.run {
|
view?.run {
|
||||||
enableSwipe(true)
|
enableSwipe(true)
|
||||||
|
showErrorView(false)
|
||||||
showRefresh(true)
|
showRefresh(true)
|
||||||
showProgress(false)
|
showProgress(false)
|
||||||
showContent(true)
|
showContent(true)
|
||||||
|
@ -11,6 +11,7 @@ import io.github.wulkanowy.ui.base.BaseFragment
|
|||||||
import io.github.wulkanowy.ui.modules.conference.ConferenceFragment
|
import io.github.wulkanowy.ui.modules.conference.ConferenceFragment
|
||||||
import io.github.wulkanowy.ui.modules.exam.ExamFragment
|
import io.github.wulkanowy.ui.modules.exam.ExamFragment
|
||||||
import io.github.wulkanowy.ui.modules.homework.HomeworkFragment
|
import io.github.wulkanowy.ui.modules.homework.HomeworkFragment
|
||||||
|
import io.github.wulkanowy.ui.modules.luckynumber.LuckyNumberFragment
|
||||||
import io.github.wulkanowy.ui.modules.main.MainActivity
|
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||||
import io.github.wulkanowy.ui.modules.main.MainView
|
import io.github.wulkanowy.ui.modules.main.MainView
|
||||||
import io.github.wulkanowy.ui.modules.message.MessageFragment
|
import io.github.wulkanowy.ui.modules.message.MessageFragment
|
||||||
@ -66,6 +67,9 @@ class MoreFragment : BaseFragment<FragmentMoreBinding>(R.layout.fragment_more),
|
|||||||
override val examRes: Pair<String, Drawable?>?
|
override val examRes: Pair<String, Drawable?>?
|
||||||
get() = context?.run { getString(R.string.exam_title) to getCompatDrawable(R.drawable.ic_main_exam) }
|
get() = context?.run { getString(R.string.exam_title) to getCompatDrawable(R.drawable.ic_main_exam) }
|
||||||
|
|
||||||
|
override val luckyNumberRes: Pair<String, Drawable?>?
|
||||||
|
get() = context?.run { getString(R.string.lucky_number_title) to getCompatDrawable(R.drawable.ic_more_lucky_number) }
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
binding = FragmentMoreBinding.bind(view)
|
binding = FragmentMoreBinding.bind(view)
|
||||||
@ -128,6 +132,10 @@ class MoreFragment : BaseFragment<FragmentMoreBinding>(R.layout.fragment_more),
|
|||||||
(activity as? MainActivity)?.pushView(ExamFragment.newInstance())
|
(activity as? MainActivity)?.pushView(ExamFragment.newInstance())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun openLuckyNumberView() {
|
||||||
|
(activity as? MainActivity)?.pushView(LuckyNumberFragment.newInstance())
|
||||||
|
}
|
||||||
|
|
||||||
override fun popView(depth: Int) {
|
override fun popView(depth: Int) {
|
||||||
(activity as? MainActivity)?.popView(depth)
|
(activity as? MainActivity)?.popView(depth)
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ class MorePresenter @Inject constructor(
|
|||||||
schoolAndTeachersRes?.first -> openSchoolAndTeachersView()
|
schoolAndTeachersRes?.first -> openSchoolAndTeachersView()
|
||||||
mobileDevicesRes?.first -> openMobileDevicesView()
|
mobileDevicesRes?.first -> openMobileDevicesView()
|
||||||
settingsRes?.first -> openSettingsView()
|
settingsRes?.first -> openSettingsView()
|
||||||
|
luckyNumberRes?.first -> openLuckyNumberView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,6 +49,7 @@ class MorePresenter @Inject constructor(
|
|||||||
examRes,
|
examRes,
|
||||||
homeworkRes,
|
homeworkRes,
|
||||||
noteRes,
|
noteRes,
|
||||||
|
luckyNumberRes,
|
||||||
conferencesRes,
|
conferencesRes,
|
||||||
schoolAnnouncementRes,
|
schoolAnnouncementRes,
|
||||||
schoolAndTeachersRes,
|
schoolAndTeachersRes,
|
||||||
|
@ -23,6 +23,8 @@ interface MoreView : BaseView {
|
|||||||
|
|
||||||
val examRes: Pair<String, Drawable?>?
|
val examRes: Pair<String, Drawable?>?
|
||||||
|
|
||||||
|
val luckyNumberRes: Pair<String, Drawable?>?
|
||||||
|
|
||||||
fun initView()
|
fun initView()
|
||||||
|
|
||||||
fun updateData(data: List<Pair<String, Drawable?>>)
|
fun updateData(data: List<Pair<String, Drawable?>>)
|
||||||
@ -46,4 +48,6 @@ interface MoreView : BaseView {
|
|||||||
fun openMobileDevicesView()
|
fun openMobileDevicesView()
|
||||||
|
|
||||||
fun openExamView()
|
fun openExamView()
|
||||||
|
|
||||||
|
fun openLuckyNumberView()
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ class SchoolAnnouncementDialog : DialogFragment() {
|
|||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
) = DialogSchoolAnnouncementBinding.inflate(inflater).apply { binding = this }.root
|
) = DialogSchoolAnnouncementBinding.inflate(inflater).also { binding = it }.root
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
@ -64,6 +64,7 @@ class SchoolAnnouncementPresenter @Inject constructor(
|
|||||||
view?.run {
|
view?.run {
|
||||||
enableSwipe(true)
|
enableSwipe(true)
|
||||||
showRefresh(true)
|
showRefresh(true)
|
||||||
|
showErrorView(false)
|
||||||
showProgress(false)
|
showProgress(false)
|
||||||
showContent(true)
|
showContent(true)
|
||||||
updateData(it.data)
|
updateData(it.data)
|
||||||
|
@ -13,7 +13,6 @@ import io.github.wulkanowy.R
|
|||||||
import io.github.wulkanowy.data.db.entities.Timetable
|
import io.github.wulkanowy.data.db.entities.Timetable
|
||||||
import io.github.wulkanowy.databinding.DialogTimetableBinding
|
import io.github.wulkanowy.databinding.DialogTimetableBinding
|
||||||
import io.github.wulkanowy.utils.capitalise
|
import io.github.wulkanowy.utils.capitalise
|
||||||
import io.github.wulkanowy.utils.decapitalise
|
|
||||||
import io.github.wulkanowy.utils.getThemeAttrColor
|
import io.github.wulkanowy.utils.getThemeAttrColor
|
||||||
import io.github.wulkanowy.utils.lifecycleAwareVariable
|
import io.github.wulkanowy.utils.lifecycleAwareVariable
|
||||||
import io.github.wulkanowy.utils.toFormattedString
|
import io.github.wulkanowy.utils.toFormattedString
|
||||||
@ -52,7 +51,7 @@ class TimetableDialog : DialogFragment() {
|
|||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
with(lesson) {
|
with(lesson) {
|
||||||
setInfo(info, teacher, canceled, changes)
|
setInfo(info, canceled, changes)
|
||||||
setSubject(subject, subjectOld)
|
setSubject(subject, subjectOld)
|
||||||
setTeacher(teacher, teacherOld)
|
setTeacher(teacher, teacherOld)
|
||||||
setGroup(group)
|
setGroup(group)
|
||||||
@ -80,7 +79,7 @@ class TimetableDialog : DialogFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("DefaultLocale")
|
@SuppressLint("DefaultLocale")
|
||||||
private fun setInfo(info: String, teacher: String, canceled: Boolean, changes: Boolean) {
|
private fun setInfo(info: String, canceled: Boolean, changes: Boolean) {
|
||||||
with(binding) {
|
with(binding) {
|
||||||
when {
|
when {
|
||||||
info.isNotBlank() -> {
|
info.isNotBlank() -> {
|
||||||
@ -102,8 +101,6 @@ class TimetableDialog : DialogFragment() {
|
|||||||
|
|
||||||
timetableDialogChangesValue.text = when {
|
timetableDialogChangesValue.text = when {
|
||||||
canceled && !changes -> "Lekcja odwołana: $info"
|
canceled && !changes -> "Lekcja odwołana: $info"
|
||||||
changes && teacher.isNotBlank() -> "Zastępstwo: $teacher"
|
|
||||||
changes && teacher.isBlank() -> "Zastępstwo, ${info.decapitalise()}"
|
|
||||||
else -> info.capitalise()
|
else -> info.capitalise()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,13 @@ class TimetableFragment : BaseFragment<FragmentTimetableBinding>(R.layout.fragme
|
|||||||
companion object {
|
companion object {
|
||||||
private const val SAVED_DATE_KEY = "CURRENT_DATE"
|
private const val SAVED_DATE_KEY = "CURRENT_DATE"
|
||||||
|
|
||||||
fun newInstance() = TimetableFragment()
|
private const val ARGUMENT_DATE_KEY = "ARGUMENT_DATE"
|
||||||
|
|
||||||
|
fun newInstance(date: LocalDate? = null) = TimetableFragment().apply {
|
||||||
|
arguments = Bundle().apply {
|
||||||
|
date?.let { putLong(ARGUMENT_DATE_KEY, it.toEpochDay()) }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override val titleStringId get() = R.string.timetable_title
|
override val titleStringId get() = R.string.timetable_title
|
||||||
@ -62,7 +68,11 @@ class TimetableFragment : BaseFragment<FragmentTimetableBinding>(R.layout.fragme
|
|||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
binding = FragmentTimetableBinding.bind(view)
|
binding = FragmentTimetableBinding.bind(view)
|
||||||
messageContainer = binding.timetableRecycler
|
messageContainer = binding.timetableRecycler
|
||||||
presenter.onAttachView(this, savedInstanceState?.getLong(SAVED_DATE_KEY))
|
|
||||||
|
val initDate = savedInstanceState?.getLong(SAVED_DATE_KEY)
|
||||||
|
?: arguments?.getLong(ARGUMENT_DATE_KEY)?.takeUnless { it == 0L }
|
||||||
|
|
||||||
|
presenter.onAttachView(this, initDate)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initView() {
|
override fun initView() {
|
||||||
@ -202,7 +212,9 @@ class TimetableFragment : BaseFragment<FragmentTimetableBinding>(R.layout.fragme
|
|||||||
presenter.onDateSet(date.year, date.monthValue, date.dayOfMonth)
|
presenter.onDateSet(date.year, date.monthValue, date.dayOfMonth)
|
||||||
}
|
}
|
||||||
|
|
||||||
datePicker.show(this@TimetableFragment.parentFragmentManager, null)
|
if (!parentFragmentManager.isStateSaved) {
|
||||||
|
datePicker.show(parentFragmentManager, null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun openAdditionalLessonsView() {
|
override fun openAdditionalLessonsView() {
|
||||||
|
@ -149,6 +149,7 @@ class TimetablePresenter @Inject constructor(
|
|||||||
view?.run {
|
view?.run {
|
||||||
enableSwipe(true)
|
enableSwipe(true)
|
||||||
showRefresh(true)
|
showRefresh(true)
|
||||||
|
showErrorView(false)
|
||||||
showProgress(false)
|
showProgress(false)
|
||||||
showContent(true)
|
showContent(true)
|
||||||
updateData(it.data!!.lessons)
|
updateData(it.data!!.lessons)
|
||||||
|
@ -152,7 +152,9 @@ class AdditionalLessonsFragment :
|
|||||||
presenter.onDateSet(date.year, date.monthValue, date.dayOfMonth)
|
presenter.onDateSet(date.year, date.monthValue, date.dayOfMonth)
|
||||||
}
|
}
|
||||||
|
|
||||||
datePicker.show(this@AdditionalLessonsFragment.parentFragmentManager, null)
|
if (!parentFragmentManager.isStateSaved) {
|
||||||
|
datePicker.show(parentFragmentManager, null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSaveInstanceState(outState: Bundle) {
|
override fun onSaveInstanceState(outState: Bundle) {
|
||||||
|
@ -173,7 +173,9 @@ class CompletedLessonsFragment :
|
|||||||
presenter.onDateSet(date.year, date.monthValue, date.dayOfMonth)
|
presenter.onDateSet(date.year, date.monthValue, date.dayOfMonth)
|
||||||
}
|
}
|
||||||
|
|
||||||
datePicker.show(this@CompletedLessonsFragment.parentFragmentManager, null)
|
if (!parentFragmentManager.isStateSaved) {
|
||||||
|
datePicker.show(parentFragmentManager, null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSaveInstanceState(outState: Bundle) {
|
override fun onSaveInstanceState(outState: Bundle) {
|
||||||
|
@ -102,7 +102,9 @@ fun Context.openNavigation(location: String) {
|
|||||||
fun Context.openDialer(phone: String) {
|
fun Context.openDialer(phone: String) {
|
||||||
val intentUri = Uri.parse("tel:$phone")
|
val intentUri = Uri.parse("tel:$phone")
|
||||||
val intent = Intent(Intent.ACTION_DIAL, intentUri)
|
val intent = Intent(Intent.ACTION_DIAL, intentUri)
|
||||||
startActivity(intent)
|
if (intent.resolveActivity(packageManager) != null) {
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.shareText(text: String, subject: String?) {
|
fun Context.shareText(text: String, subject: String?) {
|
||||||
|
@ -2,7 +2,6 @@ package io.github.wulkanowy.utils
|
|||||||
|
|
||||||
import com.google.android.material.datepicker.CalendarConstraints
|
import com.google.android.material.datepicker.CalendarConstraints
|
||||||
import kotlinx.parcelize.Parcelize
|
import kotlinx.parcelize.Parcelize
|
||||||
import java.time.DayOfWeek
|
|
||||||
import java.time.temporal.ChronoUnit
|
import java.time.temporal.ChronoUnit
|
||||||
|
|
||||||
@Parcelize
|
@Parcelize
|
||||||
@ -12,7 +11,6 @@ class SchoolDaysValidator(val start: Long, val end: Long) : CalendarConstraints.
|
|||||||
val date = dateLong.toLocalDateTime()
|
val date = dateLong.toLocalDateTime()
|
||||||
|
|
||||||
return date.until(end.toLocalDateTime(), ChronoUnit.DAYS) >= 0 &&
|
return date.until(end.toLocalDateTime(), ChronoUnit.DAYS) >= 0 &&
|
||||||
date.until(start.toLocalDateTime(), ChronoUnit.DAYS) <= 0 &&
|
date.until(start.toLocalDateTime(), ChronoUnit.DAYS) <= 0
|
||||||
date.dayOfWeek != DayOfWeek.SUNDAY
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
Wersja 1.2.1
|
Wersja 1.2.3
|
||||||
|
|
||||||
- dodaliśmy brakujące okienka z podglądem szczegółów ogłoszeń szkolnych
|
- naprawiliśmy pomieszane imiona nauczycieli z salami w planie lekcji
|
||||||
- naprawiliśmy rzucające się w oczy błędy na ekranie startowym
|
- dodaliśmy brakujące okienka ze szczegółami na ekranie zebrań
|
||||||
- naprawiliśmy też inne drobne błędy w wyglądzie i stabilności aplikacji
|
- klikając w kafelek z lekcjami na jutro aplikacja teraz przekierowuje na ekran z planem na jutro
|
||||||
|
- naprawiliśmy błąd przy wylogowywaniu innego niż bieżący uczeń
|
||||||
|
|
||||||
Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases
|
Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases
|
||||||
|
211
app/src/main/res/layout/dialog_conference.xml
Normal file
211
app/src/main/res/layout/dialog_conference.xml
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="24dp"
|
||||||
|
android:paddingEnd="8dp">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="280dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/allDetailsHeader"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:text="@string/all_details"
|
||||||
|
android:textSize="21sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/conferenceDialogHeaderTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginTop="28dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:text="@string/all_title"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/allDetailsHeader" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/conferenceDialogHeaderValue"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:text="@string/all_no_data"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/conferenceDialogHeaderTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/conferenceDialogSubjectTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:text="@string/all_subject"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/conferenceDialogHeaderValue" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/conferenceDialogSubjectValue"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:text="@string/all_no_data"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/conferenceDialogSubjectTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/conferenceDialogDateTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:text="@string/all_date"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/conferenceDialogSubjectValue" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/conferenceDialogDateValue"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:text="@string/all_no_data"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/conferenceDialogDateTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/conferenceDialogPresentTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:text="@string/conferences_present"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/conferenceDialogDateValue" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/conferenceDialogPresentValue"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:text="@string/all_no_data"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/conferenceDialogPresentTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/conferenceDialogAgendaTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:text="@string/conference_agenda"
|
||||||
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/conferenceDialogPresentValue" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/conferenceDialogAgendaValue"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:text="@string/all_no_data"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/conferenceDialogAgendaTitle"
|
||||||
|
tools:maxLines="5"
|
||||||
|
tools:text="@tools:sample/lorem/random" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/conferenceDialogClose"
|
||||||
|
style="@style/Widget.MaterialComponents.Button.TextButton.Dialog"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:layout_marginTop="36dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:insetLeft="0dp"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetRight="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:minWidth="88dp"
|
||||||
|
android:text="@string/all_close"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/conferenceDialogAgendaValue" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
@ -118,6 +118,7 @@
|
|||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
|
tools:maxLines="5"
|
||||||
android:text="@string/all_no_data"
|
android:text="@string/all_no_data"
|
||||||
android:textIsSelectable="true"
|
android:textIsSelectable="true"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
|
@ -11,12 +11,13 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
|
android:maxEms="15"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/dashboard_grades_subitem_grade_container"
|
app:layout_constraintBottom_toBottomOf="@id/dashboard_grades_subitem_grade_container"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/dashboard_grades_subitem_grade_container"
|
app:layout_constraintTop_toTopOf="@id/dashboard_grades_subitem_grade_container"
|
||||||
tools:text="Urządzenia techniki kompu..." />
|
tools:text="Urządzenia techniki komputerowych" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/dashboard_grades_subitem_grade_container"
|
android:id="@+id/dashboard_grades_subitem_grade_container"
|
||||||
@ -26,6 +27,7 @@
|
|||||||
android:layout_marginBottom="6dp"
|
android:layout_marginBottom="6dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/dashboard_grades_subitem_title"
|
app:layout_constraintStart_toEndOf="@id/dashboard_grades_subitem_title"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
@ -402,6 +402,8 @@
|
|||||||
<item quantity="many">Máte %1$d nových setkání</item>
|
<item quantity="many">Máte %1$d nových setkání</item>
|
||||||
<item quantity="other">Máte %1$d nových setkání</item>
|
<item quantity="other">Máte %1$d nových setkání</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
<string name="conferences_present">Present at conference</string>
|
||||||
|
<string name="conference_agenda">Agenda</string>
|
||||||
<!--Director information-->
|
<!--Director information-->
|
||||||
<string name="school_announcement_title">Školní oznámení</string>
|
<string name="school_announcement_title">Školní oznámení</string>
|
||||||
<string name="school_announcement_no_items">Žádná školní oznámení</string>
|
<string name="school_announcement_no_items">Žádná školní oznámení</string>
|
||||||
@ -516,10 +518,10 @@
|
|||||||
<string name="dashboard_timetable_second_lessons_title">Další:</string>
|
<string name="dashboard_timetable_second_lessons_title">Další:</string>
|
||||||
<string name="dashboard_timetable_third_title">Později:</string>
|
<string name="dashboard_timetable_third_title">Později:</string>
|
||||||
<plurals name="dashboard_timetable_third_value">
|
<plurals name="dashboard_timetable_third_value">
|
||||||
<item quantity="one">ještě %1$d další lekce</item>
|
<item quantity="one">ještě %1$d lekce</item>
|
||||||
<item quantity="few">ještě %1$d další lekce</item>
|
<item quantity="few">ještě %1$d lekce</item>
|
||||||
<item quantity="many">ještě %1$d dalších lekcí</item>
|
<item quantity="many">ještě %1$d lekcí</item>
|
||||||
<item quantity="other">ještě %1$d dalších lekcí</item>
|
<item quantity="other">ještě %1$d lekcí</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_timetable_third_time">do %1$s</string>
|
<string name="dashboard_timetable_third_time">do %1$s</string>
|
||||||
<string name="dashboard_timetable_no_lessons">Žádné nadcházející lekce</string>
|
<string name="dashboard_timetable_no_lessons">Žádné nadcházející lekce</string>
|
||||||
@ -528,10 +530,10 @@
|
|||||||
<string name="dashboard_homework_no_homework">Žádné domácí úkoly do vykonána</string>
|
<string name="dashboard_homework_no_homework">Žádné domácí úkoly do vykonána</string>
|
||||||
<string name="dashboard_homework_error">Při načítání domácích úkolů došlo k chybě</string>
|
<string name="dashboard_homework_error">Při načítání domácích úkolů došlo k chybě</string>
|
||||||
<plurals name="dashboard_homework_more">
|
<plurals name="dashboard_homework_more">
|
||||||
<item quantity="one">Ještě %1$d další domácí úkol</item>
|
<item quantity="one">Ještě %1$d domácí úkol</item>
|
||||||
<item quantity="few">Ještě %1$d další domácí úkoly</item>
|
<item quantity="few">Ještě %1$d domácí úkoly</item>
|
||||||
<item quantity="many">Ještě %1$d dalších domácích úkolů</item>
|
<item quantity="many">Ještě %1$d domácích úkolů</item>
|
||||||
<item quantity="other">Ještě %1$d dalších domácích úkolů</item>
|
<item quantity="other">Ještě %1$d domácích úkolů</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_homework_time">do %1$s</string>
|
<string name="dashboard_homework_time">do %1$s</string>
|
||||||
<string name="dashboard_grade_title">Poslední známky</string>
|
<string name="dashboard_grade_title">Poslední známky</string>
|
||||||
@ -541,28 +543,28 @@
|
|||||||
<string name="dashboard_announcements_no_announcements">Žádná aktuální oznámení</string>
|
<string name="dashboard_announcements_no_announcements">Žádná aktuální oznámení</string>
|
||||||
<string name="dashboard_announcements_error">Při načítání oznámení došlo k chybě</string>
|
<string name="dashboard_announcements_error">Při načítání oznámení došlo k chybě</string>
|
||||||
<plurals name="dashboard_announcements_more">
|
<plurals name="dashboard_announcements_more">
|
||||||
<item quantity="one">Ještě %1$d další oznámení</item>
|
<item quantity="one">Ještě %1$d oznámení</item>
|
||||||
<item quantity="few">Ještě %1$d další oznámení</item>
|
<item quantity="few">Ještě %1$d oznámení</item>
|
||||||
<item quantity="many">Ještě %1$d dalších oznámení</item>
|
<item quantity="many">Ještě %1$d oznámení</item>
|
||||||
<item quantity="other">Ještě %1$d dalších oznámení</item>
|
<item quantity="other">Ještě %1$d oznámení</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_exams_title">Zkoušky</string>
|
<string name="dashboard_exams_title">Zkoušky</string>
|
||||||
<string name="dashboard_exams_no_exams">Žádné nadcházející zkoušky</string>
|
<string name="dashboard_exams_no_exams">Žádné nadcházející zkoušky</string>
|
||||||
<string name="dashboard_exams_error">Při načítání zkoušek došlo k chybě</string>
|
<string name="dashboard_exams_error">Při načítání zkoušek došlo k chybě</string>
|
||||||
<plurals name="dashboard_exams_more">
|
<plurals name="dashboard_exams_more">
|
||||||
<item quantity="one">Ještě %1$d další zkouška</item>
|
<item quantity="one">Ještě %1$d zkouška</item>
|
||||||
<item quantity="few">Ještě %1$d další zkoušky</item>
|
<item quantity="few">Ještě %1$d zkoušky</item>
|
||||||
<item quantity="many">Ještě %1$d dalších zkoušek</item>
|
<item quantity="many">Ještě %1$d zkoušek</item>
|
||||||
<item quantity="other">Ještě %1$d dalších zkoušek</item>
|
<item quantity="other">Ještě %1$d zkoušek</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_conferences_title">Setkání</string>
|
<string name="dashboard_conferences_title">Setkání</string>
|
||||||
<string name="dashboard_conferences_no_conferences">Žádná nadcházející setkání</string>
|
<string name="dashboard_conferences_no_conferences">Žádná nadcházející setkání</string>
|
||||||
<string name="dashboard_conferences_error">Při načítání setkání došlo k chybě</string>
|
<string name="dashboard_conferences_error">Při načítání setkání došlo k chybě</string>
|
||||||
<plurals name="dashboard_conference_more">
|
<plurals name="dashboard_conference_more">
|
||||||
<item quantity="one">Ještě %1$d další setkání</item>
|
<item quantity="one">Ještě %1$d setkání</item>
|
||||||
<item quantity="few">Ještě %1$d další setkání</item>
|
<item quantity="few">Ještě %1$d setkání</item>
|
||||||
<item quantity="many">Ještě %1$d dalších setkání</item>
|
<item quantity="many">Ještě %1$d setkání</item>
|
||||||
<item quantity="other">Ještě %1$d dalších setkání</item>
|
<item quantity="other">Ještě %1$d setkání</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_horizontal_group_error">Při načítání dat došlo k chybě</string>
|
<string name="dashboard_horizontal_group_error">Při načítání dat došlo k chybě</string>
|
||||||
<string name="dashboard_horizontal_group_no_data">Žádné</string>
|
<string name="dashboard_horizontal_group_no_data">Žádné</string>
|
||||||
@ -590,6 +592,7 @@
|
|||||||
<string name="all_yes">Ano</string>
|
<string name="all_yes">Ano</string>
|
||||||
<string name="all_no">Ne</string>
|
<string name="all_no">Ne</string>
|
||||||
<string name="all_save">Uložit</string>
|
<string name="all_save">Uložit</string>
|
||||||
|
<string name="all_title">Title</string>
|
||||||
<!--Timetable Widget-->
|
<!--Timetable Widget-->
|
||||||
<string name="widget_timetable_no_items">Žádné lekce</string>
|
<string name="widget_timetable_no_items">Žádné lekce</string>
|
||||||
<string name="widget_timetable_theme_title">Vybrat motiv</string>
|
<string name="widget_timetable_theme_title">Vybrat motiv</string>
|
||||||
|
@ -344,6 +344,8 @@
|
|||||||
<item quantity="one">Sie haben %1$d neue konferenz</item>
|
<item quantity="one">Sie haben %1$d neue konferenz</item>
|
||||||
<item quantity="other">Sie haben %1$d neue konferenzen</item>
|
<item quantity="other">Sie haben %1$d neue konferenzen</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
<string name="conferences_present">Present at conference</string>
|
||||||
|
<string name="conference_agenda">Agenda</string>
|
||||||
<!--Director information-->
|
<!--Director information-->
|
||||||
<string name="school_announcement_title">Schulankündigungen</string>
|
<string name="school_announcement_title">Schulankündigungen</string>
|
||||||
<string name="school_announcement_no_items">Keine schulankündigungen</string>
|
<string name="school_announcement_no_items">Keine schulankündigungen</string>
|
||||||
@ -512,6 +514,7 @@
|
|||||||
<string name="all_yes">Ja</string>
|
<string name="all_yes">Ja</string>
|
||||||
<string name="all_no">Nein</string>
|
<string name="all_no">Nein</string>
|
||||||
<string name="all_save">Speichern</string>
|
<string name="all_save">Speichern</string>
|
||||||
|
<string name="all_title">Title</string>
|
||||||
<!--Timetable Widget-->
|
<!--Timetable Widget-->
|
||||||
<string name="widget_timetable_no_items">Keine Lektionen</string>
|
<string name="widget_timetable_no_items">Keine Lektionen</string>
|
||||||
<string name="widget_timetable_theme_title">Thema wählen</string>
|
<string name="widget_timetable_theme_title">Thema wählen</string>
|
||||||
|
@ -402,6 +402,8 @@
|
|||||||
<item quantity="many">Masz %1$d nowych zebrań</item>
|
<item quantity="many">Masz %1$d nowych zebrań</item>
|
||||||
<item quantity="other">Masz %1$d nowych zebrań</item>
|
<item quantity="other">Masz %1$d nowych zebrań</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
<string name="conferences_present">Obecność na zebraniu</string>
|
||||||
|
<string name="conference_agenda">Agenda</string>
|
||||||
<!--Director information-->
|
<!--Director information-->
|
||||||
<string name="school_announcement_title">Ogłoszenia szkolne</string>
|
<string name="school_announcement_title">Ogłoszenia szkolne</string>
|
||||||
<string name="school_announcement_no_items">Brak ogłoszeń szkolnych</string>
|
<string name="school_announcement_no_items">Brak ogłoszeń szkolnych</string>
|
||||||
@ -516,10 +518,10 @@
|
|||||||
<string name="dashboard_timetable_second_lessons_title">Następnie:</string>
|
<string name="dashboard_timetable_second_lessons_title">Następnie:</string>
|
||||||
<string name="dashboard_timetable_third_title">Później:</string>
|
<string name="dashboard_timetable_third_title">Później:</string>
|
||||||
<plurals name="dashboard_timetable_third_value">
|
<plurals name="dashboard_timetable_third_value">
|
||||||
<item quantity="one">jeszcze %1$d dodatkowa lekcja</item>
|
<item quantity="one">jeszcze %1$d lekcja</item>
|
||||||
<item quantity="few">jeszcze %1$d dodatkowe lekcje</item>
|
<item quantity="few">jeszcze %1$d lekcje</item>
|
||||||
<item quantity="many">jeszcze %1$d dodatkowych lekcji</item>
|
<item quantity="many">jeszcze %1$d lekcji</item>
|
||||||
<item quantity="other">jeszcze %1$d dodatkowych lekcji</item>
|
<item quantity="other">jeszcze %1$d lekcji</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_timetable_third_time">do %1$s</string>
|
<string name="dashboard_timetable_third_time">do %1$s</string>
|
||||||
<string name="dashboard_timetable_no_lessons">Brak nadchodzących lekcji</string>
|
<string name="dashboard_timetable_no_lessons">Brak nadchodzących lekcji</string>
|
||||||
@ -528,10 +530,10 @@
|
|||||||
<string name="dashboard_homework_no_homework">Brak prac domowych do wykonania</string>
|
<string name="dashboard_homework_no_homework">Brak prac domowych do wykonania</string>
|
||||||
<string name="dashboard_homework_error">Wystąpił błąd podczas ładowania zadań domowych</string>
|
<string name="dashboard_homework_error">Wystąpił błąd podczas ładowania zadań domowych</string>
|
||||||
<plurals name="dashboard_homework_more">
|
<plurals name="dashboard_homework_more">
|
||||||
<item quantity="one">Jeszcze %1$d dodatkowe zadanie domowe</item>
|
<item quantity="one">Jeszcze %1$d zadanie domowe</item>
|
||||||
<item quantity="few">Jeszcze %1$d dodatkowe zadania domowe</item>
|
<item quantity="few">Jeszcze %1$d zadania domowe</item>
|
||||||
<item quantity="many">Jeszcze %1$d dodatkowych zadań domowych</item>
|
<item quantity="many">Jeszcze %1$d zadań domowych</item>
|
||||||
<item quantity="other">Jeszcze %1$d dodatkowych zadań domowych</item>
|
<item quantity="other">Jeszcze %1$d zadań domowych</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_homework_time">do %1$s</string>
|
<string name="dashboard_homework_time">do %1$s</string>
|
||||||
<string name="dashboard_grade_title">Ostatnie oceny</string>
|
<string name="dashboard_grade_title">Ostatnie oceny</string>
|
||||||
@ -541,19 +543,19 @@
|
|||||||
<string name="dashboard_announcements_no_announcements">Brak aktualnych ogłoszeń</string>
|
<string name="dashboard_announcements_no_announcements">Brak aktualnych ogłoszeń</string>
|
||||||
<string name="dashboard_announcements_error">Wystąpił błąd podczas ładowania ogłoszeń</string>
|
<string name="dashboard_announcements_error">Wystąpił błąd podczas ładowania ogłoszeń</string>
|
||||||
<plurals name="dashboard_announcements_more">
|
<plurals name="dashboard_announcements_more">
|
||||||
<item quantity="one">Jeszcze %1$d dodatkowe ogłoszenie</item>
|
<item quantity="one">Jeszcze %1$d ogłoszenie</item>
|
||||||
<item quantity="few">Jeszcze %1$d dodatkowe ogłoszenia</item>
|
<item quantity="few">Jeszcze %1$d ogłoszenia</item>
|
||||||
<item quantity="many">Jeszcze %1$d dodatkowych ogłoszeń</item>
|
<item quantity="many">Jeszcze %1$d ogłoszeń</item>
|
||||||
<item quantity="other">Jeszcze %1$d dodatkowych ogłoszeń</item>
|
<item quantity="other">Jeszcze %1$d ogłoszeń</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_exams_title">Sprawdziany</string>
|
<string name="dashboard_exams_title">Sprawdziany</string>
|
||||||
<string name="dashboard_exams_no_exams">Brak nadchodzących sprawdzianów</string>
|
<string name="dashboard_exams_no_exams">Brak nadchodzących sprawdzianów</string>
|
||||||
<string name="dashboard_exams_error">Wystąpił błąd podczas ładowania sprawdzianów</string>
|
<string name="dashboard_exams_error">Wystąpił błąd podczas ładowania sprawdzianów</string>
|
||||||
<plurals name="dashboard_exams_more">
|
<plurals name="dashboard_exams_more">
|
||||||
<item quantity="one">Jeszcze %1$d dodatkowy sprawdzian</item>
|
<item quantity="one">Jeszcze %1$d sprawdzian</item>
|
||||||
<item quantity="few">Jeszcze %1$d dodatkowe sprawdziany</item>
|
<item quantity="few">Jeszcze %1$d sprawdziany</item>
|
||||||
<item quantity="many">Jeszcze %1$d dodatkowych sprawdzianów</item>
|
<item quantity="many">Jeszcze %1$d sprawdzianów</item>
|
||||||
<item quantity="other">Jeszcze %1$d dodatkowych sprawdzianów</item>
|
<item quantity="other">Jeszcze %1$d sprawdzianów</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_conferences_title">Zebrania</string>
|
<string name="dashboard_conferences_title">Zebrania</string>
|
||||||
<string name="dashboard_conferences_no_conferences">Brak nadchodzących zebrań</string>
|
<string name="dashboard_conferences_no_conferences">Brak nadchodzących zebrań</string>
|
||||||
@ -562,7 +564,7 @@
|
|||||||
<item quantity="one">Jeszcze %1$d dodatkowe zebranie</item>
|
<item quantity="one">Jeszcze %1$d dodatkowe zebranie</item>
|
||||||
<item quantity="few">Jeszcze %1$d dodatkowe zebrania</item>
|
<item quantity="few">Jeszcze %1$d dodatkowe zebrania</item>
|
||||||
<item quantity="many">Jeszcze %1$d dodatkowych zebrań</item>
|
<item quantity="many">Jeszcze %1$d dodatkowych zebrań</item>
|
||||||
<item quantity="other">Jeszcze %1$d dodatkowych zebrań</item>
|
<item quantity="other">Jeszcze %1$d zebrań</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_horizontal_group_error">Wystąpił błąd podczas ładowania danych</string>
|
<string name="dashboard_horizontal_group_error">Wystąpił błąd podczas ładowania danych</string>
|
||||||
<string name="dashboard_horizontal_group_no_data">Brak</string>
|
<string name="dashboard_horizontal_group_no_data">Brak</string>
|
||||||
@ -590,6 +592,7 @@
|
|||||||
<string name="all_yes">Tak</string>
|
<string name="all_yes">Tak</string>
|
||||||
<string name="all_no">Nie</string>
|
<string name="all_no">Nie</string>
|
||||||
<string name="all_save">Zapisz</string>
|
<string name="all_save">Zapisz</string>
|
||||||
|
<string name="all_title">Tytuł</string>
|
||||||
<!--Timetable Widget-->
|
<!--Timetable Widget-->
|
||||||
<string name="widget_timetable_no_items">Brak lekcji</string>
|
<string name="widget_timetable_no_items">Brak lekcji</string>
|
||||||
<string name="widget_timetable_theme_title">Wybierz motyw</string>
|
<string name="widget_timetable_theme_title">Wybierz motyw</string>
|
||||||
|
@ -402,6 +402,8 @@
|
|||||||
<item quantity="many">У вас %1$d новая конференция</item>
|
<item quantity="many">У вас %1$d новая конференция</item>
|
||||||
<item quantity="other">У вас %1$d новых конференций</item>
|
<item quantity="other">У вас %1$d новых конференций</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
<string name="conferences_present">Present at conference</string>
|
||||||
|
<string name="conference_agenda">Agenda</string>
|
||||||
<!--Director information-->
|
<!--Director information-->
|
||||||
<string name="school_announcement_title">Объявления школ</string>
|
<string name="school_announcement_title">Объявления школ</string>
|
||||||
<string name="school_announcement_no_items">Нет объявлений о школе</string>
|
<string name="school_announcement_no_items">Нет объявлений о школе</string>
|
||||||
@ -590,6 +592,7 @@
|
|||||||
<string name="all_yes">Да</string>
|
<string name="all_yes">Да</string>
|
||||||
<string name="all_no">Нет</string>
|
<string name="all_no">Нет</string>
|
||||||
<string name="all_save">Сохранить</string>
|
<string name="all_save">Сохранить</string>
|
||||||
|
<string name="all_title">Title</string>
|
||||||
<!--Timetable Widget-->
|
<!--Timetable Widget-->
|
||||||
<string name="widget_timetable_no_items">Нет уроков</string>
|
<string name="widget_timetable_no_items">Нет уроков</string>
|
||||||
<string name="widget_timetable_theme_title">Выбрать тему</string>
|
<string name="widget_timetable_theme_title">Выбрать тему</string>
|
||||||
|
@ -402,6 +402,8 @@
|
|||||||
<item quantity="many">Máte %1$d nových stretnutí</item>
|
<item quantity="many">Máte %1$d nových stretnutí</item>
|
||||||
<item quantity="other">Máte %1$d nových stretnutí</item>
|
<item quantity="other">Máte %1$d nových stretnutí</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
<string name="conferences_present">Present at conference</string>
|
||||||
|
<string name="conference_agenda">Agenda</string>
|
||||||
<!--Director information-->
|
<!--Director information-->
|
||||||
<string name="school_announcement_title">Školské oznámenia</string>
|
<string name="school_announcement_title">Školské oznámenia</string>
|
||||||
<string name="school_announcement_no_items">Žiadne školské oznámenia</string>
|
<string name="school_announcement_no_items">Žiadne školské oznámenia</string>
|
||||||
@ -516,10 +518,10 @@
|
|||||||
<string name="dashboard_timetable_second_lessons_title">Ďalej:</string>
|
<string name="dashboard_timetable_second_lessons_title">Ďalej:</string>
|
||||||
<string name="dashboard_timetable_third_title">Neskôr:</string>
|
<string name="dashboard_timetable_third_title">Neskôr:</string>
|
||||||
<plurals name="dashboard_timetable_third_value">
|
<plurals name="dashboard_timetable_third_value">
|
||||||
<item quantity="one">ešte %1$d ďalší lekcia</item>
|
<item quantity="one">ešte %1$d lekcia</item>
|
||||||
<item quantity="few">ešte %1$d ďalšie lekcie</item>
|
<item quantity="few">ešte %1$d lekcie</item>
|
||||||
<item quantity="many">ešte %1$d ďalších lekcií</item>
|
<item quantity="many">ešte %1$d lekcií</item>
|
||||||
<item quantity="other">ešte %1$d ďalších lekcií</item>
|
<item quantity="other">ešte %1$d lekcií</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_timetable_third_time">do %1$s</string>
|
<string name="dashboard_timetable_third_time">do %1$s</string>
|
||||||
<string name="dashboard_timetable_no_lessons">Žiadne nadchádzajúce lekcie</string>
|
<string name="dashboard_timetable_no_lessons">Žiadne nadchádzajúce lekcie</string>
|
||||||
@ -528,10 +530,10 @@
|
|||||||
<string name="dashboard_homework_no_homework">Žiadne domáce úlohy do vykonaná</string>
|
<string name="dashboard_homework_no_homework">Žiadne domáce úlohy do vykonaná</string>
|
||||||
<string name="dashboard_homework_error">Pri načítaní domácich úloh došlo k chybe</string>
|
<string name="dashboard_homework_error">Pri načítaní domácich úloh došlo k chybe</string>
|
||||||
<plurals name="dashboard_homework_more">
|
<plurals name="dashboard_homework_more">
|
||||||
<item quantity="one">Ešte %1$d ďalšia domáca úloha</item>
|
<item quantity="one">Ešte %1$d domáca úloha</item>
|
||||||
<item quantity="few">Ešte %1$d ďalšie domáce úlohy</item>
|
<item quantity="few">Ešte %1$d domáce úlohy</item>
|
||||||
<item quantity="many">Ešte %1$d ďalších domácich úloh</item>
|
<item quantity="many">Ešte %1$d domácich úloh</item>
|
||||||
<item quantity="other">Ešte %1$d ďalších domácich úloh</item>
|
<item quantity="other">Ešte %1$d domácich úloh</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_homework_time">do %1$s</string>
|
<string name="dashboard_homework_time">do %1$s</string>
|
||||||
<string name="dashboard_grade_title">Posledné známky</string>
|
<string name="dashboard_grade_title">Posledné známky</string>
|
||||||
@ -541,28 +543,28 @@
|
|||||||
<string name="dashboard_announcements_no_announcements">Žiadne aktuálne oznámenia</string>
|
<string name="dashboard_announcements_no_announcements">Žiadne aktuálne oznámenia</string>
|
||||||
<string name="dashboard_announcements_error">Pri načítaní oznámení došlo k chybe</string>
|
<string name="dashboard_announcements_error">Pri načítaní oznámení došlo k chybe</string>
|
||||||
<plurals name="dashboard_announcements_more">
|
<plurals name="dashboard_announcements_more">
|
||||||
<item quantity="one">Ešte %1$d ďalšie oznámenie</item>
|
<item quantity="one">Ešte %1$d oznámenie</item>
|
||||||
<item quantity="few">Ešte %1$d ďalšie oznámenia</item>
|
<item quantity="few">Ešte %1$d oznámenia</item>
|
||||||
<item quantity="many">Ešte %1$d ďalších oznámení</item>
|
<item quantity="many">Ešte %1$d oznámení</item>
|
||||||
<item quantity="other">Ešte %1$d ďalších oznámení</item>
|
<item quantity="other">Ešte %1$d oznámení</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_exams_title">Skúšky</string>
|
<string name="dashboard_exams_title">Skúšky</string>
|
||||||
<string name="dashboard_exams_no_exams">Žiadne nadchádzajúce skúšky</string>
|
<string name="dashboard_exams_no_exams">Žiadne nadchádzajúce skúšky</string>
|
||||||
<string name="dashboard_exams_error">Pri načítaní skúšok došlo k chybe</string>
|
<string name="dashboard_exams_error">Pri načítaní skúšok došlo k chybe</string>
|
||||||
<plurals name="dashboard_exams_more">
|
<plurals name="dashboard_exams_more">
|
||||||
<item quantity="one">Ešte %1$d ďalšia skúška</item>
|
<item quantity="one">Ešte %1$d skúška</item>
|
||||||
<item quantity="few">Ešte %1$d ďalšie skúšky</item>
|
<item quantity="few">Ešte %1$d skúšky</item>
|
||||||
<item quantity="many">Ešte %1$d ďalších skúšok</item>
|
<item quantity="many">Ešte %1$d skúšok</item>
|
||||||
<item quantity="other">Ešte %1$d ďalších skúšok</item>
|
<item quantity="other">Ešte %1$d skúšok</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_conferences_title">Stretnutie</string>
|
<string name="dashboard_conferences_title">Stretnutie</string>
|
||||||
<string name="dashboard_conferences_no_conferences">Žiadna nadchádzajúce stretnutie</string>
|
<string name="dashboard_conferences_no_conferences">Žiadna nadchádzajúce stretnutie</string>
|
||||||
<string name="dashboard_conferences_error">Pri načítaní stretnutí došlo k chybe</string>
|
<string name="dashboard_conferences_error">Pri načítaní stretnutí došlo k chybe</string>
|
||||||
<plurals name="dashboard_conference_more">
|
<plurals name="dashboard_conference_more">
|
||||||
<item quantity="one">Ešte %1$d ďalšie stretnutie</item>
|
<item quantity="one">Ešte %1$d stretnutie</item>
|
||||||
<item quantity="few">Ešte %1$d ďalšie stretnutia</item>
|
<item quantity="few">Ešte %1$d stretnutia</item>
|
||||||
<item quantity="many">Ešte %1$d ďalších stretnutí</item>
|
<item quantity="many">Ešte %1$d stretnutí</item>
|
||||||
<item quantity="other">Ešte %1$d ďalších stretnutí</item>
|
<item quantity="other">Ešte %1$d stretnutí</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="dashboard_horizontal_group_error">Pri načítaní dát došlo k chybe</string>
|
<string name="dashboard_horizontal_group_error">Pri načítaní dát došlo k chybe</string>
|
||||||
<string name="dashboard_horizontal_group_no_data">Žiadne</string>
|
<string name="dashboard_horizontal_group_no_data">Žiadne</string>
|
||||||
@ -590,6 +592,7 @@
|
|||||||
<string name="all_yes">Áno</string>
|
<string name="all_yes">Áno</string>
|
||||||
<string name="all_no">Nie</string>
|
<string name="all_no">Nie</string>
|
||||||
<string name="all_save">Uložiť</string>
|
<string name="all_save">Uložiť</string>
|
||||||
|
<string name="all_title">Title</string>
|
||||||
<!--Timetable Widget-->
|
<!--Timetable Widget-->
|
||||||
<string name="widget_timetable_no_items">Žiadne lekcie</string>
|
<string name="widget_timetable_no_items">Žiadne lekcie</string>
|
||||||
<string name="widget_timetable_theme_title">Vybrať motív</string>
|
<string name="widget_timetable_theme_title">Vybrať motív</string>
|
||||||
|
@ -402,6 +402,8 @@
|
|||||||
<item quantity="many">У вас є %1$d нова конференція</item>
|
<item quantity="many">У вас є %1$d нова конференція</item>
|
||||||
<item quantity="other">У вас є %1$d нових конференцій</item>
|
<item quantity="other">У вас є %1$d нових конференцій</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
<string name="conferences_present">Present at conference</string>
|
||||||
|
<string name="conference_agenda">Agenda</string>
|
||||||
<!--Director information-->
|
<!--Director information-->
|
||||||
<string name="school_announcement_title">Оголошення школи</string>
|
<string name="school_announcement_title">Оголошення школи</string>
|
||||||
<string name="school_announcement_no_items">Жодних навчальних оголошень</string>
|
<string name="school_announcement_no_items">Жодних навчальних оголошень</string>
|
||||||
@ -590,6 +592,7 @@
|
|||||||
<string name="all_yes">Так</string>
|
<string name="all_yes">Так</string>
|
||||||
<string name="all_no">Ні</string>
|
<string name="all_no">Ні</string>
|
||||||
<string name="all_save">Зберегти</string>
|
<string name="all_save">Зберегти</string>
|
||||||
|
<string name="all_title">Title</string>
|
||||||
<!--Timetable Widget-->
|
<!--Timetable Widget-->
|
||||||
<string name="widget_timetable_no_items">Брак уроків</string>
|
<string name="widget_timetable_no_items">Брак уроків</string>
|
||||||
<string name="widget_timetable_theme_title">Увібрати тему</string>
|
<string name="widget_timetable_theme_title">Увібрати тему</string>
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
<string name="login_contact_discord">Discord</string>
|
<string name="login_contact_discord">Discord</string>
|
||||||
<string name="login_email_intent_title">Send email</string>
|
<string name="login_email_intent_title">Send email</string>
|
||||||
<string name="login_email_subject" translatable="false">Zgłoszenie: Problemy z logowaniem</string>
|
<string name="login_email_subject" translatable="false">Zgłoszenie: Problemy z logowaniem</string>
|
||||||
<string name="login_email_text" translatable="false">Informacje o aplikacji:\n\nUrządzenie: %1$s\nWersja SDK: %2$s\nWersja aplikacji: %3$s\nDodatkowe informacje: %4$s\nOstatni błąd: %5$s\n\nOpis problemu: </string>
|
<string name="login_email_text" translatable="false">Informacje o aplikacji:\n\nUrządzenie: %1$s\nWersja SDK: %2$s\nWersja aplikacji: %3$s\nDodatkowe informacje: %4$s\nOstatni błąd: %5$s\n\nOpis problemu (pełna nazwa szkoły, klasa ucznia): </string>
|
||||||
<string name="login_recover_warning">Make sure you select the correct UONET+ register variation!</string>
|
<string name="login_recover_warning">Make sure you select the correct UONET+ register variation!</string>
|
||||||
<string name="login_recover_button">I forgot my password</string>
|
<string name="login_recover_button">I forgot my password</string>
|
||||||
<string name="login_recover_title">Recover your account</string>
|
<string name="login_recover_title">Recover your account</string>
|
||||||
@ -336,10 +336,12 @@
|
|||||||
<string name="lucky_number_notify_new_item">Today\'s lucky number is: %s</string>
|
<string name="lucky_number_notify_new_item">Today\'s lucky number is: %s</string>
|
||||||
<string name="lucky_number_history_button">Show history</string>
|
<string name="lucky_number_history_button">Show history</string>
|
||||||
|
|
||||||
|
|
||||||
<!--Lucky number history-->
|
<!--Lucky number history-->
|
||||||
<string name="lucky_number_history_title">Lucky number history</string>
|
<string name="lucky_number_history_title">Lucky number history</string>
|
||||||
<string name="lucky_number_history_empty">No info about lucky numbers</string>
|
<string name="lucky_number_history_empty">No info about lucky numbers</string>
|
||||||
|
|
||||||
|
|
||||||
<!--Mobile devices-->
|
<!--Mobile devices-->
|
||||||
<string name="mobile_devices_title">Mobile devices</string>
|
<string name="mobile_devices_title">Mobile devices</string>
|
||||||
<string name="mobile_devices_no_items">No devices</string>
|
<string name="mobile_devices_no_items">No devices</string>
|
||||||
@ -388,7 +390,8 @@
|
|||||||
<item quantity="one">You have %1$d new conference</item>
|
<item quantity="one">You have %1$d new conference</item>
|
||||||
<item quantity="other">You have %1$d new conferences</item>
|
<item quantity="other">You have %1$d new conferences</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
<string name="conferences_present">Present at conference</string>
|
||||||
|
<string name="conference_agenda">Agenda</string>
|
||||||
|
|
||||||
<!--Director information-->
|
<!--Director information-->
|
||||||
<string name="school_announcement_title">School announcements</string>
|
<string name="school_announcement_title">School announcements</string>
|
||||||
@ -585,6 +588,7 @@
|
|||||||
<string name="all_yes">Yes</string>
|
<string name="all_yes">Yes</string>
|
||||||
<string name="all_no">No</string>
|
<string name="all_no">No</string>
|
||||||
<string name="all_save">Save</string>
|
<string name="all_save">Save</string>
|
||||||
|
<string name="all_title">Title</string>
|
||||||
|
|
||||||
|
|
||||||
<!--Timetable Widget-->
|
<!--Timetable Widget-->
|
||||||
|
@ -37,7 +37,8 @@ class StudentTest {
|
|||||||
studentDb,
|
studentDb,
|
||||||
semesterDb,
|
semesterDb,
|
||||||
mockSdk,
|
mockSdk,
|
||||||
AppInfo()
|
AppInfo(),
|
||||||
|
mockk()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,24 +89,11 @@ class LoginStudentSelectPresenterTest {
|
|||||||
@Test
|
@Test
|
||||||
fun onSelectedStudentTest() {
|
fun onSelectedStudentTest() {
|
||||||
coEvery {
|
coEvery {
|
||||||
studentRepository.saveStudents(
|
studentRepository.saveStudents(listOf(StudentWithSemesters(testStudent, emptyList())))
|
||||||
listOf(
|
|
||||||
StudentWithSemesters(
|
|
||||||
testStudent,
|
|
||||||
emptyList()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
} returns listOf(1L)
|
|
||||||
coEvery {
|
|
||||||
studentRepository.switchStudent(
|
|
||||||
StudentWithSemesters(
|
|
||||||
testStudent,
|
|
||||||
emptyList()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
} just Runs
|
} just Runs
|
||||||
|
|
||||||
every { loginStudentSelectView.openMainView() } just Runs
|
every { loginStudentSelectView.openMainView() } just Runs
|
||||||
|
|
||||||
presenter.onItemSelected(StudentWithSemesters(testStudent, emptyList()), false)
|
presenter.onItemSelected(StudentWithSemesters(testStudent, emptyList()), false)
|
||||||
presenter.onSignIn()
|
presenter.onSignIn()
|
||||||
|
|
||||||
@ -118,18 +105,14 @@ class LoginStudentSelectPresenterTest {
|
|||||||
@Test
|
@Test
|
||||||
fun onSelectedStudentErrorTest() {
|
fun onSelectedStudentErrorTest() {
|
||||||
coEvery {
|
coEvery {
|
||||||
studentRepository.saveStudents(
|
studentRepository.saveStudents(listOf(StudentWithSemesters(testStudent, emptyList())))
|
||||||
listOf(
|
|
||||||
StudentWithSemesters(
|
|
||||||
testStudent,
|
|
||||||
emptyList()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
} throws testException
|
} throws testException
|
||||||
|
|
||||||
coEvery { studentRepository.logoutStudent(testStudent) } just Runs
|
coEvery { studentRepository.logoutStudent(testStudent) } just Runs
|
||||||
|
|
||||||
presenter.onItemSelected(StudentWithSemesters(testStudent, emptyList()), false)
|
presenter.onItemSelected(StudentWithSemesters(testStudent, emptyList()), false)
|
||||||
presenter.onSignIn()
|
presenter.onSignIn()
|
||||||
|
|
||||||
verify { loginStudentSelectView.showContent(false) }
|
verify { loginStudentSelectView.showContent(false) }
|
||||||
verify { loginStudentSelectView.showProgress(true) }
|
verify { loginStudentSelectView.showProgress(true) }
|
||||||
verify { errorHandler.dispatch(match { testException.message == it.message }) }
|
verify { errorHandler.dispatch(match { testException.message == it.message }) }
|
||||||
|
Reference in New Issue
Block a user