From e5fc1e341264a43307f67aee6ca645d0873be68e Mon Sep 17 00:00:00 2001 From: ganfra Date: Sun, 28 Oct 2018 19:18:14 +0100 Subject: [PATCH] Introduce MvRx in the application + start managing UI --- .idea/caches/build_file_checksums.ser | Bin 653 -> 661 bytes .idea/gradle.xml | 2 +- app/build.gradle | 3 +- .../platform/CheckableConstraintLayout.kt | 45 ++++++++++ .../core/platform/RiotActivity.kt | 6 +- .../core/platform/RiotFragment.kt | 10 ++- .../riotredesign/core/platform/StateView.kt | 81 +++++++++++++++++ .../features/home/HomeActivity.kt | 20 ++++- .../riotredesign/features/home/HomeModule.kt | 16 ++++ .../features/home/HomeNavigator.kt | 7 ++ .../features/home/RoomListFragment.kt | 51 ----------- .../features/home/RoomSummaryController.kt | 21 ----- .../{ => detail}/EventDiffUtilCallback.kt | 2 +- .../home/detail/LoadingRoomDetailFragment.kt | 24 +++++ .../home/{ => detail}/RoomDetailFragment.kt | 2 +- .../home/{ => detail}/TimelineEventAdapter.kt | 2 +- .../{ => detail}/TimelineEventController.kt | 3 +- .../home/{ => detail}/TimelineEventItem.kt | 2 +- .../features/home/list/RoomListActions.kt | 10 +++ .../features/home/list/RoomListFragment.kt | 82 ++++++++++++++++++ .../features/home/list/RoomListViewModel.kt | 54 ++++++++++++ .../features/home/list/RoomListViewState.kt | 24 +++++ .../home/list/RoomSummaryController.kt | 26 ++++++ .../{RoomItem.kt => list/RoomSummaryItem.kt} | 9 +- app/src/main/res/drawable/bg_room_item.xml | 19 ++++ app/src/main/res/layout/activity_home.xml | 16 ++-- .../layout/fragment_loading_room_detail.xml | 20 +++++ .../main/res/layout/fragment_room_list.xml | 8 +- app/src/main/res/layout/item_room.xml | 32 +++++-- app/src/main/res/layout/view_state.xml | 73 ++++++++++++++++ app/src/main/res/values/colors.xml | 12 +++ app/src/main/res/values/strings.xml | 3 + .../.gitignore | 0 matrix-sdk-android-rx/build.gradle | 40 +++++++++ matrix-sdk-android-rx/proguard-rules.pro | 21 +++++ .../matrix/rx/ExampleInstrumentedTest.java | 26 ++++++ .../src/main/AndroidManifest.xml | 2 + .../im/vector/matrix/rx/LiveDataObservable.kt | 45 ++++++++++ .../java/im/vector/matrix/rx/RxSession.kt | 17 ++++ .../src/main/res/values/strings.xml | 3 + .../im/vector/matrix/rx/ExampleUnitTest.java | 17 ++++ .../matrix/android/api/failure/Failure.kt | 18 +--- .../android/api/session/room/RoomService.kt | 4 + .../database/mapper/RoomSummaryMapper.kt | 12 +++ .../database/model/RoomSummaryEntity.kt | 3 +- .../query/RoomSummaryEntityQueries.kt | 6 ++ .../internal/session/DefaultSession.kt | 8 ++ .../session/room/DefaultRoomService.kt | 16 ++++ .../room/timeline/TimelineBoundaryCallback.kt | 2 +- matrix-sdk-rx/build.gradle | 8 -- .../main/java/im/vector/matrix/rx/MatrixRx.kt | 3 - settings.gradle | 2 +- 52 files changed, 805 insertions(+), 133 deletions(-) create mode 100644 app/src/main/java/im/vector/riotredesign/core/platform/CheckableConstraintLayout.kt create mode 100755 app/src/main/java/im/vector/riotredesign/core/platform/StateView.kt create mode 100644 app/src/main/java/im/vector/riotredesign/features/home/HomeModule.kt create mode 100644 app/src/main/java/im/vector/riotredesign/features/home/HomeNavigator.kt delete mode 100644 app/src/main/java/im/vector/riotredesign/features/home/RoomListFragment.kt delete mode 100644 app/src/main/java/im/vector/riotredesign/features/home/RoomSummaryController.kt rename app/src/main/java/im/vector/riotredesign/features/home/{ => detail}/EventDiffUtilCallback.kt (92%) create mode 100644 app/src/main/java/im/vector/riotredesign/features/home/detail/LoadingRoomDetailFragment.kt rename app/src/main/java/im/vector/riotredesign/features/home/{ => detail}/RoomDetailFragment.kt (98%) rename app/src/main/java/im/vector/riotredesign/features/home/{ => detail}/TimelineEventAdapter.kt (97%) rename app/src/main/java/im/vector/riotredesign/features/home/{ => detail}/TimelineEventController.kt (86%) rename app/src/main/java/im/vector/riotredesign/features/home/{ => detail}/TimelineEventItem.kt (89%) create mode 100644 app/src/main/java/im/vector/riotredesign/features/home/list/RoomListActions.kt create mode 100644 app/src/main/java/im/vector/riotredesign/features/home/list/RoomListFragment.kt create mode 100644 app/src/main/java/im/vector/riotredesign/features/home/list/RoomListViewModel.kt create mode 100644 app/src/main/java/im/vector/riotredesign/features/home/list/RoomListViewState.kt create mode 100644 app/src/main/java/im/vector/riotredesign/features/home/list/RoomSummaryController.kt rename app/src/main/java/im/vector/riotredesign/features/home/{RoomItem.kt => list/RoomSummaryItem.kt} (54%) create mode 100644 app/src/main/res/drawable/bg_room_item.xml create mode 100644 app/src/main/res/layout/fragment_loading_room_detail.xml create mode 100644 app/src/main/res/layout/view_state.xml rename {matrix-sdk-rx => matrix-sdk-android-rx}/.gitignore (100%) create mode 100644 matrix-sdk-android-rx/build.gradle create mode 100644 matrix-sdk-android-rx/proguard-rules.pro create mode 100644 matrix-sdk-android-rx/src/androidTest/java/im/vector/matrix/rx/ExampleInstrumentedTest.java create mode 100644 matrix-sdk-android-rx/src/main/AndroidManifest.xml create mode 100644 matrix-sdk-android-rx/src/main/java/im/vector/matrix/rx/LiveDataObservable.kt create mode 100644 matrix-sdk-android-rx/src/main/java/im/vector/matrix/rx/RxSession.kt create mode 100644 matrix-sdk-android-rx/src/main/res/values/strings.xml create mode 100644 matrix-sdk-android-rx/src/test/java/im/vector/matrix/rx/ExampleUnitTest.java delete mode 100644 matrix-sdk-rx/build.gradle delete mode 100644 matrix-sdk-rx/src/main/java/im/vector/matrix/rx/MatrixRx.kt diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 4859402ac0691ba6321a822871cfea643abc1678..0636ad2de7b896dcead25548e7297e2f36426773 100644 GIT binary patch delta 105 zcmV-v0G9ua1(gMmm;}4kNF9-!b|swMQ=N!L_XV(Q-})ZtAn9}fB5h%Ga%p%ib7X5R zVQyq{Z)s$cYXKS%p4`5bmiQsvz2Pp%gS*UflOh2=0SuFG0Tz?40nQPx2vtc)N&|*8 LHZwh!ugIr(to$uG delta 94 zcmV-k0HObt1&sxem;|t2@yd~$b`ZJBw2-^jivNn5>RN?QPui1V0X`2JZDDkBX?QJj zWNR&QcrTNn0TvMLM?>j`i1jDVPg9z{sbZItodM?&3y_f4&n*pdZs+Fx{8AW4cv|2s A6951J diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 35d2fcd030..004dc06695 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -10,7 +10,7 @@