From 6be801d4a8717b5ca89fabfe0a337a7115aec1c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Mon, 30 Dec 2019 22:57:48 +0100 Subject: [PATCH 01/12] Fix error view which overlaps grade statistics content (#627) --- app/build.gradle | 2 +- .../grade/statistics/GradeStatisticsFragment.kt | 15 ++++++++------- .../grade/statistics/GradeStatisticsPresenter.kt | 5 +++-- .../grade/statistics/GradeStatisticsView.kt | 2 ++ .../attendance/AttendanceRemoteTest.kt | 4 +++- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d75513767..01e60382e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -122,7 +122,7 @@ configurations.all { } dependencies { - implementation "io.github.wulkanowy:sdk:0.14.0" + implementation "io.github.wulkanowy:sdk:069677aa2089b5678adbcae79dc253220995f172" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "androidx.core:core-ktx:1.2.0-rc01" diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsFragment.kt index 5bcf167e5..a65cab9c9 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsFragment.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsFragment.kt @@ -47,6 +47,13 @@ class GradeStatisticsFragment : BaseFragment(), GradeStatisticsView, GradeView.G override val isBarViewEmpty get() = gradeStatisticsChartPoints.isEmpty + override val currentType + get() = when (gradeStatisticsTypeSwitch.checkedRadioButtonId) { + R.id.gradeStatisticsTypeSemester -> ViewType.SEMESTER + R.id.gradeStatisticsTypePartial -> ViewType.PARTIAL + else -> ViewType.POINTS + } + private lateinit var gradeColors: List> private val vulcanGradeColors = listOf( @@ -272,13 +279,7 @@ class GradeStatisticsFragment : BaseFragment(), GradeStatisticsView, GradeView.G override fun onResume() { super.onResume() - gradeStatisticsTypeSwitch.setOnCheckedChangeListener { _, checkedId -> - presenter.onTypeChange(when (checkedId) { - R.id.gradeStatisticsTypeSemester -> ViewType.SEMESTER - R.id.gradeStatisticsTypePartial -> ViewType.PARTIAL - else -> ViewType.POINTS - }) - } + gradeStatisticsTypeSwitch.setOnCheckedChangeListener { _, _ -> presenter.onTypeChange() } } override fun onSaveInstanceState(outState: Bundle) { diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsPresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsPresenter.kt index 9795c130c..bea70ea42 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsPresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsPresenter.kt @@ -94,7 +94,8 @@ class GradeStatisticsPresenter @Inject constructor( } } - fun onTypeChange(type: ViewType) { + fun onTypeChange() { + val type = view?.let { it.currentType } ?: ViewType.POINTS Timber.i("Select grade stats semester: $type") disposable.clear() view?.run { @@ -214,7 +215,7 @@ class GradeStatisticsPresenter @Inject constructor( private fun showErrorViewOnError(message: String, error: Throwable) { view?.run { - if (isBarViewEmpty || isPieViewEmpty) { + if ((isBarViewEmpty && currentType == ViewType.POINTS) || (isPieViewEmpty) && currentType != ViewType.POINTS) { lastError = error setErrorDetails(message) showErrorView(true) diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsView.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsView.kt index a214744c3..003520fbd 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsView.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/statistics/GradeStatisticsView.kt @@ -10,6 +10,8 @@ interface GradeStatisticsView : BaseView { val isBarViewEmpty: Boolean + val currentType: ViewType + fun initView() fun updateSubjects(data: ArrayList) diff --git a/app/src/test/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRemoteTest.kt b/app/src/test/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRemoteTest.kt index 318d4ff76..b471dc520 100644 --- a/app/src/test/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRemoteTest.kt +++ b/app/src/test/java/io/github/wulkanowy/data/repositories/attendance/AttendanceRemoteTest.kt @@ -57,6 +57,7 @@ class AttendanceRemoteTest { subject = "Fizyka", name = "Obecność", date = date, + timeId = 0, number = 0, deleted = false, excusable = false, @@ -65,7 +66,8 @@ class AttendanceRemoteTest { lateness = false, presence = false, categoryId = 1, - absence = false + absence = false, + excuseStatus = null ) } } From 4df245755a93e51b746442749e94687e2d1ea0e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Tue, 31 Dec 2019 17:31:26 +0100 Subject: [PATCH 02/12] Add fields validation in mobile api login (#629) --- app/build.gradle | 2 +- .../ui/modules/login/LoginErrorHandler.kt | 14 ++++++ .../login/advanced/LoginAdvancedFragment.kt | 46 ++++++++++++++++--- .../login/advanced/LoginAdvancedPresenter.kt | 41 +++++++++++++++-- .../login/advanced/LoginAdvancedView.kt | 6 +++ .../res/layout/fragment_login_advanced.xml | 2 - app/src/main/res/values-pl/strings.xml | 4 ++ app/src/main/res/values/strings.xml | 4 ++ 8 files changed, 105 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 01e60382e..f6c2f9ba5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -122,7 +122,7 @@ configurations.all { } dependencies { - implementation "io.github.wulkanowy:sdk:069677aa2089b5678adbcae79dc253220995f172" + implementation "io.github.wulkanowy:sdk:0886d71" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "androidx.core:core-ktx:1.2.0-rc01" diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/login/LoginErrorHandler.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/login/LoginErrorHandler.kt index c888ce79b..75a0ba6a6 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/login/LoginErrorHandler.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/login/LoginErrorHandler.kt @@ -5,6 +5,10 @@ import android.database.sqlite.SQLiteConstraintException import com.readystatesoftware.chuck.api.ChuckCollector import io.github.wulkanowy.R import io.github.wulkanowy.sdk.exception.BadCredentialsException +import io.github.wulkanowy.sdk.mobile.exception.InvalidPinException +import io.github.wulkanowy.sdk.mobile.exception.InvalidSymbolException +import io.github.wulkanowy.sdk.mobile.exception.InvalidTokenException +import io.github.wulkanowy.sdk.mobile.exception.TokenDeadException import io.github.wulkanowy.ui.base.ErrorHandler import javax.inject.Inject @@ -15,12 +19,22 @@ class LoginErrorHandler @Inject constructor( var onBadCredentials: () -> Unit = {} + var onInvalidToken: (String) -> Unit = {} + + var onInvalidPin: (String) -> Unit = {} + + var onInvalidSymbol: (String) -> Unit = {} + var onStudentDuplicate: (String) -> Unit = {} override fun proceed(error: Throwable) { when (error) { is BadCredentialsException -> onBadCredentials() is SQLiteConstraintException -> onStudentDuplicate(resources.getString(R.string.login_duplicate_student)) + is TokenDeadException -> onInvalidToken(resources.getString(R.string.login_expired_token)) + is InvalidTokenException -> onInvalidToken(resources.getString(R.string.login_invalid_token)) + is InvalidPinException -> onInvalidPin(resources.getString(R.string.login_invalid_pin)) + is InvalidSymbolException -> onInvalidSymbol(resources.getString(R.string.login_invalid_symbol)) else -> super.proceed(error) } } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedFragment.kt index 30563ebf4..353effa9b 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedFragment.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedFragment.kt @@ -4,7 +4,9 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.view.inputmethod.EditorInfo import android.widget.ArrayAdapter +import androidx.appcompat.widget.AppCompatEditText import androidx.core.widget.doOnTextChanged import io.github.wulkanowy.R import io.github.wulkanowy.data.db.entities.Student @@ -84,6 +86,9 @@ class LoginAdvancedFragment : BaseFragment(), LoginAdvancedView { }) } + loginFormPin.setOnEditorDoneSignIn() + loginFormPass.setOnEditorDoneSignIn() + loginFormSymbol.setAdapter(ArrayAdapter(requireContext(), android.R.layout.simple_list_item_1, resources.getStringArray(R.array.symbols_values))) with(loginFormHost) { @@ -92,6 +97,12 @@ class LoginAdvancedFragment : BaseFragment(), LoginAdvancedView { } } + private fun AppCompatEditText.setOnEditorDoneSignIn() { + setOnEditorActionListener { _, id, _ -> + if (id == EditorInfo.IME_ACTION_DONE || id == EditorInfo.IME_NULL) loginFormSignIn.callOnClick() else false + } + } + override fun setDefaultCredentials(name: String, pass: String, symbol: String, token: String, pin: String) { loginFormName.setText(name) loginFormPass.setText(pass) @@ -101,54 +112,75 @@ class LoginAdvancedFragment : BaseFragment(), LoginAdvancedView { } override fun setErrorNameRequired() { - loginFormNameLayout.run { + with(loginFormNameLayout) { requestFocus() error = getString(R.string.login_field_required) } } override fun setErrorPassRequired(focus: Boolean) { - loginFormPassLayout.run { + with(loginFormPassLayout) { if (focus) requestFocus() error = getString(R.string.login_field_required) } } override fun setErrorPassInvalid(focus: Boolean) { - loginFormPassLayout.run { + with(loginFormPassLayout) { if (focus) requestFocus() error = getString(R.string.login_invalid_password) } } override fun setErrorPassIncorrect() { - loginFormPassLayout.run { + with(loginFormPassLayout) { requestFocus() error = getString(R.string.login_incorrect_password) } } override fun setErrorPinRequired() { - loginFormPinLayout.run { + with(loginFormPinLayout) { requestFocus() error = getString(R.string.login_field_required) } } + override fun setErrorPinInvalid(message: String) { + with(loginFormPinLayout) { + requestFocus() + error = message + } + } + override fun setErrorSymbolRequired() { - loginFormSymbolLayout.run { + with(loginFormSymbolLayout) { requestFocus() error = getString(R.string.login_field_required) } } + override fun setErrorSymbolInvalid(message: String) { + with(loginFormSymbolLayout) { + requestFocus() + error = message + } + } + override fun setErrorTokenRequired() { - loginFormTokenLayout.run { + with(loginFormTokenLayout) { requestFocus() error = getString(R.string.login_field_required) } } + override fun setErrorTokenInvalid(message: String) { + with(loginFormTokenLayout) { + requestFocus() + error = message + } + } + override fun clearNameError() { loginFormNameLayout.error = null } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedPresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedPresenter.kt index 2cd788b03..1e49e5d8b 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedPresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedPresenter.kt @@ -24,14 +24,47 @@ class LoginAdvancedPresenter @Inject constructor( view.run { initView() showOnlyScrapperModeInputs() - loginErrorHandler.onBadCredentials = { - setErrorPassIncorrect() - showSoftKeyboard() - Timber.i("Entered wrong username or password") + with(loginErrorHandler) { + onBadCredentials = ::onBadCredentials + onInvalidToken = ::onInvalidToken + onInvalidSymbol = ::onInvalidSymbol + onInvalidPin = ::onInvalidPin } } } + private fun onBadCredentials() { + view?.run { + setErrorPassIncorrect() + showSoftKeyboard() + Timber.i("Entered wrong username or password") + } + } + + private fun onInvalidToken(message: String) { + view?.run { + setErrorTokenInvalid(message) + showSoftKeyboard() + Timber.i("Entered invalid token") + } + } + + private fun onInvalidSymbol(message: String) { + view?.run { + setErrorSymbolInvalid(message) + showSoftKeyboard() + Timber.i("Entered invalid symbol") + } + } + + private fun onInvalidPin(message: String) { + view?.run { + setErrorPinInvalid(message) + showSoftKeyboard() + Timber.i("Entered invalid PIN") + } + } + fun onHostSelected() { view?.apply { clearPassError() diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedView.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedView.kt index ea48d6464..85a85a331 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedView.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/login/advanced/LoginAdvancedView.kt @@ -53,10 +53,16 @@ interface LoginAdvancedView : BaseView { fun setErrorPinRequired() + fun setErrorPinInvalid(message: String) + fun setErrorSymbolRequired() + fun setErrorSymbolInvalid(message: String) + fun setErrorTokenRequired() + fun setErrorTokenInvalid(message: String) + fun showOnlyHybridModeInputs() fun showOnlyScrapperModeInputs() diff --git a/app/src/main/res/layout/fragment_login_advanced.xml b/app/src/main/res/layout/fragment_login_advanced.xml index 094e37d15..15e0904b6 100644 --- a/app/src/main/res/layout/fragment_login_advanced.xml +++ b/app/src/main/res/layout/fragment_login_advanced.xml @@ -188,8 +188,6 @@ android:id="@+id/loginFormToken" android:layout_width="match_parent" android:layout_height="wrap_content" - android:imeActionLabel="@string/login_sign_in" - android:imeOptions="actionDone" android:inputType="textCapCharacters" android:maxLines="1" /> diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index a88a42a79..dd61f7df4 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -36,6 +36,10 @@ Zaloguj To hasło jest za krótkie Dane logowania są niepoprawne + Nieprawidłowy PIN + Nieprawidłowy token + Token stracił ważność + Niepoprawny symbol Nie znaleziono ucznia. Sprawdź symbol To pole jest wymagane Wybrany uczeń jest już zalogowany diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 439bf19d6..e260a4161 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -36,6 +36,10 @@ Sign in This password is too short Login details are incorrect + Invalid PIN + Invalid token + Token expired + Invalid symbol Student not found. Check the symbol This field is required The selected student is already logged in From a45c7bd3e34129e2c24f955df402a82e857b5c63 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2019 22:04:35 +0000 Subject: [PATCH 03/12] Bump dagger from 2.25.3 to 2.25.4 (#632) --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index f6c2f9ba5..a9bfb29dc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -112,7 +112,7 @@ play { ext { work_manager = "2.3.0-beta02" room = "2.2.3" - dagger = "2.25.3" + dagger = "2.25.4" chucker = "2.0.4" mockk = "1.9.2" } From 8a6ceeb2e4520f68d794b3b31ef0694c95af5ec8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2020 19:42:15 +0000 Subject: [PATCH 04/12] Bump aboutlibraries from 7.0.4 to 7.1.0 (#633) --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index a9bfb29dc..fe8e0c040 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -174,7 +174,7 @@ dependencies { implementation "com.jakewharton.timber:timber:4.7.1" implementation "at.favre.lib:slf4j-timber:1.0.1" implementation "com.squareup.okhttp3:logging-interceptor:3.12.6" - implementation "com.mikepenz:aboutlibraries:7.0.4" + implementation "com.mikepenz:aboutlibraries-core:7.1.0" implementation 'com.wdullaer:materialdatetimepicker:4.2.3' playImplementation "com.google.firebase:firebase-core:17.2.1" From b9378c24b5356eb232b351936e26df190c0463a0 Mon Sep 17 00:00:00 2001 From: pcktm <13273420+pcktm@users.noreply.github.com> Date: Fri, 3 Jan 2020 21:12:05 +0100 Subject: [PATCH 05/12] Minor translation changes (#630) --- README.en.md | 12 ++++++------ README.md | 10 +++++----- app/src/main/res/values-pl/strings.xml | 4 ++-- app/src/main/res/values/preferences_values.xml | 2 +- app/src/main/res/values/strings.xml | 18 +++++++++--------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/README.en.md b/README.en.md index 4da00e5dd..7444cccae 100644 --- a/README.en.md +++ b/README.en.md @@ -7,11 +7,11 @@ [![F-Droid](https://img.shields.io/f-droid/v/io.github.wulkanowy.svg?style=flat-square)](https://f-droid.org/packages/io.github.wulkanowy/) [![Last release](https://img.shields.io/github/release/wulkanowy/wulkanowy.svg?logo=github&style=flat-square)](https://github.com/wulkanowy/wulkanowy/releases) -Unofficial android VULCAN UONET+ register client for student and parent +Unofficial android VULCAN UONET+ register client for both students and their parents ## Features -* logging in using the email and password +* logging in using the email and password OR using token and pin * functions from the register website: * grades * grade statistics @@ -24,7 +24,7 @@ Unofficial android VULCAN UONET+ register client for student and parent * homework * notes * lucky number -* calculation of the average +* calculation of the average independently of school's preferences * notifications, e.g. about a new grade * dark and black (AMOLED) theme * offline mode @@ -32,16 +32,16 @@ Unofficial android VULCAN UONET+ register client for student and parent ## Download -You can download the current beta from the Google Play or Fdroid store +You can download the current beta version from the Google Play or the F-Droid store [Get it on Google Play](https://play.google.com/store/apps/details?id=io.github.wulkanowy) [Get it on Fdroid](https://f-droid.org/packages/io.github.wulkanowy/) -You can also download a [development version](https://wulkanowy.github.io/#download) that includes new features prepared for the next release +You can also download a [development version](https://wulkanowy.github.io/#download) that includes new features being prepared for the next release ## Built With diff --git a/README.md b/README.md index d51115d5e..61b13444a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Nieoficjalny klient dziennika VULCAN UONET+ dla ucznia i rodzica ## Funkcje -* logowanie za pomocą e-maila i hasła +* logowanie za pomocą e-maila i hasła LUB tokena i pinu * funkcje ze strony internetowej dziennika: * oceny * statystyki ocen @@ -24,7 +24,7 @@ Nieoficjalny klient dziennika VULCAN UONET+ dla ucznia i rodzica * zadania domowe * uwagi * szczęśliwy numerek -* obliczanie średniej +* obliczanie średniej niezależnie od preferencji szkoły * powiadomienia np. o nowej ocenie * ciemny i czarny (AMOLED) motyw * tryb offilne @@ -32,13 +32,13 @@ Nieoficjalny klient dziennika VULCAN UONET+ dla ucznia i rodzica ## Pobierz -Aktualną wersję beta możesz pobrać ze sklepu Google Play lub Fdroid +Aktualną wersję beta możesz pobrać ze sklepu Google Play lub F-Droid [Pobierz z Google Play](https://play.google.com/store/apps/details?id=io.github.wulkanowy) [Pobierz z Fdroid](https://f-droid.org/packages/io.github.wulkanowy/) @@ -59,4 +59,4 @@ Wnieś swój wkład w projekt, tworząc PR lub wysyłając issue na GitHub. ## Licencja -Ten projekt jest licencjonowany w ramach Apache License 2.0 - szczegóły w pliku [LICENSE](LICENSE) \ No newline at end of file +Ten projekt udostępniany jest na licencji Apache License 2.0 - szczegóły w pliku [LICENSE](LICENSE) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index dd61f7df4..cedb224bb 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -359,8 +359,8 @@ Brak połączenia z internetem - Zbyt długie oczekiwanie na połączenie z dziennikiem - Logowanie nie powiodło się. Spróbuj ponownie lub zrestartuj aplikację + Upłynął limit czasu na połączenie z dziennikiem + Logowanie nie powiodło się. Zrestartuj aplikację i spróbuj ponownie Dziennik jest niedostępny. Spróbuj ponownie później Wystąpił nieoczekiwany błąd Funkcja wyłączona przez szkołę diff --git a/app/src/main/res/values/preferences_values.xml b/app/src/main/res/values/preferences_values.xml index 05210fd22..ee54d53c6 100644 --- a/app/src/main/res/values/preferences_values.xml +++ b/app/src/main/res/values/preferences_values.xml @@ -83,7 +83,7 @@ - Average grades from the 2nd semester + Average of grades only from the 2nd semester Average of grades from the whole year diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e260a4161..7d568b9b7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -27,14 +27,14 @@ Password Register Mobile API - Scrapper + Scraper Hybrid Token PIN API key Symbol Sign in - This password is too short + Password too short Login details are incorrect Invalid PIN Invalid token @@ -42,7 +42,7 @@ Invalid symbol Student not found. Check the symbol This field is required - The selected student is already logged in + Selected student is already logged in The symbol can be found on the register page in Uczeń -> Dostęp Mobilny -> Zarejestruj urządzenie mobilne Select students to log in to the application Other options @@ -210,7 +210,7 @@ Mobile devices No devices - Unregister + Deregister Device removed QR code Token @@ -243,7 +243,7 @@ Add account Logout - Do you want to log out of an active student? + Do you want to log out of this student account? Student logout @@ -309,7 +309,7 @@ Synchronization Automatic update - Suspended on holiday + Suspended on holidays Updates interval Wi-Fi only @@ -340,9 +340,9 @@ No internet connection - Too long waiting time for connection to the register - Login is failed. Try again or restart the app - The log is not available. Try again later + Connection to the register timed out + Login failed. Restart the app and try again + The service is not available. Try again later An unexpected error occurred Feature disabled by your school Feature not available in this mode From f204264d2da69c1ca5a9a373c5927d3df8ef995c Mon Sep 17 00:00:00 2001 From: Dominik Korsa Date: Sat, 4 Jan 2020 01:46:43 +0100 Subject: [PATCH 06/12] Change grade header note to unread count (#634) --- .../modules/grade/details/GradeDetailsHeader.kt | 1 + .../res/drawable/background_header_note.xml | 5 +++++ .../main/res/layout/header_grade_details.xml | 17 +++++++++++------ 3 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 app/src/main/res/drawable/background_header_note.xml diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/details/GradeDetailsHeader.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/details/GradeDetailsHeader.kt index e5f6e8249..9ed412808 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/details/GradeDetailsHeader.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/details/GradeDetailsHeader.kt @@ -38,6 +38,7 @@ class GradeDetailsHeader( gradeHeaderAverage.text = average gradeHeaderNumber.text = number gradeHeaderNote.visibility = if (newGrades > 0) VISIBLE else GONE + if (newGrades > 0) gradeHeaderNote.text = newGrades.toString(10) gradeHeaderContainer.isEnabled = isExpandable isViewExpandable = isExpandable diff --git a/app/src/main/res/drawable/background_header_note.xml b/app/src/main/res/drawable/background_header_note.xml new file mode 100644 index 000000000..b6555847b --- /dev/null +++ b/app/src/main/res/drawable/background_header_note.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/header_grade_details.xml b/app/src/main/res/layout/header_grade_details.xml index 40f486cf5..0fa3872e1 100644 --- a/app/src/main/res/layout/header_grade_details.xml +++ b/app/src/main/res/layout/header_grade_details.xml @@ -7,7 +7,7 @@ android:background="?selectableItemBackground" android:paddingLeft="16dp" android:paddingTop="10dp" - android:paddingRight="12dp" + android:paddingRight="14dp" android:paddingBottom="10dp" tools:context=".ui.modules.grade.details.GradeDetailsHeader" android:paddingEnd="12dp" @@ -50,14 +50,19 @@ android:textSize="12sp" tools:text="12 grades" /> - + android:background="@drawable/background_header_note" + android:textColor="?colorOnPrimary" + android:textSize="14sp" + tools:text="255" /> From e0657eb5b2375b1c1ccf6a7da4493b5e45565060 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2020 22:48:37 +0000 Subject: [PATCH 07/12] Bump work_manager from 2.3.0-beta02 to 2.3.0-rc01 (#638) --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index fe8e0c040..f5a95068d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -110,7 +110,7 @@ play { } ext { - work_manager = "2.3.0-beta02" + work_manager = "2.3.0-rc01" room = "2.2.3" dagger = "2.25.4" chucker = "2.0.4" From 70166d024502e676605c5213b8ca4fbfd22b7551 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2020 22:50:35 +0000 Subject: [PATCH 08/12] Bump fragment-ktx from 1.2.0-rc04 to 1.2.0-rc05 (#639) --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index f5a95068d..3b9514014 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -129,7 +129,7 @@ dependencies { implementation "androidx.activity:activity-ktx:1.1.0-rc03" implementation "androidx.appcompat:appcompat:1.1.0" implementation "androidx.appcompat:appcompat-resources:1.1.0" - implementation "androidx.fragment:fragment-ktx:1.2.0-rc04" + implementation "androidx.fragment:fragment-ktx:1.2.0-rc05" implementation "androidx.annotation:annotation:1.1.0" implementation "androidx.multidex:multidex:2.0.1" From 69a8e35150a2d954178e682184400925a094c28b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2020 23:05:59 +0000 Subject: [PATCH 09/12] Bump logging-interceptor from 3.12.6 to 3.12.7 (#641) --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 3b9514014..4ef02ffc2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -173,7 +173,7 @@ dependencies { implementation "com.jakewharton.threetenabp:threetenabp:1.2.1" implementation "com.jakewharton.timber:timber:4.7.1" implementation "at.favre.lib:slf4j-timber:1.0.1" - implementation "com.squareup.okhttp3:logging-interceptor:3.12.6" + implementation "com.squareup.okhttp3:logging-interceptor:3.12.7" implementation "com.mikepenz:aboutlibraries-core:7.1.0" implementation 'com.wdullaer:materialdatetimepicker:4.2.3' From 15184550f4b153b3bdba4aa895ab1f6a8c5a8a6c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2020 23:25:02 +0000 Subject: [PATCH 10/12] Bump junit from 4.12 to 4.13 (#640) --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 4ef02ffc2..cb252e66e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -185,7 +185,7 @@ dependencies { debugImplementation "fr.o80.chucker:library:$chucker" debugImplementation "com.amitshekhar.android:debug-db:1.0.6" - testImplementation "junit:junit:4.12" + testImplementation "junit:junit:4.13" testImplementation "io.mockk:mockk:$mockk" testImplementation "org.threeten:threetenbp:1.4.0" testImplementation "org.mockito:mockito-inline:3.2.4" From d706c000b92743c39b54b83448ee501cf0d79658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Thu, 9 Jan 2020 00:42:16 +0100 Subject: [PATCH 11/12] Add missing translations (#642) --- app/src/main/res/values-pl/strings.xml | 4 ++-- app/src/main/res/values-ru/strings.xml | 15 +++++++++++++++ app/src/main/res/values/strings.xml | 7 ++++--- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index cedb224bb..a000ad695 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -28,7 +28,7 @@ Dziennik Symbol Mobilne API - Scrapper + Scraper Hybrydowe Token PIN @@ -360,7 +360,7 @@ Brak połączenia z internetem Upłynął limit czasu na połączenie z dziennikiem - Logowanie nie powiodło się. Zrestartuj aplikację i spróbuj ponownie + Logowanie nie powiodło się. Spróbuj ponownie lub zrestartuj aplikację Dziennik jest niedostępny. Spróbuj ponownie później Wystąpił nieoczekiwany błąd Funkcja wyłączona przez szkołę diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 28f4831dc..53430b664 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -28,15 +28,26 @@ Электронная почта или имя пользователя Пароль Дневник + Мобильный API + Scraper + Гибрид + Token + PIN + клавиша API Symbol Войти Слишком короткий пароль Указаны неверные данные + Недействительный PIN + Недействительный token + Токен просрочен + Недействительный symbol Не удалось найти ученика. Пожалуйста, проверьте \"symbol\" Это поле обязательно Данный ученик уже авторизован Вы можете найти \"symbol\" в Uczeń -> Dostęp Mobilny -> Zarejestruj urządzenie mobilne Выберите учеников для авторизации в приложении + Другие варианты Политика приватности Проблемы с авторизацией? Свяжитесь с нами! Электронная почта @@ -261,6 +272,8 @@ Версия приложения Сообщить о ошибке Отправить сообщение о ошибке через электронную почту + FAQ + Читайте часто задаваемые вопросы Сервер Discord Присоединиться к сообществу приложения Политика приватности @@ -277,6 +290,7 @@ Содержание + Снова Описание Нет описания Учитель @@ -349,5 +363,6 @@ Дневник недоступен. Попробуйте позже Произошла неожиданная ошибка Функция была выключена школой + Функция не доступна в этом режиме diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7d568b9b7..72b9a5d4f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -243,7 +243,7 @@ Add account Logout - Do you want to log out of this student account? + Do you want to log out of an active student? Student logout @@ -341,9 +341,10 @@ No internet connection Connection to the register timed out - Login failed. Restart the app and try again - The service is not available. Try again later + Login failed. Try again or restart the app + The register is not available. Try again later An unexpected error occurred Feature disabled by your school Feature not available in this mode + From 2b5b87fe84d0a3fdbddec9b8c59ecd5fbcb8cb26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Thu, 9 Jan 2020 00:53:32 +0100 Subject: [PATCH 12/12] Version 0.14.1 --- .travis.yml | 2 +- app/build.gradle | 6 +++--- app/src/main/play/release-notes/pl-PL/default.txt | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index d6d0cb03a..d37308816 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ cache: branches: only: - develop - - 0.14.0 + - 0.14.1 android: licenses: diff --git a/app/build.gradle b/app/build.gradle index cb252e66e..452ddfb67 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,8 +17,8 @@ android { testApplicationId "io.github.tests.wulkanowy" minSdkVersion 16 targetSdkVersion 29 - versionCode 49 - versionName "0.14.0" + versionCode 50 + versionName "0.14.1" multiDexEnabled true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true @@ -122,7 +122,7 @@ configurations.all { } dependencies { - implementation "io.github.wulkanowy:sdk:0886d71" + implementation "io.github.wulkanowy:sdk:0.14.1" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "androidx.core:core-ktx:1.2.0-rc01" diff --git a/app/src/main/play/release-notes/pl-PL/default.txt b/app/src/main/play/release-notes/pl-PL/default.txt index e028c2c45..47c30e792 100644 --- a/app/src/main/play/release-notes/pl-PL/default.txt +++ b/app/src/main/play/release-notes/pl-PL/default.txt @@ -1,7 +1,8 @@ -Wersja 0.14.0 +Wersja 0.14.1 -- dodane zostały nowe opcje logowania, m.in. logowanie przez token -- naprawione zostało wyświetlanie nauczyciela, kiedy zastępstwo zostanie usunięte z danej lekcji -- naprawiony został biały ekran w szczęśliwym numerku +- naprawiliśmy logowanie użytkownikom, którzy mieli przypisanych do konta uczniów ze szkół z wyłączonymi dziennikami +- naprawiliśmy problemy z wysyłaniem wiadomości i odświeżaniem ocen spowodowanych ostatnią aktualizacją +- dodaliśmy informację o liczbie nieprzeczytanych ocen w nagłówku przedmiotu +- ulepszyliśmy informacje o błędach przy logowaniu w trybie mobilnym Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases