Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
20d9313257 | |||
8476f0e62e | |||
a174ae998d | |||
c5bab52fa2 | |||
e6d60e670e | |||
c0ddd82e03 | |||
28f1430be0 | |||
840b21a213 |
@ -23,8 +23,8 @@ android {
|
||||
testApplicationId "io.github.tests.wulkanowy"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 28
|
||||
versionCode 22
|
||||
versionName "0.6.3"
|
||||
versionCode 23
|
||||
versionName "0.6.4"
|
||||
multiDexEnabled true
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
@ -80,7 +80,7 @@ play {
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||
implementation('io.github.wulkanowy:api:0.6.3') { exclude module: "threetenbp" }
|
||||
implementation('io.github.wulkanowy:api:0.6.4') { exclude module: "threetenbp" }
|
||||
|
||||
implementation "androidx.legacy:legacy-support-v4:1.0.0"
|
||||
implementation "androidx.appcompat:appcompat:1.0.2"
|
||||
@ -92,9 +92,9 @@ dependencies {
|
||||
implementation "com.mikepenz:aboutlibraries:6.2.0"
|
||||
implementation "com.firebase:firebase-jobdispatcher:0.8.5"
|
||||
|
||||
implementation "com.google.dagger:dagger-android-support:2.19"
|
||||
kapt "com.google.dagger:dagger-compiler:2.19"
|
||||
kapt "com.google.dagger:dagger-android-processor:2.19"
|
||||
implementation "com.google.dagger:dagger-android-support:2.21"
|
||||
kapt "com.google.dagger:dagger-compiler:2.21"
|
||||
kapt "com.google.dagger:dagger-android-processor:2.21"
|
||||
|
||||
implementation "androidx.room:room-runtime:2.1.0-alpha03"
|
||||
implementation "androidx.room:room-rxjava2:2.1.0-alpha03"
|
||||
@ -103,14 +103,14 @@ dependencies {
|
||||
implementation "eu.davidea:flexible-adapter:5.1.0"
|
||||
implementation "eu.davidea:flexible-adapter-ui:1.0.0"
|
||||
|
||||
implementation "com.aurelhubert:ahbottomnavigation:2.2.0"
|
||||
implementation 'com.ncapdevi:frag-nav:3.0.0'
|
||||
implementation "com.aurelhubert:ahbottomnavigation:2.3.4"
|
||||
implementation 'com.ncapdevi:frag-nav:3.1.0'
|
||||
|
||||
implementation 'com.github.pwittchen:reactivenetwork-rx2:3.0.1'
|
||||
implementation 'com.github.pwittchen:reactivenetwork-rx2:3.0.2'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
|
||||
implementation "io.reactivex.rxjava2:rxjava:2.2.4"
|
||||
implementation "io.reactivex.rxjava2:rxjava:2.2.5"
|
||||
|
||||
implementation "com.jakewharton.threetenabp:threetenabp:1.1.0"
|
||||
implementation "com.jakewharton.threetenabp:threetenabp:1.1.1"
|
||||
|
||||
implementation "com.jakewharton.timber:timber:4.7.1"
|
||||
implementation "at.favre.lib:slf4j-timber:1.0.1"
|
||||
@ -124,7 +124,7 @@ dependencies {
|
||||
debugImplementation "com.amitshekhar.android:debug-db:1.0.4"
|
||||
|
||||
testImplementation "junit:junit:4.12"
|
||||
testImplementation "io.mockk:mockk:1.8.13.kotlin13"
|
||||
testImplementation "io.mockk:mockk:1.9"
|
||||
testImplementation "org.mockito:mockito-inline:2.23.4"
|
||||
testImplementation 'org.threeten:threetenbp:1.3.8'
|
||||
|
||||
|
@ -2,6 +2,7 @@ package io.github.wulkanowy.data.repositories
|
||||
|
||||
import com.github.pwittchen.reactivenetwork.library.rx2.ReactiveNetwork
|
||||
import com.github.pwittchen.reactivenetwork.library.rx2.internet.observing.InternetObservingSettings
|
||||
import io.github.wulkanowy.data.ApiHelper
|
||||
import io.github.wulkanowy.data.db.entities.Message
|
||||
import io.github.wulkanowy.data.db.entities.Student
|
||||
import io.github.wulkanowy.data.repositories.local.MessagesLocal
|
||||
@ -16,7 +17,8 @@ import javax.inject.Singleton
|
||||
class MessagesRepository @Inject constructor(
|
||||
private val settings: InternetObservingSettings,
|
||||
private val local: MessagesLocal,
|
||||
private val remote: MessagesRemote
|
||||
private val remote: MessagesRemote,
|
||||
private val apiHelper: ApiHelper
|
||||
) {
|
||||
|
||||
enum class MessageFolder(val id: Int = 1) {
|
||||
@ -25,44 +27,50 @@ class MessagesRepository @Inject constructor(
|
||||
TRASHED(3)
|
||||
}
|
||||
|
||||
fun getMessages(studentId: Int, folder: MessageFolder, forceRefresh: Boolean = false, notify: Boolean = false): Single<List<Message>> {
|
||||
return local.getMessages(studentId, folder).filter { !forceRefresh }
|
||||
.switchIfEmpty(ReactiveNetwork.checkInternetConnectivity(settings)
|
||||
.flatMap {
|
||||
if (it) remote.getMessages(studentId, folder)
|
||||
else Single.error(UnknownHostException())
|
||||
}.flatMap { new ->
|
||||
local.getMessages(studentId, folder).toSingle(emptyList())
|
||||
.doOnSuccess { old ->
|
||||
local.deleteMessages(old - new)
|
||||
local.saveMessages((new - old)
|
||||
.onEach {
|
||||
it.isNotified = !notify
|
||||
})
|
||||
}
|
||||
}.flatMap { local.getMessages(studentId, folder).toSingle(emptyList()) }
|
||||
)
|
||||
fun getMessages(student: Student, folder: MessageFolder, forceRefresh: Boolean = false, notify: Boolean = false): Single<List<Message>> {
|
||||
return Single.just(apiHelper.initApi(student))
|
||||
.flatMap { _ ->
|
||||
local.getMessages(student.studentId, folder).filter { !forceRefresh }
|
||||
.switchIfEmpty(ReactiveNetwork.checkInternetConnectivity(settings)
|
||||
.flatMap {
|
||||
if (it) remote.getMessages(student.studentId, folder)
|
||||
else Single.error(UnknownHostException())
|
||||
}.flatMap { new ->
|
||||
local.getMessages(student.studentId, folder).toSingle(emptyList())
|
||||
.doOnSuccess { old ->
|
||||
local.deleteMessages(old - new)
|
||||
local.saveMessages((new - old)
|
||||
.onEach {
|
||||
it.isNotified = !notify
|
||||
})
|
||||
}
|
||||
}.flatMap { local.getMessages(student.studentId, folder).toSingle(emptyList()) }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun getMessage(studentId: Int, messageId: Int, markAsRead: Boolean = false): Single<Message> {
|
||||
return local.getMessage(studentId, messageId)
|
||||
.filter { !it.content.isNullOrEmpty() }
|
||||
.switchIfEmpty(ReactiveNetwork.checkInternetConnectivity(settings)
|
||||
.flatMap {
|
||||
if (it) local.getMessage(studentId, messageId).toSingle()
|
||||
else Single.error(UnknownHostException())
|
||||
}
|
||||
.flatMap { dbMessage ->
|
||||
remote.getMessagesContent(dbMessage, markAsRead).doOnSuccess {
|
||||
local.updateMessage(dbMessage.copy(unread = false).apply {
|
||||
id = dbMessage.id
|
||||
content = it
|
||||
})
|
||||
}
|
||||
}.flatMap {
|
||||
local.getMessage(studentId, messageId).toSingle()
|
||||
}
|
||||
)
|
||||
fun getMessage(student: Student, messageId: Int, markAsRead: Boolean = false): Single<Message> {
|
||||
return Single.just(apiHelper.initApi(student))
|
||||
.flatMap { _ ->
|
||||
local.getMessage(student.studentId, messageId)
|
||||
.filter { !it.content.isNullOrEmpty() }
|
||||
.switchIfEmpty(ReactiveNetwork.checkInternetConnectivity(settings)
|
||||
.flatMap {
|
||||
if (it) local.getMessage(student.studentId, messageId).toSingle()
|
||||
else Single.error(UnknownHostException())
|
||||
}
|
||||
.flatMap { dbMessage ->
|
||||
remote.getMessagesContent(dbMessage, markAsRead).doOnSuccess {
|
||||
local.updateMessage(dbMessage.copy(unread = false).apply {
|
||||
id = dbMessage.id
|
||||
content = it
|
||||
})
|
||||
}
|
||||
}.flatMap {
|
||||
local.getMessage(student.studentId, messageId).toSingle()
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun getNewMessages(student: Student): Single<List<Message>> {
|
||||
|
@ -84,19 +84,19 @@ class SyncWorker : SimpleJobService() {
|
||||
var error: Throwable? = null
|
||||
|
||||
disposable.add(student.getCurrentStudent()
|
||||
.flatMap { semester.getCurrentSemester(it, true) }
|
||||
.flatMap { semester.getCurrentSemester(it, true).map { semester -> semester to it } }
|
||||
.flatMapPublisher {
|
||||
Single.merge(
|
||||
listOf(
|
||||
gradesDetails.getGrades(it, true, true),
|
||||
gradesSummary.getGradesSummary(it, true),
|
||||
attendance.getAttendance(it, start, end, true),
|
||||
exam.getExams(it, start, end, true),
|
||||
timetable.getTimetable(it, start, end, true),
|
||||
message.getMessages(it.studentId, RECEIVED, true, true),
|
||||
note.getNotes(it, true, true),
|
||||
homework.getHomework(it, LocalDate.now(), true),
|
||||
homework.getHomework(it, LocalDate.now().plusDays(1), true)
|
||||
gradesDetails.getGrades(it.first, true, true),
|
||||
gradesSummary.getGradesSummary(it.first, true),
|
||||
attendance.getAttendance(it.first, start, end, true),
|
||||
exam.getExams(it.first, start, end, true),
|
||||
timetable.getTimetable(it.first, start, end, true),
|
||||
message.getMessages(it.second, RECEIVED, true, true),
|
||||
note.getNotes(it.first, true, true),
|
||||
homework.getHomework(it.first, LocalDate.now(), true),
|
||||
homework.getHomework(it.first, LocalDate.now().plusDays(1), true)
|
||||
)
|
||||
)
|
||||
}
|
||||
@ -138,7 +138,7 @@ class SyncWorker : SimpleJobService() {
|
||||
disposable.add(student.getCurrentStudent()
|
||||
.flatMap { message.getNewMessages(it) }
|
||||
.map { it.filter { message -> !message.isNotified } }
|
||||
.doOnSuccess{
|
||||
.doOnSuccess {
|
||||
if (it.isNotEmpty()) {
|
||||
Timber.d("Found ${it.size} unread messages")
|
||||
MessageNotification(applicationContext).sendNotification(it)
|
||||
|
@ -15,6 +15,11 @@ class AboutPresenter @Inject constructor(
|
||||
private val analytics: FirebaseAnalyticsHelper
|
||||
) : BasePresenter<AboutView>(errorHandler) {
|
||||
|
||||
override fun onAttachView(view: AboutView) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("About view is attached")
|
||||
}
|
||||
|
||||
fun onExtraSelect(type: Libs.SpecialButton?) {
|
||||
view?.run {
|
||||
when (type) {
|
||||
|
@ -6,6 +6,7 @@ import io.github.wulkanowy.ui.base.BasePresenter
|
||||
import io.github.wulkanowy.ui.base.ErrorHandler
|
||||
import io.github.wulkanowy.utils.SchedulersProvider
|
||||
import io.reactivex.Single
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
class AccountPresenter @Inject constructor(
|
||||
@ -16,19 +17,23 @@ class AccountPresenter @Inject constructor(
|
||||
|
||||
override fun onAttachView(view: AccountView) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("Account dialog is attached")
|
||||
view.initView()
|
||||
loadData()
|
||||
}
|
||||
|
||||
fun onAddSelected() {
|
||||
Timber.i("Select add account")
|
||||
view?.openLoginView()
|
||||
}
|
||||
|
||||
fun onRemoveSelected() {
|
||||
Timber.i("Select remove account")
|
||||
view?.showConfirmDialog()
|
||||
}
|
||||
|
||||
fun onLogoutConfirm() {
|
||||
Timber.i("Attempt to logout current user ")
|
||||
disposable.add(studentRepository.getCurrentStudent()
|
||||
.flatMapCompletable { studentRepository.logoutStudent(it) }
|
||||
.andThen(studentRepository.getSavedStudents(false))
|
||||
@ -41,31 +46,54 @@ class AccountPresenter @Inject constructor(
|
||||
.doFinally { view?.dismissView() }
|
||||
.subscribe({
|
||||
view?.apply {
|
||||
if (it.isEmpty()) openClearLoginView()
|
||||
else recreateView()
|
||||
if (it.isEmpty()) {
|
||||
Timber.i("Logout result: Open login view")
|
||||
openClearLoginView()
|
||||
} else {
|
||||
Timber.i("Logout result: Switch to another student")
|
||||
recreateView()
|
||||
}
|
||||
}
|
||||
}, { errorHandler.dispatch(it) }))
|
||||
}, {
|
||||
Timber.i("Logout result: An exception occurred")
|
||||
errorHandler.dispatch(it)
|
||||
}))
|
||||
}
|
||||
|
||||
fun onItemSelected(item: AbstractFlexibleItem<*>) {
|
||||
if (item is AccountItem) {
|
||||
Timber.i("Select student item ${item.student.id}")
|
||||
if (item.student.isCurrent) {
|
||||
view?.dismissView()
|
||||
} else {
|
||||
Timber.i("Attempt to change a student")
|
||||
disposable.add(studentRepository.switchStudent(item.student)
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
.observeOn(schedulers.mainThread)
|
||||
.subscribe({ view?.recreateView() }, { errorHandler.dispatch(it) }))
|
||||
.subscribe({
|
||||
Timber.i("Change a student result: Success")
|
||||
view?.recreateView()
|
||||
}, {
|
||||
Timber.i("Change a student result: An exception occurred")
|
||||
errorHandler.dispatch(it)
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadData() {
|
||||
Timber.i("Loading account data started")
|
||||
disposable.add(studentRepository.getSavedStudents(false)
|
||||
.map { it.map { item -> AccountItem(item) } }
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
.observeOn(schedulers.mainThread)
|
||||
.subscribe({ view?.updateData(it) }, { errorHandler.dispatch(it) }))
|
||||
.subscribe({
|
||||
Timber.i("Loading account result: Success")
|
||||
view?.updateData(it)
|
||||
}, {
|
||||
Timber.i("Loading account result: An exception occurred")
|
||||
errorHandler.dispatch(it)
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ class AttendanceFragment : BaseSessionFragment(), AttendanceView, MainView.MainC
|
||||
}
|
||||
|
||||
override fun showAttendanceDialog(lesson: Attendance) {
|
||||
AttendanceDialog.newInstance(lesson).show(fragmentManager, lesson.toString())
|
||||
(activity as? MainActivity)?.showDialogFragment(AttendanceDialog.newInstance(lesson))
|
||||
}
|
||||
|
||||
override fun openSummaryView() {
|
||||
|
@ -18,6 +18,7 @@ import io.github.wulkanowy.utils.toFormattedString
|
||||
import org.threeten.bp.LocalDate
|
||||
import org.threeten.bp.LocalDate.now
|
||||
import org.threeten.bp.LocalDate.ofEpochDay
|
||||
import timber.log.Timber
|
||||
import java.util.concurrent.TimeUnit.MILLISECONDS
|
||||
import javax.inject.Inject
|
||||
|
||||
@ -36,6 +37,7 @@ class AttendancePresenter @Inject constructor(
|
||||
|
||||
fun onAttachView(view: AttendanceView, date: Long?) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("Attendance view is attached")
|
||||
view.initView()
|
||||
loadData(ofEpochDay(date ?: now().previousOrSameSchoolDay.toEpochDay()))
|
||||
reloadView()
|
||||
@ -52,10 +54,12 @@ class AttendancePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onSwipeRefresh() {
|
||||
Timber.i("Force refreshing the attendance")
|
||||
loadData(currentDate, true)
|
||||
}
|
||||
|
||||
fun onViewReselected() {
|
||||
Timber.i("Attendance view is reselected")
|
||||
view?.also { view ->
|
||||
if (view.currentStackSize == 1) {
|
||||
now().previousOrSameSchoolDay.also {
|
||||
@ -69,7 +73,10 @@ class AttendancePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onAttendanceItemSelected(item: AbstractFlexibleItem<*>?) {
|
||||
if (item is AttendanceItem) view?.showAttendanceDialog(item.attendance)
|
||||
if (item is AttendanceItem) {
|
||||
Timber.i("Select attendance item ${item.attendance.id}")
|
||||
view?.showAttendanceDialog(item.attendance)
|
||||
}
|
||||
}
|
||||
|
||||
fun onSummarySwitchSelected(): Boolean {
|
||||
@ -78,6 +85,7 @@ class AttendancePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun loadData(date: LocalDate, forceRefresh: Boolean = false) {
|
||||
Timber.i("Loading attendance data started")
|
||||
currentDate = date
|
||||
disposable.apply {
|
||||
clear()
|
||||
@ -100,6 +108,7 @@ class AttendancePresenter @Inject constructor(
|
||||
}
|
||||
}
|
||||
.subscribe({
|
||||
Timber.i("Loading attendance result: Success")
|
||||
view?.apply {
|
||||
updateData(it)
|
||||
showEmpty(it.isEmpty())
|
||||
@ -107,6 +116,7 @@ class AttendancePresenter @Inject constructor(
|
||||
}
|
||||
analytics.logEvent("load_attendance", mapOf("items" to it.size, "force_refresh" to forceRefresh, START_DATE to currentDate.toFormattedString("yyyy-MM-dd")))
|
||||
}) {
|
||||
Timber.i("Loading attendance result: An exception occurred")
|
||||
view?.run { showEmpty(isViewEmpty) }
|
||||
errorHandler.dispatch(it)
|
||||
}
|
||||
@ -115,6 +125,7 @@ class AttendancePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun reloadView() {
|
||||
Timber.i("Reload attendance view with the date ${currentDate.toFormattedString()}")
|
||||
view?.apply {
|
||||
showProgress(true)
|
||||
showContent(false)
|
||||
|
@ -12,6 +12,7 @@ import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
||||
import io.github.wulkanowy.utils.SchedulersProvider
|
||||
import io.github.wulkanowy.utils.calculatePercentage
|
||||
import io.github.wulkanowy.utils.getFormattedName
|
||||
import timber.log.Timber
|
||||
import java.lang.String.format
|
||||
import java.util.Locale.FRANCE
|
||||
import java.util.concurrent.TimeUnit.MILLISECONDS
|
||||
@ -34,25 +35,31 @@ class AttendanceSummaryPresenter @Inject constructor(
|
||||
|
||||
fun onAttachView(view: AttendanceSummaryView, subjectId: Int?) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("Attendance summary view is attached with subject id ${subjectId ?: -1}")
|
||||
view.initView()
|
||||
loadData(subjectId ?: -1)
|
||||
loadSubjects()
|
||||
}
|
||||
|
||||
fun onSwipeRefresh() {
|
||||
Timber.i("Force refreshing the attendance summary")
|
||||
loadData(currentSubjectId, true)
|
||||
}
|
||||
|
||||
fun onSubjectSelected(name: String) {
|
||||
Timber.i("Select attendance summary subject $name")
|
||||
view?.run {
|
||||
showContent(false)
|
||||
showProgress(true)
|
||||
clearView()
|
||||
}
|
||||
loadData(subjects.singleOrNull { it.name == name }?.realId ?: -1)
|
||||
(subjects.singleOrNull { it.name == name }?.realId ?: -1).let {
|
||||
if (it != currentSubjectId) loadData(it)
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadData(subjectId: Int, forceRefresh: Boolean = false) {
|
||||
Timber.i("Loading attendance summary data started")
|
||||
currentSubjectId = subjectId
|
||||
disposable.apply {
|
||||
clear()
|
||||
@ -70,6 +77,7 @@ class AttendanceSummaryPresenter @Inject constructor(
|
||||
}
|
||||
}
|
||||
.subscribe({
|
||||
Timber.i("Loading attendance summary result: Success")
|
||||
view?.apply {
|
||||
showEmpty(it.first.isEmpty())
|
||||
showContent(it.first.isNotEmpty())
|
||||
@ -77,6 +85,7 @@ class AttendanceSummaryPresenter @Inject constructor(
|
||||
}
|
||||
analytics.logEvent("load_attendance_summary", mapOf("items" to it.first.size, "force_refresh" to forceRefresh, "item_id" to subjectId))
|
||||
}) {
|
||||
Timber.i("Loading attendance summary result: An exception occurred")
|
||||
view?.run { showEmpty(isViewEmpty) }
|
||||
errorHandler.dispatch(it)
|
||||
}
|
||||
@ -85,6 +94,7 @@ class AttendanceSummaryPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun loadSubjects() {
|
||||
Timber.i("Loading attendance summary subjects started")
|
||||
disposable.add(studentRepository.getCurrentStudent()
|
||||
.flatMap { semesterRepository.getCurrentSemester(it) }
|
||||
.flatMap { subjectRepository.getSubjects(it) }
|
||||
@ -93,11 +103,15 @@ class AttendanceSummaryPresenter @Inject constructor(
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
.observeOn(schedulers.mainThread)
|
||||
.subscribe({
|
||||
Timber.i("Loading attendance summary subjects result: Success")
|
||||
view?.run {
|
||||
view?.updateSubjects(it)
|
||||
showSubjects(true)
|
||||
}
|
||||
}, { errorHandler.dispatch(it) })
|
||||
}, {
|
||||
Timber.i("Loading attendance summary subjects result: An exception occurred")
|
||||
errorHandler.dispatch(it)
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
||||
import io.github.wulkanowy.R
|
||||
import io.github.wulkanowy.data.db.entities.Exam
|
||||
import io.github.wulkanowy.ui.base.session.BaseSessionFragment
|
||||
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||
import io.github.wulkanowy.ui.modules.main.MainView
|
||||
import io.github.wulkanowy.utils.setOnItemClickListener
|
||||
import kotlinx.android.synthetic.main.fragment_exam.*
|
||||
@ -106,7 +107,7 @@ class ExamFragment : BaseSessionFragment(), ExamView, MainView.MainChildView, Ma
|
||||
}
|
||||
|
||||
override fun showExamDialog(exam: Exam) {
|
||||
ExamDialog.newInstance(exam).show(fragmentManager, exam.toString())
|
||||
(activity as? MainActivity)?.showDialogFragment(ExamDialog.newInstance(exam))
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
|
@ -18,6 +18,7 @@ import io.github.wulkanowy.utils.toFormattedString
|
||||
import org.threeten.bp.LocalDate
|
||||
import org.threeten.bp.LocalDate.now
|
||||
import org.threeten.bp.LocalDate.ofEpochDay
|
||||
import timber.log.Timber
|
||||
import java.util.concurrent.TimeUnit.MILLISECONDS
|
||||
import javax.inject.Inject
|
||||
|
||||
@ -35,6 +36,7 @@ class ExamPresenter @Inject constructor(
|
||||
|
||||
fun onAttachView(view: ExamView, date: Long?) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("Exam view is attached")
|
||||
view.initView()
|
||||
loadData(ofEpochDay(date ?: now().nextOrSameSchoolDay.toEpochDay()))
|
||||
reloadView()
|
||||
@ -51,14 +53,19 @@ class ExamPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onSwipeRefresh() {
|
||||
Timber.i("Force refreshing the exam")
|
||||
loadData(currentDate, true)
|
||||
}
|
||||
|
||||
fun onExamItemSelected(item: AbstractFlexibleItem<*>?) {
|
||||
if (item is ExamItem) view?.showExamDialog(item.exam)
|
||||
if (item is ExamItem) {
|
||||
Timber.i("Select exam item ${item.exam.id}")
|
||||
view?.showExamDialog(item.exam)
|
||||
}
|
||||
}
|
||||
|
||||
fun onViewReselected() {
|
||||
Timber.i("Exam view is reselected")
|
||||
now().nextOrSameSchoolDay.also {
|
||||
if (currentDate != it) {
|
||||
loadData(it)
|
||||
@ -68,6 +75,7 @@ class ExamPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun loadData(date: LocalDate, forceRefresh: Boolean = false) {
|
||||
Timber.i("Loading exam data started")
|
||||
currentDate = date
|
||||
disposable.apply {
|
||||
clear()
|
||||
@ -87,6 +95,7 @@ class ExamPresenter @Inject constructor(
|
||||
}
|
||||
}
|
||||
.subscribe({
|
||||
Timber.i("Loading exam result: Success")
|
||||
view?.apply {
|
||||
updateData(it)
|
||||
showEmpty(it.isEmpty())
|
||||
@ -94,6 +103,7 @@ class ExamPresenter @Inject constructor(
|
||||
}
|
||||
analytics.logEvent("load_exam", mapOf("items" to it.size, "force_refresh" to forceRefresh, START_DATE to currentDate.toFormattedString("yyyy-MM-dd")))
|
||||
}) {
|
||||
Timber.i("Loading exam result: An exception occurred")
|
||||
view?.run { showEmpty(isViewEmpty) }
|
||||
errorHandler.dispatch(it)
|
||||
})
|
||||
@ -109,6 +119,7 @@ class ExamPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun reloadView() {
|
||||
Timber.i("Reload exam view with the date ${currentDate.toFormattedString()}")
|
||||
view?.apply {
|
||||
showProgress(true)
|
||||
showContent(false)
|
||||
|
@ -8,6 +8,7 @@ import io.github.wulkanowy.ui.base.session.SessionErrorHandler
|
||||
import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
||||
import io.github.wulkanowy.utils.SchedulersProvider
|
||||
import io.reactivex.Completable
|
||||
import timber.log.Timber
|
||||
import java.util.concurrent.TimeUnit.MILLISECONDS
|
||||
import javax.inject.Inject
|
||||
|
||||
@ -28,6 +29,7 @@ class GradePresenter @Inject constructor(
|
||||
|
||||
fun onAttachView(view: GradeView, savedIndex: Int?) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("Grade view is attached")
|
||||
disposable.add(Completable.timer(150, MILLISECONDS, schedulers.mainThread)
|
||||
.subscribe {
|
||||
selectedIndex = savedIndex ?: 0
|
||||
@ -37,6 +39,7 @@ class GradePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onViewReselected() {
|
||||
Timber.i("Grade view is reselected")
|
||||
view?.run { notifyChildParentReselected(currentPageIndex) }
|
||||
}
|
||||
|
||||
@ -47,6 +50,7 @@ class GradePresenter @Inject constructor(
|
||||
|
||||
fun onSemesterSelected(index: Int) {
|
||||
if (selectedIndex != index - 1) {
|
||||
Timber.i("Change semester in grade view to ${index + 1}")
|
||||
selectedIndex = index + 1
|
||||
loadedSemesterId.clear()
|
||||
view?.let {
|
||||
@ -74,6 +78,7 @@ class GradePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun loadData() {
|
||||
Timber.i("Loading grade data started")
|
||||
disposable.add(studentRepository.getCurrentStudent()
|
||||
.flatMap { semesterRepository.getSemesters(it) }
|
||||
.doOnSuccess {
|
||||
@ -84,7 +89,13 @@ class GradePresenter @Inject constructor(
|
||||
}
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
.observeOn(schedulers.mainThread)
|
||||
.subscribe({ view?.run { loadChild(currentPageIndex) } }) {
|
||||
.subscribe({
|
||||
view?.run {
|
||||
Timber.i("Loading grade result: Attempt load index $currentPageIndex")
|
||||
loadChild(currentPageIndex)
|
||||
}
|
||||
}) {
|
||||
Timber.i("Loading grade result: An exception occurred")
|
||||
errorHandler.dispatch(it)
|
||||
view?.run {
|
||||
showProgress(false)
|
||||
@ -96,6 +107,7 @@ class GradePresenter @Inject constructor(
|
||||
private fun loadChild(index: Int, forceRefresh: Boolean = false) {
|
||||
semesters.first { it.semesterName == selectedIndex }.semesterId.also {
|
||||
if (forceRefresh || loadedSemesterId[index] != it) {
|
||||
Timber.i("Load grade child view index: $index")
|
||||
view?.notifyChildLoadData(index, it, forceRefresh)
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ import io.github.wulkanowy.data.db.entities.Grade
|
||||
import io.github.wulkanowy.ui.base.session.BaseSessionFragment
|
||||
import io.github.wulkanowy.ui.modules.grade.GradeFragment
|
||||
import io.github.wulkanowy.ui.modules.grade.GradeView
|
||||
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||
import io.github.wulkanowy.utils.setOnItemClickListener
|
||||
import kotlinx.android.synthetic.main.fragment_grade_details.*
|
||||
import javax.inject.Inject
|
||||
@ -131,7 +132,7 @@ class GradeDetailsFragment : BaseSessionFragment(), GradeDetailsView, GradeView.
|
||||
}
|
||||
|
||||
override fun showGradeDialog(grade: Grade) {
|
||||
GradeDetailsDialog.newInstance(grade).show(fragmentManager, grade.toString())
|
||||
(activity as? MainActivity)?.showDialogFragment(GradeDetailsDialog.newInstance(grade))
|
||||
}
|
||||
|
||||
override fun onParentLoadData(semesterId: Int, forceRefresh: Boolean) {
|
||||
|
@ -40,6 +40,7 @@ class GradeDetailsPresenter @Inject constructor(
|
||||
|
||||
fun onGradeItemSelected(item: AbstractFlexibleItem<*>?) {
|
||||
if (item is GradeDetailsItem) {
|
||||
Timber.i("Select grade item ${item.grade.id}")
|
||||
view?.apply {
|
||||
showGradeDialog(item.grade)
|
||||
if (!item.grade.isRead) {
|
||||
@ -58,18 +59,29 @@ class GradeDetailsPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onMarkAsReadSelected(): Boolean {
|
||||
Timber.i("Select mark grades as read")
|
||||
disposable.add(studentRepository.getCurrentStudent()
|
||||
.flatMap { semesterRepository.getSemesters(it) }
|
||||
.flatMap { gradeRepository.getNewGrades(it.first { item -> item.semesterId == currentSemesterId }) }
|
||||
.map { it.map { grade -> grade.apply { isRead = true } } }
|
||||
.flatMapCompletable { gradeRepository.updateGrades(it) }
|
||||
.flatMapCompletable {
|
||||
Timber.i("Mark as read ${it.size} grades")
|
||||
gradeRepository.updateGrades(it)
|
||||
}
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
.observeOn(schedulers.mainThread)
|
||||
.subscribe({ loadData(currentSemesterId, false) }, { errorHandler.dispatch(it) }))
|
||||
.subscribe({
|
||||
Timber.i("Mark as read result: Success")
|
||||
loadData(currentSemesterId, false)
|
||||
}, {
|
||||
Timber.i("Mark as read result: An exception occurred")
|
||||
errorHandler.dispatch(it)
|
||||
}))
|
||||
return true
|
||||
}
|
||||
|
||||
fun onSwipeRefresh() {
|
||||
Timber.i("Force refreshing the grade details")
|
||||
view?.notifyParentRefresh()
|
||||
}
|
||||
|
||||
@ -94,6 +106,7 @@ class GradeDetailsPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun loadData(semesterId: Int, forceRefresh: Boolean) {
|
||||
Timber.i("Loading grade details data started")
|
||||
disposable.add(studentRepository.getCurrentStudent()
|
||||
.flatMap { semesterRepository.getSemesters(it) }
|
||||
.flatMap { gradeRepository.getGrades(it.first { item -> item.semesterId == semesterId }, forceRefresh) }
|
||||
@ -110,6 +123,7 @@ class GradeDetailsPresenter @Inject constructor(
|
||||
}
|
||||
}
|
||||
.subscribe({
|
||||
Timber.i("Loading grade details result: Success")
|
||||
view?.run {
|
||||
showEmpty(it.isEmpty())
|
||||
showContent(it.isNotEmpty())
|
||||
@ -117,6 +131,7 @@ class GradeDetailsPresenter @Inject constructor(
|
||||
}
|
||||
analytics.logEvent("load_grade_details", mapOf("items" to it.size, "force_refresh" to forceRefresh))
|
||||
}) {
|
||||
Timber.i("Loading grade details result: An exception occurred")
|
||||
view?.run { showEmpty(isViewEmpty) }
|
||||
errorHandler.dispatch(it)
|
||||
})
|
||||
@ -152,10 +167,14 @@ class GradeDetailsPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun updateGrade(grade: Grade) {
|
||||
Timber.i("Attempt to update grade ${grade.id}")
|
||||
disposable.add(gradeRepository.updateGrade(grade)
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
.observeOn(schedulers.mainThread)
|
||||
.subscribe({}) { error -> errorHandler.dispatch(error) })
|
||||
Timber.d("Grade ${grade.id} updated")
|
||||
.subscribe({ Timber.i("Update grade result: Success") })
|
||||
{ error ->
|
||||
Timber.i("Update grade result: An exception occurred")
|
||||
errorHandler.dispatch(error)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
||||
import io.github.wulkanowy.utils.SchedulersProvider
|
||||
import io.github.wulkanowy.utils.calcAverage
|
||||
import io.github.wulkanowy.utils.changeModifier
|
||||
import timber.log.Timber
|
||||
import java.lang.String.format
|
||||
import java.util.Locale.FRANCE
|
||||
import javax.inject.Inject
|
||||
@ -33,6 +34,7 @@ class GradeSummaryPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onParentViewLoadData(semesterId: Int, forceRefresh: Boolean) {
|
||||
Timber.i("Loading grade summary data started")
|
||||
disposable.add(studentRepository.getCurrentStudent()
|
||||
.flatMap { semesterRepository.getSemesters(it) }
|
||||
.map { semester -> semester.first { it.semesterId == semesterId } }
|
||||
@ -64,6 +66,7 @@ class GradeSummaryPresenter @Inject constructor(
|
||||
notifyParentDataLoaded(semesterId)
|
||||
}
|
||||
}.subscribe({
|
||||
Timber.i("Loading grade summary result: Success")
|
||||
view?.run {
|
||||
showEmpty(it.first.isEmpty())
|
||||
showContent(it.first.isNotEmpty())
|
||||
@ -71,12 +74,14 @@ class GradeSummaryPresenter @Inject constructor(
|
||||
}
|
||||
analytics.logEvent("load_grade_summary", mapOf("items" to it.first.size, "force_refresh" to forceRefresh))
|
||||
}) {
|
||||
Timber.i("Loading grade summary result: An exception occurred")
|
||||
view?.run { showEmpty(isViewEmpty) }
|
||||
errorHandler.dispatch(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun onSwipeRefresh() {
|
||||
Timber.i("Force refreshing the grade summary")
|
||||
view?.notifyParentRefresh()
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
||||
import io.github.wulkanowy.R
|
||||
import io.github.wulkanowy.data.db.entities.Homework
|
||||
import io.github.wulkanowy.ui.base.session.BaseSessionFragment
|
||||
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||
import io.github.wulkanowy.ui.modules.main.MainView
|
||||
import io.github.wulkanowy.utils.setOnItemClickListener
|
||||
import kotlinx.android.synthetic.main.fragment_homework.*
|
||||
@ -95,7 +96,7 @@ class HomeworkFragment : BaseSessionFragment(), HomeworkView, MainView.TitledVie
|
||||
}
|
||||
|
||||
override fun showTimetableDialog(homework: Homework) {
|
||||
HomeworkDialog.newInstance(homework).show(fragmentManager, homework.toString())
|
||||
(activity as? MainActivity)?.showDialogFragment(HomeworkDialog.newInstance(homework))
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
|
@ -15,6 +15,7 @@ import io.github.wulkanowy.utils.nextSchoolDay
|
||||
import io.github.wulkanowy.utils.previousSchoolDay
|
||||
import io.github.wulkanowy.utils.toFormattedString
|
||||
import org.threeten.bp.LocalDate
|
||||
import timber.log.Timber
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Inject
|
||||
|
||||
@ -32,6 +33,7 @@ class HomeworkPresenter @Inject constructor(
|
||||
|
||||
fun onAttachView(view: HomeworkView, date: Long?) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("Homework view is attached")
|
||||
view.initView()
|
||||
loadData(LocalDate.ofEpochDay(date ?: LocalDate.now().nextOrSameSchoolDay.toEpochDay()))
|
||||
reloadView()
|
||||
@ -48,14 +50,19 @@ class HomeworkPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onSwipeRefresh() {
|
||||
Timber.i("Force refreshing the homework")
|
||||
loadData(currentDate, true)
|
||||
}
|
||||
|
||||
fun onHomeworkItemSelected(item: AbstractFlexibleItem<*>?) {
|
||||
if (item is HomeworkItem) view?.showTimetableDialog(item.homework)
|
||||
if (item is HomeworkItem) {
|
||||
Timber.i("Select homework item ${item.homework.id}")
|
||||
view?.showTimetableDialog(item.homework)
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadData(date: LocalDate, forceRefresh: Boolean = false) {
|
||||
Timber.i("Loading homework data started")
|
||||
currentDate = date
|
||||
disposable.apply {
|
||||
clear()
|
||||
@ -73,6 +80,7 @@ class HomeworkPresenter @Inject constructor(
|
||||
}
|
||||
}
|
||||
.subscribe({
|
||||
Timber.i("Loading homework result: Success")
|
||||
view?.apply {
|
||||
updateData(it)
|
||||
showEmpty(it.isEmpty())
|
||||
@ -80,6 +88,7 @@ class HomeworkPresenter @Inject constructor(
|
||||
}
|
||||
analytics.logEvent("load_homework", mapOf("items" to it.size, "force_refresh" to forceRefresh, START_DATE to currentDate.toFormattedString("yyyy-MM-dd")))
|
||||
}) {
|
||||
Timber.i("Loading homework result: An exception occurred")
|
||||
view?.run { showEmpty(isViewEmpty()) }
|
||||
errorHandler.dispatch(it)
|
||||
})
|
||||
@ -87,6 +96,7 @@ class HomeworkPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun reloadView() {
|
||||
Timber.i("Reload homework view with the date ${currentDate.toFormattedString()}")
|
||||
view?.apply {
|
||||
showProgress(true)
|
||||
showContent(false)
|
||||
|
@ -2,6 +2,7 @@ package io.github.wulkanowy.ui.modules.login
|
||||
|
||||
import io.github.wulkanowy.ui.base.BasePresenter
|
||||
import io.github.wulkanowy.ui.base.ErrorHandler
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
class LoginPresenter @Inject constructor(errorHandler: ErrorHandler) : BasePresenter<LoginView>(errorHandler) {
|
||||
@ -12,6 +13,7 @@ class LoginPresenter @Inject constructor(errorHandler: ErrorHandler) : BasePrese
|
||||
initAdapter()
|
||||
hideActionBar()
|
||||
}
|
||||
Timber.i("Login view is attached")
|
||||
}
|
||||
|
||||
fun onPageSelected(index: Int) {
|
||||
@ -23,6 +25,7 @@ class LoginPresenter @Inject constructor(errorHandler: ErrorHandler) : BasePrese
|
||||
}
|
||||
|
||||
fun onBackPressed(default: () -> Unit) {
|
||||
Timber.i("Back pressed in login view")
|
||||
view?.run {
|
||||
if (currentViewIndex == 1) {
|
||||
switchView(0)
|
||||
|
@ -45,6 +45,7 @@ class LoginFormPresenter @Inject constructor(
|
||||
showProgress(true)
|
||||
showContent(false)
|
||||
}
|
||||
Timber.i("Login started")
|
||||
}
|
||||
.doFinally {
|
||||
view?.apply {
|
||||
@ -58,17 +59,21 @@ class LoginFormPresenter @Inject constructor(
|
||||
showSymbolInput()
|
||||
wasEmpty = true
|
||||
analytics.logEvent("sign_up_send", mapOf(SUCCESS to false, "students" to 0, "endpoint" to endpoint, GROUP_ID to symbol.ifEmpty { "null" }))
|
||||
Timber.i("Login result: Empty student list")
|
||||
} else if (it.isEmpty() && wasEmpty) {
|
||||
showSymbolInput()
|
||||
setErrorSymbolIncorrect()
|
||||
analytics.logEvent("sign_up_send", mapOf(SUCCESS to false, "students" to it.size, "endpoint" to endpoint, GROUP_ID to symbol.ifEmpty { "nil" }))
|
||||
analytics.logEvent("sign_up_send", mapOf(SUCCESS to false, "students" to it.size, "endpoint" to endpoint, GROUP_ID to symbol.ifEmpty { "null" }))
|
||||
Timber.i("Login result: Wrong symbol")
|
||||
} else {
|
||||
analytics.logEvent("sign_up_send", mapOf(SUCCESS to true, "students" to it.size, "endpoint" to endpoint, GROUP_ID to symbol))
|
||||
Timber.i("Login result: Success")
|
||||
switchOptionsView()
|
||||
}
|
||||
}
|
||||
}, {
|
||||
analytics.logEvent(SIGN_UP, mapOf(SUCCESS to false, "endpoint" to endpoint, "message" to it.localizedMessage, GROUP_ID to symbol.ifEmpty { "nil" }))
|
||||
analytics.logEvent(SIGN_UP, mapOf(SUCCESS to false, "endpoint" to endpoint, "message" to it.localizedMessage, GROUP_ID to symbol.ifEmpty { "null" }))
|
||||
Timber.i("Login result: An exception occurred")
|
||||
errorHandler.dispatch(it)
|
||||
}))
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import io.github.wulkanowy.ui.modules.login.LoginErrorHandler
|
||||
import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
||||
import io.github.wulkanowy.utils.SchedulersProvider
|
||||
import io.reactivex.Single
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
class LoginOptionsPresenter @Inject constructor(
|
||||
@ -26,7 +27,10 @@ class LoginOptionsPresenter @Inject constructor(
|
||||
super.onAttachView(view)
|
||||
view.run {
|
||||
initView()
|
||||
errorHandler.onStudentDuplicate = { showMessage(it) }
|
||||
errorHandler.onStudentDuplicate = {
|
||||
showMessage(it)
|
||||
Timber.i("The student already registered in the app was selected")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,11 +62,14 @@ class LoginOptionsPresenter @Inject constructor(
|
||||
showContent(false)
|
||||
showActionBar(false)
|
||||
}
|
||||
Timber.i("Registration started")
|
||||
}
|
||||
.subscribe({
|
||||
analytics.logEvent(SIGN_UP, mapOf(SUCCESS to true, "endpoint" to student.endpoint, "message" to "Success", GROUP_ID to student.symbol))
|
||||
Timber.i("Registration result: Success")
|
||||
view?.openMainView()
|
||||
}, {
|
||||
Timber.i("Registration result: An exception occurred ")
|
||||
errorHandler.dispatch(it)
|
||||
view?.apply {
|
||||
showProgress(false)
|
||||
|
@ -7,6 +7,7 @@ import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.aurelhubert.ahbottomnavigation.AHBottomNavigation.TitleState.ALWAYS_SHOW
|
||||
import com.aurelhubert.ahbottomnavigation.AHBottomNavigationItem
|
||||
@ -70,7 +71,7 @@ class MainActivity : BaseActivity(), MainView {
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
presenter.onViewStart()
|
||||
presenter.onViewChange()
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
@ -97,7 +98,7 @@ class MainActivity : BaseActivity(), MainView {
|
||||
}
|
||||
|
||||
navController.run {
|
||||
setOnViewChangeListener { presenter.onViewStart() }
|
||||
setOnViewChangeListener { presenter.onViewChange() }
|
||||
fragmentHideStrategy = HIDE
|
||||
rootFragments = listOf(
|
||||
GradeFragment.newInstance(),
|
||||
@ -147,6 +148,10 @@ class MainActivity : BaseActivity(), MainView {
|
||||
(navController.currentStack?.get(0) as? MainView.MainChildView)?.onFragmentReselected()
|
||||
}
|
||||
|
||||
fun showDialogFragment(dialog: DialogFragment) {
|
||||
navController.showDialogFragment(dialog)
|
||||
}
|
||||
|
||||
fun pushView(fragment: Fragment) {
|
||||
navController.pushFragment(fragment)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import io.github.wulkanowy.ui.base.ErrorHandler
|
||||
import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
||||
import io.github.wulkanowy.utils.SchedulersProvider
|
||||
import io.reactivex.Completable
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
class MainPresenter @Inject constructor(
|
||||
@ -23,6 +24,7 @@ class MainPresenter @Inject constructor(
|
||||
|
||||
fun onAttachView(view: MainView, initMenuIndex: Int) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("Main view is attached with $initMenuIndex menu index")
|
||||
view.run {
|
||||
cancelNotifications()
|
||||
startMenuIndex = if (initMenuIndex != -1) initMenuIndex else prefRepository.startMenuIndex
|
||||
@ -38,7 +40,7 @@ class MainPresenter @Inject constructor(
|
||||
}))
|
||||
}
|
||||
|
||||
fun onViewStart() {
|
||||
fun onViewChange() {
|
||||
view?.apply {
|
||||
currentViewTitle?.let { setViewTitle(it) }
|
||||
currentStackSize?.let {
|
||||
@ -49,16 +51,19 @@ class MainPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onAccountManagerSelected(): Boolean {
|
||||
Timber.i("Select account manager")
|
||||
view?.showAccountPicker()
|
||||
return true
|
||||
}
|
||||
|
||||
fun onUpNavigate(): Boolean {
|
||||
Timber.i("Up navigate pressed")
|
||||
view?.popView()
|
||||
return true
|
||||
}
|
||||
|
||||
fun onBackPressed(default: () -> Unit) {
|
||||
Timber.i("Back pressed in main view")
|
||||
view?.run {
|
||||
if (isRootView) default()
|
||||
else popView()
|
||||
@ -67,6 +72,7 @@ class MainPresenter @Inject constructor(
|
||||
|
||||
fun onTabSelected(index: Int, wasSelected: Boolean): Boolean {
|
||||
return view?.run {
|
||||
Timber.i("Switch main tab index: $index, reselected: $wasSelected")
|
||||
if (wasSelected) {
|
||||
notifyMenuViewReselected()
|
||||
false
|
||||
@ -78,15 +84,25 @@ class MainPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onLoginSelected() {
|
||||
Timber.i("Attempt to switch the student after the session expires")
|
||||
disposable.add(studentRepository.getCurrentStudent(false)
|
||||
.flatMapCompletable { studentRepository.logoutStudent(it) }
|
||||
.andThen(studentRepository.getSavedStudents(false))
|
||||
.flatMapCompletable {
|
||||
if (it.isNotEmpty()) studentRepository.switchStudent(it[0])
|
||||
if (it.isNotEmpty()) {
|
||||
Timber.i("Switching current student")
|
||||
studentRepository.switchStudent(it[0])
|
||||
}
|
||||
else Completable.complete()
|
||||
}
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
.observeOn(schedulers.mainThread)
|
||||
.subscribe({ view?.openLoginView() }, { errorHandler.dispatch(it) }))
|
||||
.subscribe({
|
||||
Timber.i("Switch student result: Open login view")
|
||||
view?.openLoginView()
|
||||
}, {
|
||||
Timber.i("Switch student result: An exception occurred")
|
||||
errorHandler.dispatch(it)
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import io.github.wulkanowy.ui.base.BasePresenter
|
||||
import io.github.wulkanowy.ui.base.ErrorHandler
|
||||
import io.github.wulkanowy.utils.SchedulersProvider
|
||||
import io.reactivex.Completable
|
||||
import timber.log.Timber
|
||||
import java.util.concurrent.TimeUnit.MILLISECONDS
|
||||
import javax.inject.Inject
|
||||
|
||||
@ -14,6 +15,7 @@ class MessagePresenter @Inject constructor(
|
||||
|
||||
override fun onAttachView(view: MessageView) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("Message view is attached")
|
||||
disposable.add(Completable.timer(150, MILLISECONDS, schedulers.mainThread)
|
||||
.subscribe {
|
||||
view.initView()
|
||||
@ -30,6 +32,7 @@ class MessagePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun loadChild(index: Int, forceRefresh: Boolean = false) {
|
||||
Timber.i("Load message child view index: $index")
|
||||
view?.notifyChildLoadData(index, forceRefresh)
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import io.github.wulkanowy.ui.base.session.SessionErrorHandler
|
||||
import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
||||
import io.github.wulkanowy.utils.SchedulersProvider
|
||||
import io.github.wulkanowy.utils.toFormattedString
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
class MessagePreviewPresenter @Inject constructor(
|
||||
@ -26,15 +27,17 @@ class MessagePreviewPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun loadData(id: Int) {
|
||||
Timber.i("Loading message $id preview started")
|
||||
messageId = id
|
||||
disposable.apply {
|
||||
clear()
|
||||
add(studentRepository.getCurrentStudent()
|
||||
.flatMap { messagesRepository.getMessage(it.studentId, messageId, true) }
|
||||
.flatMap { messagesRepository.getMessage(it, messageId, true) }
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
.observeOn(schedulers.mainThread)
|
||||
.doFinally { view?.showProgress(false) }
|
||||
.subscribe({ message ->
|
||||
Timber.i("Loading message $id preview result: Success ")
|
||||
view?.run {
|
||||
message.let {
|
||||
setSubject(if (it.subject.isNotBlank()) it.subject else noSubjectString)
|
||||
@ -45,8 +48,9 @@ class MessagePreviewPresenter @Inject constructor(
|
||||
else setSender(it.sender)
|
||||
}
|
||||
}
|
||||
analytics.logEvent("load_attendance", mapOf(START_DATE to message.date?.toFormattedString("yyyy.MM.dd"), "lenght" to message.content?.length))
|
||||
analytics.logEvent("load_message_preview", mapOf(START_DATE to message.date?.toFormattedString("yyyy.MM.dd"), "lenght" to message.content?.length))
|
||||
}) {
|
||||
Timber.i("Loading message $id preview result: An excception occurred ")
|
||||
view?.showMessageError()
|
||||
errorHandler.dispatch(it)
|
||||
})
|
||||
|
@ -29,14 +29,16 @@ class MessageTabPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onSwipeRefresh() {
|
||||
Timber.i("Force refreshing the $folder message")
|
||||
onParentViewLoadData(true)
|
||||
}
|
||||
|
||||
fun onParentViewLoadData(forceRefresh: Boolean) {
|
||||
Timber.i("Loading $folder message data started")
|
||||
disposable.apply {
|
||||
clear()
|
||||
add(studentRepository.getCurrentStudent()
|
||||
.flatMap { messagesRepository.getMessages(it.studentId, folder, forceRefresh) }
|
||||
.flatMap { messagesRepository.getMessages(it, folder, forceRefresh) }
|
||||
.map { items -> items.map { MessageItem(it, view?.noSubjectString.orEmpty()) } }
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
.observeOn(schedulers.mainThread)
|
||||
@ -48,6 +50,7 @@ class MessageTabPresenter @Inject constructor(
|
||||
}
|
||||
}
|
||||
.subscribe({
|
||||
Timber.i("Loading $folder message result: Success")
|
||||
view?.run {
|
||||
showEmpty(it.isEmpty())
|
||||
showContent(it.isNotEmpty())
|
||||
@ -55,6 +58,7 @@ class MessageTabPresenter @Inject constructor(
|
||||
}
|
||||
analytics.logEvent("load_messages", mapOf("items" to it.size, "folder" to folder.name))
|
||||
}) {
|
||||
Timber.i("Loading $folder message result: An exception occurred")
|
||||
view?.run { showEmpty(isViewEmpty) }
|
||||
errorHandler.dispatch(it)
|
||||
})
|
||||
@ -63,6 +67,7 @@ class MessageTabPresenter @Inject constructor(
|
||||
|
||||
fun onMessageItemSelected(item: AbstractFlexibleItem<*>) {
|
||||
if (item is MessageItem) {
|
||||
Timber.i("Select message ${item.message.realId} item")
|
||||
view?.run {
|
||||
openMessage(item.message.realId)
|
||||
if (item.message.unread == true) {
|
||||
@ -75,12 +80,14 @@ class MessageTabPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun updateMessage(message: Message) {
|
||||
Timber.i("Attempt to update message ${message.realId}")
|
||||
disposable.add(messagesRepository.updateMessage(message)
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
.observeOn(schedulers.mainThread)
|
||||
.subscribe({
|
||||
Timber.d("Message ${message.realId} updated")
|
||||
}) { error -> errorHandler.dispatch(error) }
|
||||
)
|
||||
.subscribe({ Timber.d("Update message ${message.realId} result: Success") })
|
||||
{ error ->
|
||||
Timber.i("Update message ${message.realId} result: An exception occurred")
|
||||
errorHandler.dispatch(error)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -3,18 +3,21 @@ package io.github.wulkanowy.ui.modules.more
|
||||
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
||||
import io.github.wulkanowy.ui.base.BasePresenter
|
||||
import io.github.wulkanowy.ui.base.ErrorHandler
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
class MorePresenter @Inject constructor(errorHandler: ErrorHandler) : BasePresenter<MoreView>(errorHandler) {
|
||||
|
||||
override fun onAttachView(view: MoreView) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("More view is attached")
|
||||
view.initView()
|
||||
loadData()
|
||||
}
|
||||
|
||||
fun onItemSelected(item: AbstractFlexibleItem<*>?) {
|
||||
if (item is MoreItem) {
|
||||
Timber.i("Select more item \"${item.title}\"")
|
||||
view?.run {
|
||||
when (item.title) {
|
||||
messagesRes?.first -> openMessagesView()
|
||||
@ -28,10 +31,12 @@ class MorePresenter @Inject constructor(errorHandler: ErrorHandler) : BasePresen
|
||||
}
|
||||
|
||||
fun onViewReselected() {
|
||||
Timber.i("More view is reselected")
|
||||
view?.popView()
|
||||
}
|
||||
|
||||
private fun loadData() {
|
||||
Timber.i("Load items for more view")
|
||||
view?.run {
|
||||
updateData(listOfNotNull(
|
||||
messagesRes?.let { MoreItem(it.first, it.second) },
|
||||
|
@ -12,6 +12,7 @@ import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
||||
import io.github.wulkanowy.R
|
||||
import io.github.wulkanowy.data.db.entities.Note
|
||||
import io.github.wulkanowy.ui.base.session.BaseSessionFragment
|
||||
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||
import io.github.wulkanowy.ui.modules.main.MainView
|
||||
import io.github.wulkanowy.utils.setOnItemClickListener
|
||||
import kotlinx.android.synthetic.main.fragment_note.*
|
||||
@ -57,7 +58,7 @@ class NoteFragment : BaseSessionFragment(), NoteView, MainView.TitledView {
|
||||
}
|
||||
|
||||
override fun showNoteDialog(note: Note) {
|
||||
NoteDialog.newInstance(note).show(fragmentManager, note.toString())
|
||||
(activity as? MainActivity)?.showDialogFragment(NoteDialog.newInstance(note))
|
||||
}
|
||||
|
||||
override fun updateData(data: List<NoteItem>) {
|
||||
|
@ -46,11 +46,14 @@ class NoteItem(val note: Note) : AbstractFlexibleItem<NoteItem.ViewHolder>() {
|
||||
other as NoteItem
|
||||
|
||||
if (note != other.note) return false
|
||||
if (note.id != other.note.id) return false
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return note.hashCode()
|
||||
var result = note.hashCode()
|
||||
result = 31 * result + note.id.toInt()
|
||||
return result
|
||||
}
|
||||
|
||||
class ViewHolder(val view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter), LayoutContainer {
|
||||
|
@ -23,15 +23,18 @@ class NotePresenter @Inject constructor(
|
||||
|
||||
override fun onAttachView(view: NoteView) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("Note view is attached")
|
||||
view.initView()
|
||||
loadData()
|
||||
}
|
||||
|
||||
fun onSwipeRefresh() {
|
||||
Timber.i("Force refreshing the note")
|
||||
loadData(true)
|
||||
}
|
||||
|
||||
private fun loadData(forceRefresh: Boolean = false) {
|
||||
Timber.i("Loading note data started")
|
||||
disposable.add(studentRepository.getCurrentStudent()
|
||||
.flatMap { semesterRepository.getCurrentSemester(it) }
|
||||
.flatMap { noteRepository.getNotes(it, forceRefresh) }
|
||||
@ -45,6 +48,7 @@ class NotePresenter @Inject constructor(
|
||||
showProgress(false)
|
||||
}
|
||||
}.subscribe({
|
||||
Timber.i("Loading note result: Success")
|
||||
view?.apply {
|
||||
updateData(it)
|
||||
showEmpty(it.isEmpty())
|
||||
@ -52,6 +56,7 @@ class NotePresenter @Inject constructor(
|
||||
}
|
||||
analytics.logEvent("load_note", mapOf("items" to it.size, "force_refresh" to forceRefresh))
|
||||
}, {
|
||||
Timber.i("Loading note result: An exception occurred")
|
||||
view?.run { showEmpty(isViewEmpty) }
|
||||
errorHandler.dispatch(it)
|
||||
})
|
||||
@ -60,6 +65,7 @@ class NotePresenter @Inject constructor(
|
||||
|
||||
fun onNoteItemSelected(item: AbstractFlexibleItem<*>?) {
|
||||
if (item is NoteItem) {
|
||||
Timber.i("Select note item ${item.note.id}")
|
||||
view?.run {
|
||||
showNoteDialog(item.note)
|
||||
if (!item.note.isRead) {
|
||||
@ -72,12 +78,14 @@ class NotePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun updateNote(note: Note) {
|
||||
Timber.i("Attempt to update note ${note.id}")
|
||||
disposable.add(noteRepository.updateNote(note)
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
.observeOn(schedulers.mainThread)
|
||||
.subscribe({
|
||||
Timber.d("Note ${note.id} updated")
|
||||
}) { error -> errorHandler.dispatch(error) }
|
||||
)
|
||||
.subscribe({ Timber.i("Update note result: Success") })
|
||||
{ error ->
|
||||
Timber.i("Update note result: An exception occurred")
|
||||
errorHandler.dispatch(error)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package io.github.wulkanowy.ui.modules.settings
|
||||
|
||||
import com.readystatesoftware.chuck.api.ChuckCollector
|
||||
import io.github.wulkanowy.data.RepositoryModule_ProvideChuckCollectorFactory
|
||||
import io.github.wulkanowy.data.repositories.PreferencesRepository
|
||||
import io.github.wulkanowy.services.job.ServiceHelper
|
||||
import io.github.wulkanowy.ui.base.BasePresenter
|
||||
@ -9,6 +8,7 @@ import io.github.wulkanowy.ui.base.ErrorHandler
|
||||
import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
||||
import io.github.wulkanowy.utils.isHolidays
|
||||
import org.threeten.bp.LocalDate.now
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
class SettingsPresenter @Inject constructor(
|
||||
@ -21,6 +21,7 @@ class SettingsPresenter @Inject constructor(
|
||||
|
||||
override fun onAttachView(view: SettingsView) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("Settings view is attached")
|
||||
|
||||
view.run {
|
||||
setServicesSuspended(preferencesRepository.serviceEnablesKey, now().isHolidays)
|
||||
@ -28,6 +29,7 @@ class SettingsPresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onSharedPreferenceChanged(key: String) {
|
||||
Timber.i("Change settings $key")
|
||||
when (key) {
|
||||
preferencesRepository.serviceEnablesKey -> {
|
||||
if (preferencesRepository.isServiceEnabled) serviceHelper.startFullSyncService()
|
||||
@ -44,7 +46,6 @@ class SettingsPresenter @Inject constructor(
|
||||
chuckCollector.showNotification(preferencesRepository.isShowChuckerNotification)
|
||||
}
|
||||
}
|
||||
|
||||
analytics.logEvent("setting_changed", mapOf("name" to key))
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
||||
import io.github.wulkanowy.R
|
||||
import io.github.wulkanowy.data.db.entities.Timetable
|
||||
import io.github.wulkanowy.ui.base.session.BaseSessionFragment
|
||||
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||
import io.github.wulkanowy.ui.modules.main.MainView
|
||||
import io.github.wulkanowy.utils.setOnItemClickListener
|
||||
import kotlinx.android.synthetic.main.fragment_timetable.*
|
||||
@ -107,7 +108,7 @@ class TimetableFragment : BaseSessionFragment(), TimetableView, MainView.MainChi
|
||||
}
|
||||
|
||||
override fun showTimetableDialog(lesson: Timetable) {
|
||||
TimetableDialog.newInstance(lesson).show(fragmentManager, lesson.toString())
|
||||
(activity as? MainActivity)?.showDialogFragment(TimetableDialog.newInstance(lesson))
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
|
@ -17,6 +17,7 @@ import io.github.wulkanowy.utils.toFormattedString
|
||||
import org.threeten.bp.LocalDate
|
||||
import org.threeten.bp.LocalDate.now
|
||||
import org.threeten.bp.LocalDate.ofEpochDay
|
||||
import timber.log.Timber
|
||||
import java.util.concurrent.TimeUnit.MILLISECONDS
|
||||
import javax.inject.Inject
|
||||
|
||||
@ -34,6 +35,7 @@ class TimetablePresenter @Inject constructor(
|
||||
|
||||
fun onAttachView(view: TimetableView, date: Long?) {
|
||||
super.onAttachView(view)
|
||||
Timber.i("Timetable is attached")
|
||||
view.initView()
|
||||
loadData(ofEpochDay(date ?: now().nextOrSameSchoolDay.toEpochDay()))
|
||||
reloadView()
|
||||
@ -50,10 +52,12 @@ class TimetablePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onSwipeRefresh() {
|
||||
Timber.i("Force refreshing the timetable")
|
||||
loadData(currentDate, true)
|
||||
}
|
||||
|
||||
fun onViewReselected() {
|
||||
Timber.i("Exam view is reselected")
|
||||
now().nextOrSameSchoolDay.also {
|
||||
if (currentDate != it) {
|
||||
loadData(it)
|
||||
@ -63,10 +67,14 @@ class TimetablePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
fun onTimetableItemSelected(item: AbstractFlexibleItem<*>?) {
|
||||
if (item is TimetableItem) view?.showTimetableDialog(item.lesson)
|
||||
if (item is TimetableItem) {
|
||||
Timber.i("Select exam item ${item.lesson.id}")
|
||||
view?.showTimetableDialog(item.lesson)
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadData(date: LocalDate, forceRefresh: Boolean = false) {
|
||||
Timber.i("Loading timetable data started")
|
||||
currentDate = date
|
||||
disposable.apply {
|
||||
clear()
|
||||
@ -85,13 +93,15 @@ class TimetablePresenter @Inject constructor(
|
||||
}
|
||||
}
|
||||
.subscribe({
|
||||
Timber.i("Loading timetable result: Success")
|
||||
view?.apply {
|
||||
updateData(it)
|
||||
showEmpty(it.isEmpty())
|
||||
showContent(it.isNotEmpty())
|
||||
}
|
||||
analytics.logEvent("load_attendance", mapOf("items" to it.size, "force_refresh" to forceRefresh, START_DATE to currentDate.toFormattedString("yyyy-MM-dd")))
|
||||
analytics.logEvent("load_timetable", mapOf("items" to it.size, "force_refresh" to forceRefresh, START_DATE to currentDate.toFormattedString("yyyy-MM-dd")))
|
||||
}) {
|
||||
Timber.i("Loading timetable result: An exception occurred")
|
||||
view?.run { showEmpty(isViewEmpty) }
|
||||
errorHandler.dispatch(it)
|
||||
})
|
||||
@ -99,6 +109,7 @@ class TimetablePresenter @Inject constructor(
|
||||
}
|
||||
|
||||
private fun reloadView() {
|
||||
Timber.i("Reload timetable view with the date ${currentDate.toFormattedString()}")
|
||||
view?.apply {
|
||||
showProgress(true)
|
||||
showContent(false)
|
||||
|
@ -1,7 +1,10 @@
|
||||
Wersja 0.6.3
|
||||
Wersja 0.6.4
|
||||
|
||||
- naprawiono problem ze stabilnością przy odczytywaniu ocen
|
||||
- poprawiono komunikat o błędzie podczas przerwy technicznej dziennika
|
||||
- (ponownie) naprawiono logowanie w systemach Resman Rzeszów i podobnych
|
||||
- naprawiono problemy ze stabilnością podczas logowania na urządzeniach marki Meizu
|
||||
- naprawiono problemy ze stabilnością w uwagach
|
||||
- naprawiono błąd pobierania podglądu wiadomości, gdy otworzono aplikację z powiadomienia
|
||||
- zoptymalizowano pobieranie wiadomości wysłanych
|
||||
- poprawiono wyświetlanie odbiorców wiadomości wysłanych
|
||||
- naprawiono problem z liczeniem średniej z ocen zawierających minus
|
||||
|
||||
Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases/tag/0.6.3
|
||||
Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases/tag/0.6.4
|
||||
|
@ -69,7 +69,7 @@
|
||||
android:layout_marginBottom="15dp"
|
||||
android:hint="@string/login_nickname_hint">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/loginNicknameEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -84,7 +84,7 @@
|
||||
android:layout_marginBottom="15dp"
|
||||
android:hint="@string/login_password_hint">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/loginPassEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -91,7 +91,7 @@
|
||||
<string name="timetable_group">Group</string>
|
||||
<string name="timetable_time">Hours</string>
|
||||
<string name="timetable_changes">Changes</string>
|
||||
<string name="timetable_no_items">No lessons on this day</string>
|
||||
<string name="timetable_no_items">No lessons this day</string>
|
||||
|
||||
|
||||
<!--Attendance-->
|
||||
@ -115,7 +115,7 @@
|
||||
|
||||
|
||||
<!--Exam-->
|
||||
<string name="exam_no_items">No exams in this week</string>
|
||||
<string name="exam_no_items">No exams this week</string>
|
||||
<string name="exam_type">Type</string>
|
||||
<string name="exam_entry_date">Entry date</string>
|
||||
|
||||
|
@ -9,11 +9,11 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
classpath 'com.android.tools.build:gradle:3.3.0'
|
||||
classpath 'com.google.gms:google-services:4.2.0'
|
||||
classpath "io.fabric.tools:gradle:1.26.1"
|
||||
classpath "io.fabric.tools:gradle:1.27.0"
|
||||
classpath "com.github.triplet.gradle:play-publisher:1.2.2"
|
||||
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2"
|
||||
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7"
|
||||
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02'
|
||||
}
|
||||
}
|
||||
|
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,6 @@
|
||||
#Sun Jan 20 13:58:58 CET 2019
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
|
||||
|
Reference in New Issue
Block a user