From 1b1f2ae3bb06bf30bd32a44abb26f89e44940a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Mon, 11 Feb 2019 02:04:24 +0100 Subject: [PATCH] Split login form for two fragments (#230) --- .idea/codeStyles/Project.xml | 1 - app/build.gradle | 18 ++- .../io/github/wulkanowy/data/ApiHelper.kt | 2 +- .../wulkanowy/data/db/entities/Student.kt | 3 +- .../data/repositories/StudentRepository.kt | 10 +- .../data/repositories/remote/GradeRemote.kt | 4 +- .../data/repositories/remote/StudentRemote.kt | 16 +-- .../java/io/github/wulkanowy/di/AppModule.kt | 7 ++ .../ui/modules/about/AboutPresenter.kt | 4 +- .../modules/attendance/AttendancePresenter.kt | 2 +- .../summary/AttendanceSummaryPresenter.kt | 2 +- .../ui/modules/exam/ExamPresenter.kt | 2 +- .../ui/modules/grade/GradePresenter.kt | 2 +- .../grade/details/GradeDetailsPresenter.kt | 2 +- .../grade/summary/GradeSummaryPresenter.kt | 2 +- .../ui/modules/homework/HomeworkPresenter.kt | 2 +- .../ui/modules/login/LoginActivity.kt | 38 ++++--- .../wulkanowy/ui/modules/login/LoginModule.kt | 13 ++- .../ui/modules/login/LoginPresenter.kt | 44 ++++++-- .../wulkanowy/ui/modules/login/LoginView.kt | 9 +- .../modules/login/form/LoginFormFragment.kt | 92 +++++---------- .../modules/login/form/LoginFormPresenter.kt | 45 ++------ .../ui/modules/login/form/LoginFormView.kt | 19 +--- .../LoginStudentSelectFragment.kt} | 33 ++++-- .../LoginStudentSelectItem.kt} | 6 +- .../LoginStudentSelectPresenter.kt} | 37 +++--- .../LoginStudentSelectView.kt} | 6 +- .../login/symbol/LoginSymbolFragment.kt | 106 ++++++++++++++++++ .../login/symbol/LoginSymbolPresenter.kt | 82 ++++++++++++++ .../modules/login/symbol/LoginSymbolView.kt | 25 +++++ .../luckynumber/LuckyNumberPresenter.kt | 3 +- .../ui/modules/main/MainPresenter.kt | 4 +- .../preview/MessagePreviewPresenter.kt | 4 +- .../message/tab/MessageTabPresenter.kt | 2 +- .../ui/modules/note/NotePresenter.kt | 2 +- .../ui/modules/settings/SettingsPresenter.kt | 2 +- .../modules/timetable/TimetablePresenter.kt | 2 +- .../timetable/TimetableWidgetProvider.kt | 2 +- .../utils/FirebaseAnalyticsHelper.kt | 12 +- .../main/res/layout/fragment_login_form.xml | 89 +++++---------- ....xml => fragment_login_student_select.xml} | 9 +- .../main/res/layout/fragment_login_symbol.xml | 88 +++++++++++++++ .../repositories/remote/StudentRemoteTest.kt | 6 +- .../ui/modules/login/LoginPresenterTest.kt | 22 +--- .../login/form/LoginFormPresenterTest.kt | 41 ++----- .../LoginStudentSelectPresenterTest.kt} | 48 +++----- build.gradle | 5 +- 47 files changed, 597 insertions(+), 378 deletions(-) rename app/src/main/java/io/github/wulkanowy/ui/modules/login/{options/LoginOptionsFragment.kt => studentselect/LoginStudentSelectFragment.kt} (68%) rename app/src/main/java/io/github/wulkanowy/ui/modules/login/{options/LoginOptionsItem.kt => studentselect/LoginStudentSelectItem.kt} (87%) rename app/src/main/java/io/github/wulkanowy/ui/modules/login/{options/LoginOptionsPresenter.kt => studentselect/LoginStudentSelectPresenter.kt} (68%) rename app/src/main/java/io/github/wulkanowy/ui/modules/login/{options/LoginOptionsView.kt => studentselect/LoginStudentSelectView.kt} (56%) create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolFragment.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolPresenter.kt create mode 100644 app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolView.kt rename app/src/main/res/layout/{fragment_login_options.xml => fragment_login_student_select.xml} (83%) create mode 100644 app/src/main/res/layout/fragment_login_symbol.xml rename app/src/test/java/io/github/wulkanowy/ui/modules/login/{options/LoginOptionsPresenterTest.kt => studentselect/LoginStudentSelectPresenterTest.kt} (57%) diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index eb4efba7..0c64df61 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -19,7 +19,6 @@