Compare commits

...

1152 Commits

Author SHA1 Message Date
Benoit Marty f2c8d4ad02
Merge pull request #549 from vector-im/feature/third_party_invite
Fix rendering issue of accepted third party invitation event
2019-09-06 16:36:30 +02:00
Benoit Marty be524472ec
Merge pull request #546 from vector-im/feature/cleanup
Cleanup
2019-09-06 16:25:08 +02:00
Benoit Marty 1b82a1a24d Cleanup 2019-09-06 15:52:29 +02:00
Benoit Marty cf0b331c3b Handle invite to the current user rendering 2019-09-06 15:48:42 +02:00
Benoit Marty 2a92a3dc80 Fix rendering issue of accepted third party invitation event 2019-09-06 14:34:52 +02:00
Benoit Marty 012840abba Progress in initial sync dialog is decreasing for a step and should not (#532) 2019-09-05 18:14:05 +02:00
Benoit Marty a5975a099e Cleanup and document DefaultInitialSyncProgressService 2019-09-05 17:23:09 +02:00
Benoit Marty 38da4b9ee5 Cleanup and document DefaultInitialSyncProgressService 2019-09-05 17:02:03 +02:00
Benoit Marty 242e60fcaa Rename CryptoManager to DefaultCryptoService 2019-09-05 16:14:34 +02:00
Benoit Marty a23be05cbf Better type 2019-09-05 16:04:41 +02:00
Benoit Marty ed39b02924 Avoid using keyword for variable names 2019-09-05 16:04:41 +02:00
Benoit Marty fe931b5361
Merge pull request #418 from Dominaezzz/kotlinify-1
Some more kotlinification
2019-09-05 16:02:30 +02:00
Benoit Marty 90d9cd0587
Merge pull request #416 from Dominaezzz/kt-remove_java_util
Remove most usages of the java.util package
2019-09-05 15:33:03 +02:00
Benoit Marty 9cedb18921
Merge pull request #538 from vector-im/feature/log_mgmt
Reduce release build log level
2019-09-05 15:24:04 +02:00
Benoit Marty e89ba7b87b Update wording 2019-09-05 15:23:38 +02:00
Benoit Marty 902657c22a
Merge pull request #537 from vector-im/feature/fix_crash
Fix crash due to missing informationData (#535)
2019-09-02 15:31:28 +02:00
Valere eec2abf164 Reduce release build log level 2019-09-02 14:33:53 +02:00
Benoit Marty 6879cc8ca8 Fix crash due to missing informationData (#535) 2019-09-02 14:24:36 +02:00
Benoit Marty fd6bbbd3b5 Fix issue with version name (Fixes #533) 2019-08-30 15:57:39 +02:00
Benoit Marty 0ff0b014a9 Version++ (0.5.0) 2019-08-30 15:07:04 +02:00
Benoit Marty fdc9e84dd5 Merge branch 'release/0.4.0' into develop 2019-08-30 15:04:43 +02:00
Benoit Marty 58f878fca9 Prepare version 0.4.0 2019-08-30 15:04:28 +02:00
Benoit Marty 88095e4bd9 Add entry in change file 2019-08-30 14:54:15 +02:00
Benoit Marty 47d22a3d5e Import translation from Riot and MatrixSDK 2019-08-30 11:21:43 +02:00
Valere 28e82cb8ea
Merge pull request #531 from vector-im/feature/fix_crash_530
Fix / EmojiCompat not initialized
2019-08-29 17:46:51 +02:00
Valere 35817245cb refactoring, code review 2019-08-29 17:27:49 +02:00
Valere 75266f42bb Fix / EmojiCompat not initialized 2019-08-29 16:49:22 +02:00
Benoit Marty 95c4c9ce56
Merge pull request #527 from vector-im/feature/privacy
Privacy: remove log of notifiable event (#519)
2019-08-29 12:16:34 +02:00
Benoit Marty ce5570105d Privacy: remove log of notifiable event (#519) 2019-08-29 10:36:45 +02:00
Benoit Marty 188a9aebfa
Merge pull request #525 from vector-im/feature/read_receipt_cleanup
Feature/read receipt cleanup
2019-08-29 10:19:06 +02:00
Benoit Marty c95223f5d2 Add long click support on unsupported event 2019-08-28 18:17:37 +02:00
Benoit Marty ef0362ba9c Display Read Receipt on unsupported events 2019-08-28 17:31:31 +02:00
Benoit Marty ea242f6737 Hide ReadReceipt View when it is not relevant 2019-08-28 17:17:37 +02:00
Valere cbc08d834b
Merge pull request #522 from vector-im/feature/fix_e2e_reply
Fix / regression on e2e reply and edit of reply
2019-08-28 10:38:22 +02:00
Valere 0ab6b33fb6
Merge branch 'develop' into feature/fix_e2e_reply 2019-08-28 10:38:12 +02:00
Valere 1b394527b6 cleaning + code review 2019-08-28 10:22:51 +02:00
Valere a8f1388721
Merge pull request #520 from vector-im/feature/read_receipts_511
Improve read receipt design
2019-08-28 10:17:56 +02:00
Valere 166be4e289 Improve read receipt design 2019-08-28 09:56:10 +02:00
Valere b49ccefe63
Merge pull request #521 from vector-im/feature/fix_dome_video_wont_play
Some video won't play
2019-08-28 03:43:35 -04:00
Valere 825760d17e Fix / regression on e2e reply and edit of reply 2019-08-27 17:05:04 +02:00
Valere b5af62c3ea Some video won't play
VideoView fails to play some remote uri video on some device. For now video is downloaded locally in internal cache then played. This offers basic support before full media preview implementation
2019-08-27 16:50:02 +02:00
Valere a51d96bf00
Merge pull request #325 from vector-im/feature/non_unicode_reaction
Accept non unicode reactions
2019-08-27 08:10:51 -04:00
Valere 7e142d201d Use EmojiCompat to build EmojiSpans from text 2019-08-27 11:06:52 +02:00
Valere 2be6058971 accept non unicode reactions 2019-08-27 10:58:21 +02:00
Valere 49d73f360e
Merge pull request #494 from vector-im/feature/fix_441
Fix text diff removed linebreak
2019-08-27 04:36:03 -04:00
Valere bd88d85a21
Merge branch 'develop' into feature/fix_441 2019-08-27 04:35:17 -04:00
Valere be4fc5cce6
Merge pull request #493 from vector-im/feature/fix_358
Date change message repeats for each redaction until a normal message
2019-08-27 04:34:35 -04:00
Valere 704da1be55
Merge branch 'develop' into feature/fix_358 2019-08-27 04:34:24 -04:00
Valere 5d002532d3
Merge pull request #495 from vector-im/feature/fix_423
Slide-in reply icon is distorted
2019-08-27 04:22:02 -04:00
Valere d4161e9a1a Fix text diff removed linebreak 2019-08-27 10:17:42 +02:00
Valere 7966ebef03 Date change message repeats for each redaction until a normal message 2019-08-27 10:16:11 +02:00
Valere ed5faca5d2 Slide-in reply icon is distorted 2019-08-27 10:06:20 +02:00
Benoit Marty 8ca829d538 An error was displayed by mistake 2019-08-19 17:22:04 +02:00
ganfra e7819ce678
Merge pull request #496 from vector-im/feature/di_clean
Dagger clean
2019-08-19 16:41:50 +02:00
ganfra 5402902bc2 Merge branch 'develop' into feature/di_clean 2019-08-19 15:04:26 +02:00
ganfra bc1350aaf5
Merge pull request #484 from vector-im/feature/timeline_read_receipts
Feature/timeline read receipts
2019-08-19 14:29:59 +02:00
ganfra fd74e3dfb1 Read receipts: clean code after review 2019-08-19 14:08:15 +02:00
ganfra e0628da1cb Dagger: use AssistedInjectModule for viewModel + use AssistedFactory for room dependencies 2019-08-14 19:09:56 +02:00
Benoit Marty aa4e74e986
Merge pull request #487 from vector-im/feature/fix_ui_issues
Feature/fix ui issues
2019-08-14 18:20:08 +02:00
Benoit Marty 6cc0c0672e
Merge pull request #474 from vector-im/feature/dev_suffix
Automatic "-dev" version suffix on non master branch
2019-08-14 18:15:44 +02:00
ganfra 501474b720 Fix code quality issues 2019-08-14 14:53:40 +02:00
ganfra e11c66035c Theme: the action menu text items should use colorAccent 2019-08-14 14:19:21 +02:00
ganfra 3d2d219d79 Room list: let the fab animation be quicker 2019-08-14 14:18:56 +02:00
ganfra 63af03bedd List: add overScroll 2019-08-14 14:18:42 +02:00
ganfra d3827b8673 Read receipts: branch settings to show/hide them 2019-08-14 10:51:09 +02:00
Benoit Marty 4ca2531e47 `develop` branch will have version code from timestamp, to ensure each build from CI has a incremented versionCode
Other branches (master, features, etc.) will have version code based on application version.
2019-08-14 10:45:17 +02:00
ganfra 4e8dc72439 Update CHANGES 2019-08-13 15:17:04 +02:00
ganfra 25a4240a5a Merge branch 'develop' into feature/timeline_read_receipts 2019-08-13 15:16:10 +02:00
ganfra b9cfda23b6 Read receipts: just juste invisible on hidden avatars, to have a bigger touch zone 2019-08-13 15:06:00 +02:00
ganfra 06dcf75a32 Read receipts: fix not appearing RR 2019-08-13 12:06:49 +02:00
ganfra 21deb2551d Read receipts: handle read receipts set on filtered events + let BottomSheet takes a snapshot instead of being live. 2019-08-12 17:59:07 +02:00
ganfra 70639f180c Read receipts: add read receipts bottom sheet 2019-08-08 19:59:20 +02:00
ganfra 1dbb02a80d Read receipts: create custom view to use it wherever we want easily 2019-08-08 17:51:06 +02:00
ganfra 825463d9cd Change package for NotificationAreaView 2019-08-08 17:50:33 +02:00
ganfra c313ce78cb Read receipts: sort descending by timestamp 2019-08-08 17:49:50 +02:00
ganfra 39f58d048b Read receipts: fix dummy being overrided 2019-08-08 17:49:31 +02:00
Benoit Marty 3f792c7a84 Automatic "-dev" version suffix on non master branch 2019-08-08 16:57:03 +02:00
Benoit Marty 347dcb469a Version++ 2019-08-08 16:47:13 +02:00
Benoit Marty 79fb1985aa Merge branch 'release/0.3.0' into develop 2019-08-08 16:45:02 +02:00
Benoit Marty e216cd15a8 Prepare release 0.3.0 2019-08-08 16:44:53 +02:00
Benoit Marty 37fde374b3
Merge pull request #469 from vector-im/feature/versionCode_auto
Ensure versionCode is the wanted one for GPlay and F-Droid build
2019-08-08 16:32:10 +02:00
Benoit Marty f7b471f141 Stop using BuildConfig.VERSION_CODE, it is not the correct value 2019-08-08 16:31:45 +02:00
Benoit Marty 93fd56a7ca Ensure versionCode is the wanted one for GPlay and F-Droid build 2019-08-08 16:30:44 +02:00
Benoit Marty 5a9d88e791
Merge pull request #473 from vector-im/feature/sync_room
Feature/sync room
2019-08-08 16:15:26 +02:00
Benoit Marty eaf6a9923a Cancel sync request on pause and timeout to 0 after pause (#404) 2019-08-08 16:04:53 +02:00
ganfra d98567045c Read receipts: use a simpler strategy when it's initialSync 2019-08-08 15:03:36 +02:00
ganfra b4ce8748cb First step in handling read receipts 2019-08-08 14:32:11 +02:00
Benoit Marty 9d5433a857 Show sync progress also in room detail screen (#403) 2019-08-08 14:14:10 +02:00
Benoit Marty 6d4ee83e65
Merge pull request #472 from vector-im/feature/vectorPref
Dagger for VectorPreferences and /markdown command as a bonus
2019-08-08 12:43:22 +02:00
Benoit Marty 6e44cca17d Handle `/markdown` command 2019-08-08 12:09:05 +02:00
Benoit Marty 0a73887c70 Daggerization of VectorPreferences 2019-08-08 11:52:50 +02:00
ganfra 7fef063e15
Merge pull request #468 from vector-im/feature/fix_realm_issues
Feature/fix realm issues
2019-08-07 18:05:06 +02:00
Benoit Marty 24f391dac0
Merge pull request #467 from vector-im/feature/playstore_crash
Feature/playstore crash
2019-08-07 17:10:49 +02:00
Benoit Marty 81c7f694d6 Import Strings form Riot 2019-08-07 16:10:50 +02:00
Benoit Marty 80e2fc0ca3
Merge pull request #466 from vector-im/feature/edit_history_item
Add "View Edit History" item in the message bottom sheet (#401)
2019-08-07 15:08:26 +02:00
Benoit Marty 9f53406e99 Fix crash (KotlinNullPointerException) observed on PlayStore 2019-08-07 13:35:44 +02:00
Benoit Marty 3584658c36 Fix crash (IllegalStateException) observed on PlayStore 2019-08-07 13:24:43 +02:00
Benoit Marty 12a0cbb400 Fix crash observed on PlayStore 2019-08-07 13:16:04 +02:00
Benoit Marty 20437446b4 Add "View Edit History" item in the message bottom sheet (#401) 2019-08-07 13:05:22 +02:00
Benoit Marty 35229882e3 Fix `(edited)` link can be copied to clipboard (#402) 2019-08-07 12:28:21 +02:00
Benoit Marty a04f4421f6
Merge pull request #464 from vector-im/feature/splitApk
Split apk
2019-08-07 12:11:13 +02:00
Benoit Marty af1e81f65e Remove unused react native lib, and ensure dependencies lib are explicitly declared 2019-08-07 11:53:59 +02:00
Benoit Marty 63f6081fa5 Split APK: generate one APK per arch, to reduce APK size of about 30% 2019-08-07 11:46:38 +02:00
Benoit Marty ee2e575211 Display VersionCode of the app in the settings, because Android system does not display it anymore 2019-08-07 11:44:51 +02:00
ganfra 0949d29f9c Let TimelineEvent be queried by SendState 2019-08-07 10:54:54 +02:00
Benoit Marty 23466fb5a4
Merge pull request #463 from vector-im/feature/fix_theme
Fix theme not well defined at runtime after configurationChange
2019-08-07 10:40:33 +02:00
ganfra 7f09e64d63 Fix timeline forward loader showing when sending events 2019-08-07 09:59:37 +02:00
ganfra 585f0ba4b7 Add an identifier method on ChunkEntity 2019-08-06 21:32:45 +02:00
ganfra 245fbe86d9 Get enum safe with realm entities 2019-08-06 21:32:40 +02:00
Dominic Fischer 456908c851
Merge branch 'develop' into kt-remove_java_util 2019-08-06 18:27:39 +01:00
ganfra b79fdf6a85 Fix theme not well defined at runtime after configurationChange 2019-08-06 18:55:38 +02:00
Benoit Marty d9f448c9aa
Merge pull request #459 from vector-im/feature/clenup_after_hol
Review of merged PRs
2019-08-06 18:39:37 +02:00
Benoit Marty 7a6fc4936b Start chain: create extension 2019-08-06 18:15:15 +02:00
Benoit Marty d82fd10f3b Start chain: add missing cases 2019-08-06 18:15:15 +02:00
Benoit Marty 4009f2c176 Add comment to explain why we use a AlwaysSuccessfulWorker 2019-08-06 18:15:15 +02:00
Benoit Marty 15c4b03340 Event: do not display sendState in View Source and cleanup the class 2019-08-06 18:14:24 +02:00
Benoit Marty 7b5dff3dcf Mutualize :? part 2019-08-06 18:14:24 +02:00
Benoit Marty 357123743f Search firstIndexOf, because server url can contains port (This is what JS does, but Riot Android is also bugged) 2019-08-06 18:14:24 +02:00
Benoit Marty bb04af1e2c Remove useless code 2019-08-06 18:14:24 +02:00
Benoit Marty 2f94fbd7eb Use existing method 2019-08-06 18:14:24 +02:00
Benoit Marty f2a3bdb68e Kotlin style 2019-08-06 18:14:24 +02:00
Benoit Marty 097e9714ff Cleaner code 2019-08-06 18:14:24 +02:00
Benoit Marty acae0fad3e Better private method name 2019-08-06 18:14:24 +02:00
Benoit Marty 4deb7eb865 Javadoc for NoMerger 2019-08-06 18:14:24 +02:00
Benoit Marty f910cd6f97 More robust SDK: retry only when on failure 2019-08-06 18:14:24 +02:00
Benoit Marty 652ac81fa1 simple code 2019-08-06 18:14:24 +02:00
Benoit Marty 99f4196388 More code cleanup/review 2019-08-06 18:14:24 +02:00
Benoit Marty c0b94f4111 Typo 2019-08-06 18:14:24 +02:00
Benoit Marty 1462fa0484 Simple code 2019-08-06 18:14:24 +02:00
Benoit Marty dafdc1d3ad Cleaner API 2019-08-06 18:07:35 +02:00
Benoit Marty 394b89e76b Avoid duplicated code 2019-08-06 18:07:35 +02:00
Benoit Marty 0db8e7da43 Format 2019-08-06 18:07:35 +02:00
ganfra dae8b5c196
Merge pull request #460 from vector-im/feature/fix_cancellations
Feature/fix cancellations
2019-08-06 18:06:05 +02:00
Dominic Fischer 215324a03e Some kotlinification
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2019-08-06 11:36:39 +01:00
ganfra d3ce4c491c Clean code after review 2019-08-06 11:45:06 +02:00
Benoit Marty ed6d28bd3b
Merge pull request #417 from Dominaezzz/kt-opt
Some optimisations
2019-08-06 11:42:07 +02:00
Benoit Marty c2e053b62b
Merge pull request #414 from Dominaezzz/kt-leak
Fix potential resource leak
2019-08-06 11:39:51 +02:00
Benoit Marty c450849cc3
Merge pull request #425 from Cadair/patch-1
Fix reply fallback prefix
2019-08-06 11:23:37 +02:00
ganfra fe884dba2d Update CHANGES.md and fix code quality 2019-08-05 20:28:50 +02:00
ganfra 3fa4dbaa25 Make async transaction working with suspend method 2019-08-05 20:17:59 +02:00
ganfra 4a74f58516 Task: use a builder with DSL and introduce Constraints (only boolean connectedToNetwork at the moment) 2019-08-05 20:17:36 +02:00
ganfra c413321a22 Remove unnecessary code and fix signout 2019-08-02 13:15:56 +02:00
ganfra d696bd2830 Send worker: let LIMIT_EXCEEDED error to be retry 2019-08-02 11:36:32 +02:00
ganfra a2b6bd0f62 Fix network reconnection with sync 2019-08-02 11:35:58 +02:00
ganfra 9cc922a8a2 Optimize imports 2019-08-02 11:35:27 +02:00
Valere c36d1bcd06
Merge pull request #456 from vector-im/feature/fix_image_transition_overlap
Fix / Shared element transition overlap
2019-08-02 10:18:14 +02:00
Valere 85499c6b33 fix for background overlaps 2019-08-02 10:00:33 +02:00
Valere 8076eab4b5 Fix / Shared element transition overlap
Shared element was overlapping top system bars
2019-08-02 10:00:33 +02:00
Valere d47c0f5ebc Fix / layout res in debug instead of main 2019-08-02 09:59:59 +02:00
ganfra fd09a1224e Remove Try from suspending functions 2019-08-01 17:15:17 +02:00
ganfra c300c50093
Merge pull request #449 from vector-im/feature/room_update
Feature/room upgrade
2019-07-31 15:34:38 +02:00
ganfra 77c4355aed Merge branch 'develop' into feature/room_update 2019-07-31 14:27:12 +02:00
ganfra 1a92562182 Clean code after review 2019-07-31 14:06:10 +02:00
ganfra 9c390dcc0c
Merge pull request #453 from vector-im/feature/fix_code_quality
Fix code quality issues
2019-07-30 21:54:38 +02:00
ganfra 95089b91b8 UserAccountData: optimize helper and clean code. 2019-07-30 21:41:29 +02:00
ganfra eb446d7b49 Fix code quality issues 2019-07-30 21:20:30 +02:00
ganfra dc4786ecf0 Room upgrade: add rx flux and handle failures more precisely 2019-07-30 19:13:09 +02:00
Valere e245023add
Merge pull request #444 from vector-im/feature/fail_to_send_msg
Basic Message Failure support + Resend (text only)
2019-07-30 18:31:53 +02:00
Stuart Mumford 90fad23493
Fix reply fallback prefix
Plain text reply fallback should be prefixed with "> " not ">" (as per spec).

Signed-off-by: Stuart Mumford <stuart@cadair.com>
2019-07-30 12:09:29 -04:00
Valere 000db4b192 Basic Message Failure support + Resend (text only)
+ clean worker inputs when starting new independent task in unique queue
2019-07-30 17:53:43 +02:00
ganfra 2a16c36a59
Merge pull request #451 from vector-im/feature/fix_user_account_data_direct
User Account Data: fix sync issues with direct invites
2019-07-30 17:39:12 +02:00
ganfra ef6c1cfc63 RoomSummaryUpdater: remove unused params 2019-07-30 17:37:16 +02:00
ganfra 4b4156996d User Account Data: fix sync issues with direct invites 2019-07-30 17:32:31 +02:00
Valere 087cc0e6e3
Merge pull request #448 from danteissaias/develop
Fix #447
2019-07-30 17:07:22 +02:00
ganfra f4df27c2dc Merge branch 'develop' into feature/room_update 2019-07-30 15:51:56 +02:00
ganfra ab25980c4e
Merge pull request #437 from vector-im/feature/create_direct_room
Feature/create direct room
2019-07-30 15:13:30 +02:00
Dante Issaias 77b402ce70
updates CHANGES.md
Signed-off-by: Dante Issaias <dante.issaias@gmail.com>
2019-07-30 14:01:41 +01:00
Dante Issaias 2763fbb496
fix #447
Signed-off-by: Dante Issaias <dante.issaias@gmail.com>
2019-07-30 13:57:04 +01:00
ganfra 6deba31111 Direct room: finally use PagedList as we can get a lot of users in DB. 2019-07-30 14:51:14 +02:00
ganfra ff6ce8a4b7 Create direct : remove letter headers when filtering 2019-07-29 19:13:06 +02:00
ganfra d0cff219aa
Merge pull request #446 from vector-im/feature/remove_identity_default
Remove default identity server as we don't use it.
2019-07-29 18:32:07 +02:00
ganfra 65f0af918f Remove default identity server as we don't use it. 2019-07-29 18:26:26 +02:00
ganfra ac38a6461c Tombstone : handle joining viaserver params 2019-07-26 19:17:12 +02:00
ganfra 9a1e16a170 Tombstone : add notification area and handle links 2019-07-26 14:51:14 +02:00
ganfra 9e5c70dda3 Room update: start handling tombstone and room create events [WIP] 2019-07-25 19:34:39 +02:00
ganfra 0255696c88 Update CHANGES 2019-07-25 16:49:15 +02:00
ganfra 76a9625f25 Direct chat : finalize flow 2019-07-25 16:34:27 +02:00
ganfra 5af6bf3762 Direct room: finally handle selection with chips (not as Nad design) 2019-07-25 16:34:27 +02:00
ganfra 507bc2f622 UserEntity: fix not inserted at all 2019-07-23 21:31:58 +02:00
ganfra 125eacb20b Direct messages: try to handle selecting/deselecting users (WIP) 2019-07-23 19:53:47 +02:00
Valere 6176520805
Merge pull request #407 from vector-im/feature/pending_edits_ux
Feature/pending edits ux
2019-07-22 23:53:26 +02:00
Valere 3aea0a50ca
Merge branch 'develop' into feature/pending_edits_ux 2019-07-22 23:53:16 +02:00
Valere ab87a3caea
Merge pull request #397 from vector-im/feature/animation_image_preview
Better image fullscreen preview animation
2019-07-22 23:37:15 +02:00
Valere c58328f94e cleaning / review 2019-07-22 23:36:19 +02:00
ganfra 03974c8bdf Create Direct Room : fix loading/error state (WIP) 2019-07-22 19:01:17 +02:00
ganfra 151ae7f4dd Direct chat: handle user account data 2019-07-22 18:58:55 +02:00
Dominic Fischer a34b053efe Some optimisations
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2019-07-21 23:35:38 +01:00
Dominic Fischer 02e342849f Remove most usages of the java.util package
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2019-07-21 23:23:56 +01:00
Dominic Fischer b59017938b Fix potential leak
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2019-07-21 19:11:53 +01:00
ganfra 2c81e41288 Merge branch 'develop' into feature/create_direct_room 2019-07-19 18:18:22 +02:00
ganfra cb44ab547c Create direct room: almost finished, still need to handle showing selected users in search field 2019-07-19 18:12:42 +02:00
Benoit Marty 6d01a570fd Clear notification for a room left on another client 2019-07-19 16:44:30 +02:00
Valere 4a2bf0d6c6 Cleaning Lint 2019-07-19 16:18:47 +02:00
Valere 36af8a6a9f Lab / show replace in timeline when show hidden event selected 2019-07-19 16:13:55 +02:00
Valere 40a68c3e9f Show pending edits by fading the event body #193
+ Fix issues with edits local echo management in aggregation
2019-07-19 16:13:35 +02:00
Benoit Marty 1a4ec34bb2 Code cleanup 2019-07-19 16:03:37 +02:00
Benoit Marty 10490e3aa6 Close detail room screen when the room is left with another client (#256) 2019-07-19 16:00:06 +02:00
Benoit Marty cd6624a8a6 Fix issue on setting screen: bad alignment of title 2019-07-19 15:15:29 +02:00
Valere 3965218bf9 Cleaning / Review 2019-07-19 12:12:17 +02:00
Valere d78ff7ab08 Fix / can't zoom after rotation 2019-07-19 11:58:24 +02:00
ganfra cb274d6a33 Add some cancelable on service methods and start branching Rx 2019-07-19 11:21:16 +02:00
Valere c00dbce536 Fix #390
(edited) string in edited message body
2019-07-19 09:58:53 +02:00
Valere db88caf7fa Better image fullscreen preview animation 2019-07-18 18:53:46 +02:00
Benoit Marty c3d945d6bb Version++ 2019-07-18 17:48:56 +02:00
Benoit Marty 4c128602b2 Merge branch 'release/0.2.0' into develop 2019-07-18 17:47:39 +02:00
Benoit Marty d609c49b31 Prepare release 0.2.0 2019-07-18 17:47:24 +02:00
ganfra 001603cf9a Create direct room: add filtering and enhance design a bit 2019-07-18 17:42:22 +02:00
Valere d87ee32422
Merge pull request #384 from vector-im/feature/edit_e2e
Feature/edit e2e
2019-07-18 16:44:44 +02:00
Benoit Marty f0671b9e73 "Riot X" -> "RiotX" 2019-07-18 14:28:46 +02:00
Benoit Marty e218691bf2 Import strings and translation from Riot 2019-07-18 14:25:34 +02:00
Valere 9c67036c08 Fix / keyboard won't show when using reply from long tap menu 2019-07-18 12:13:17 +02:00
ganfra 62657538af
Merge pull request #389 from vector-im/feature/cleanup
Do not show invitation in the filtered room list
2019-07-18 12:10:47 +02:00
Valere 5438207fba faster animation for quick reply 2019-07-18 12:01:23 +02:00
Benoit Marty fe88aaffbd Inject RoomListNameFilter 2019-07-18 11:39:13 +02:00
Benoit Marty 21ba72e5e7 Do not show invitation in the filtered room list 2019-07-18 11:34:49 +02:00
Benoit Marty d48ae967bd Remove dead code 2019-07-18 11:11:42 +02:00
Benoit Marty 0afde3b021 Rename class member for code clarity 2019-07-18 11:07:09 +02:00
Benoit Marty 49ae954183 Merge remote-tracking branch 'origin/develop' into develop 2019-07-18 10:58:40 +02:00
Benoit Marty 64bee91f7a
Merge pull request #387 from vector-im/feature/fix_sync_state
Fix sync state progress bar
2019-07-18 10:57:46 +02:00
ganfra 4341b0d0f5 Merge branch 'develop' into feature/create_direct_room 2019-07-18 09:47:25 +02:00
Valere 51fdccb393 cleaning 2019-07-18 09:29:27 +02:00
ganfra 7e3b300130 Fix sync state progress bar 2019-07-17 19:45:35 +02:00
Benoit Marty a98b324c89
Merge pull request #385 from vector-im/feature/invit_notif
Cancel invitation notification when handling the invitation in the application
2019-07-17 18:39:40 +02:00
Benoit Marty 977721881f Cancel invitation notification when handling the invitation in the application 2019-07-17 18:35:41 +02:00
ganfra 838003b68a Create direct room: start creating all the required stuff 2019-07-17 18:30:14 +02:00
Valere 7d41352918 Fix / edit reply was quoting wrong text
+ e2e reply of edit
2019-07-17 16:46:56 +02:00
Valere 077396a832 E2E replies
+ Edit History / support e2e and use original event
2019-07-17 16:20:12 +02:00
Benoit Marty 32b79bd50e Remove extra space around userId 2019-07-17 15:13:12 +02:00
Benoit Marty 844f6d16a4 Code quality 2019-07-17 15:05:29 +02:00
Benoit Marty fc9ef579ca
Merge pull request #381 from vector-im/feature/room_members_perf
Feature/room members perf
2019-07-17 15:01:06 +02:00
Benoit Marty 77fa5af1b8 Fix compilation issue after merge 2019-07-17 14:58:23 +02:00
ganfra 2948018453 Clean code after review 2019-07-17 14:56:00 +02:00
Benoit Marty 90d25ff45e Code cleanup 2019-07-17 14:41:01 +02:00
Benoit Marty 173452d38c
Merge pull request #367 from Dominaezzz/kotlinify-3
Some more kotlinification.
2019-07-17 14:38:16 +02:00
Benoit Marty a9f9083745
Merge pull request #374 from vector-im/feature/quick_fix_long_click_link
WIP /  Fix Copying link from a message shouldn't open context menu
2019-07-17 14:37:11 +02:00
Valere 22dc2a6790 Fix Copying link from a message shouldn't open context menu 2019-07-17 14:36:47 +02:00
Benoit Marty 927cd7285d
Merge pull request #378 from vector-im/feature/fix_sync_thread_wrong_autostart
Fix / SyncThread was started in background
2019-07-17 14:32:19 +02:00
Benoit Marty 4d5bdecec6
Merge pull request #382 from vector-im/feature/better_long_tap_menu
Feature/better long tap menu
2019-07-17 14:28:51 +02:00
Benoit Marty 0be987ac0d
Merge branch 'develop' into feature/better_long_tap_menu 2019-07-17 14:28:36 +02:00
Valere 4bfaa00be4 Fix / clean bad method name 2019-07-17 14:27:02 +02:00
Benoit Marty 8e78d8a58d
Merge pull request #380 from vector-im/feature/rs_crash_steve
Fix a crash in notificationwhen display name is empty
2019-07-17 14:22:45 +02:00
Benoit Marty e3e86c0a41
Merge pull request #383 from vector-im/feature/filter_params
Pass filter to room directory screen or create room screen
2019-07-17 14:20:29 +02:00
Benoit Marty 8a5fddd952
Merge pull request #379 from vector-im/feature/small_fixes
Fix bad View used for searching in room directory.
2019-07-17 14:19:37 +02:00
ganfra 208460850e Dagger: activate incremental build 2019-07-17 14:16:20 +02:00
Benoit Marty 0ddef67cc9 Migrate to rxbinding 3 and fix bad layout for room directory filter (Fixes #349) 2019-07-17 14:16:20 +02:00
Benoit Marty 896e582a9c Create style VectorSearchView 2019-07-17 14:16:20 +02:00
Benoit Marty 477920f411 Add some comment 2019-07-17 14:14:02 +02:00
Benoit Marty c647648e79
Merge pull request #371 from vector-im/feature/composer_fix_edit_reply
Feature/composer fix edit reply
2019-07-17 14:03:10 +02:00
Benoit Marty b654025a3b Fix alignment issue in toolbars 2019-07-17 12:38:35 +02:00
Benoit Marty 786a7d7560 Rename id 2019-07-17 12:20:11 +02:00
Benoit Marty b935b9311e Scroll the list to top after each new filter 2019-07-17 12:18:45 +02:00
Benoit Marty 8e12f71535 Add top left back button 2019-07-17 12:16:10 +02:00
Benoit Marty 7eea2ccfb4 Fix infinite opening of room once the room is created 2019-07-17 12:09:09 +02:00
Benoit Marty c32ef02a12 Pre fill the room directory filter and and the room name with the already entered string from the user 2019-07-17 12:04:19 +02:00
Benoit Marty 3651ec4870 Add some doc 2019-07-17 11:58:18 +02:00
Valere 87de7bd3e6 fix lint code quality 2019-07-17 11:41:14 +02:00
Valere 9494174c33 Swipe to reply in timeline (lab) 2019-07-17 10:54:15 +02:00
ganfra b7e0b400fb Timeline : set bigger initial load size 2019-07-16 17:48:32 +02:00
ganfra a8f06f609b Use latest retrofit version to properly cancel requests
Fix cancelation requests
2019-07-16 17:46:52 +02:00
ganfra d469299f42 RoomMembers: should fix state events issues 2019-07-16 17:46:52 +02:00
Valere 9bdea5b325 Change order of actions (and reply on top) 2019-07-16 16:35:57 +02:00
Valere 2f01ad99b3 Compact long tap menu 2019-07-16 16:35:36 +02:00
Benoit Marty bb3b5788ba Update hint from design 2019-07-16 16:35:10 +02:00
Benoit Marty 45f7d3e9c4 Kotlin style 2019-07-16 15:59:08 +02:00
Benoit Marty 0f7a56d005 Use Session.myUserId whereas it's possible 2019-07-16 15:54:00 +02:00
Valere 63d2861bc8 Fix / SyncThread was started in background
Upon reception of a push, is the session is instantiated the sync thread was starting to loop
2019-07-16 15:44:08 +02:00
Benoit Marty 6bbc784c29 Fix crash (from Steve's rageshake) 2019-07-16 15:42:02 +02:00
Valere c6fd625761 code review 2019-07-16 14:56:16 +02:00
Valere d8092abc4e fix / strip reply prefix on history 2019-07-16 14:39:46 +02:00
Valere 6effb90361 Fix / edit of reply and edit of edit of reply 2019-07-16 14:39:05 +02:00
Benoit Marty 42584fc55a
Merge pull request #372 from vector-im/feature/room_filtering
Room filtering
2019-07-16 11:41:08 +02:00
Benoit Marty 30d9ddb3e8
Merge pull request #373 from vector-im/feature/fix_composer_separator_dark
Fix / composer separator color was using a clear theme color
2019-07-15 18:16:06 +02:00
Valere 020c32bb1a Fix / composer separator color was using a clear theme color 2019-07-15 17:46:24 +02:00
Benoit Marty efd973208f Green close icon 2019-07-15 17:35:51 +02:00
Benoit Marty 30a6c98c08 Room name in bold 2019-07-15 17:29:37 +02:00
Benoit Marty 1440080d04 Changes 2019-07-15 17:27:49 +02:00
Benoit Marty 61bb4c0427 Introduce CreateRoomActivity, a simple container for [CreateRoomFragment] 2019-07-15 17:26:48 +02:00
Benoit Marty 3c25088243 Filter rooms 2019-07-15 17:26:48 +02:00
Benoit Marty fc1c0caea3 Avoid displaying two loaders if there is no elements between them 2019-07-15 17:25:59 +02:00
Valere 8901a5e09a
Merge pull request #342 from vector-im/feature/edit_history
Feature/edit history
2019-07-15 15:15:45 +02:00
Valere 25f1d21bc7 Edit history
Get history from API


cleaning


Updated change log


Missing copyrights


Code review


cleaning
2019-07-15 14:57:12 +02:00
Benoit Marty 4d2ab9fa31
Merge pull request #344 from vector-im/feature/play_store_crash
Feature/play store crash
2019-07-15 10:49:20 +02:00
Benoit Marty 0289d2ee87 Simpler code 2019-07-15 10:48:44 +02:00
Benoit Marty 222201cc64 Fix crash observe on the PlayStore (#341) 2019-07-15 10:48:44 +02:00
Benoit Marty b15dea6de3
Merge pull request #338 from vector-im/feature/green_encrypt
Text in green when encrypting
2019-07-15 10:46:44 +02:00
Benoit Marty 2ba83e456d
Merge pull request #343 from vector-im/feature/click_on_redacted_event
Handle click on redacted event
2019-07-15 10:46:06 +02:00
Dominic Fischer 1822fc4fbb Some more kotlinification
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2019-07-13 15:35:10 +01:00
Dominic Fischer e6dd1fbfec Use GlobalScope instead of temp scope
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2019-07-13 15:18:16 +01:00
Benoit Marty e2ea76f871 Fix crash reported by PlayStore 2019-07-12 16:48:35 +02:00
ganfra 9182f2ce4e RoomMembers/User : get a better and faster handling (still need to fix one small issue) 2019-07-12 13:59:37 +02:00
Benoit Marty 34d14eb304 Fix regression on permalink click 2019-07-12 13:51:37 +02:00
Benoit Marty 3625c462f0 Click on redacted event 2019-07-12 13:51:37 +02:00
Benoit Marty fe69206340 Prepare next release 2019-07-12 11:39:26 +02:00
Benoit Marty f9885fd04c Update CHANGES.md 2019-07-12 11:38:55 +02:00
Benoit Marty 316c8ec27e
Merge pull request #265 from vector-im/readme_update_for_beta
README: Update it for the beta launch
2019-07-12 11:36:49 +02:00
Benoit Marty 41465450d8 Code cleanup 2019-07-12 10:45:08 +02:00
Benoit Marty bd009caaf1 Code cleanup 2019-07-12 10:22:58 +02:00
Benoit Marty 33252c3b65 Green text color during encrypting 2019-07-12 10:16:43 +02:00
ganfra 10e4d0190f Try to insert users directly to see if perfs are better [WIP] 2019-07-11 18:55:13 +02:00
Benoit Marty b77310fe92
Merge pull request #337 from vector-im/feature/debug_suffix
Add ".debug" to the applicationId to be able to install the app along with the prod version
2019-07-11 18:33:43 +02:00
Benoit Marty 919dec4a56 Add ".debug" to the applicationId to be able to install the app along with the prod version 2019-07-11 17:59:07 +02:00
Benoit Marty 43b3680774 Prepare next release 2019-07-11 17:44:58 +02:00
Benoit Marty bfb5fce809 Update CHANGES.md 2019-07-11 17:43:56 +02:00
Benoit Marty 1f3731aae7 Merge branch 'master' into develop 2019-07-11 17:42:11 +02:00
Benoit Marty 52dced43ff Fix version code issue 2019-07-11 16:49:06 +02:00
Benoit Marty ff80c3c8d5 Add script to sign the APK. 2019-07-11 16:41:45 +02:00
Benoit Marty 34e4d27573 Add missing space in pipeline 2019-07-11 16:00:45 +02:00
Benoit Marty 6522148e63 Merge branch 'release/0.1.0' 2019-07-11 15:54:48 +02:00
ganfra 252b2ea30a
Merge pull request #334 from vector-im/feature/general_perf
Feature/general perf
2019-07-11 15:52:00 +02:00
ganfra f493ce44f2 RealmLiveEntity: passes the results and changeSet instead of filtering as it's more efficient 2019-07-11 15:30:01 +02:00
Benoit Marty c4c5069ee5
Merge pull request #332 from vector-im/feature/login_warning
Improve login screen
2019-07-11 15:25:11 +02:00
Benoit Marty 423125b5d9
Merge pull request #333 from vector-im/feature/timeout
Create a TimeOutInterceptor to set specific timeout on some request
2019-07-11 15:24:54 +02:00
Benoit Marty 9e3d29b7d7 Create a TimeOutInterceptor to set specific timeout on some request: login and sync (Fixes #170) 2019-07-11 15:16:25 +02:00
Benoit Marty f65becf7c0 Rework login screen before release 2019-07-11 14:38:30 +02:00
Benoit Marty 80a61cf6b5 Improve dependency download safe path 2019-07-11 14:03:20 +02:00
Benoit Marty 77056aff94
Merge pull request #330 from vector-im/feature/edit_emote
Edit emote
2019-07-11 13:34:46 +02:00
Benoit Marty 65e123d87f Split long lines 2019-07-11 13:32:28 +02:00
Valere d0b145d031 Edit emote 2019-07-11 12:29:02 +02:00
Valere 98306e223b
Merge pull request #322 from vector-im/feature/clean
Improve reply feature
2019-07-11 11:46:00 +02:00
Benoit Marty c9fe1adb77 Add a debug button to test crash of the app 2019-07-11 10:36:59 +02:00
ganfra 1b95336ad3 EventEntity|TimelineEventEntity : remove UUID as primary key and use auto-incremented Long 2019-07-11 10:25:30 +02:00
ganfra f007fb04b8 Timeline: clean listeners 2019-07-11 10:25:30 +02:00
ganfra 141434e8f8 Try getting things off the main thread 2019-07-11 10:25:30 +02:00
ganfra b8669d5ed2 Sync: use a single threaded executor to ensure we have only one sync at a time 2019-07-11 10:23:24 +02:00
Benoit Marty 7a08a11b19 Fix compilation of test 2019-07-10 18:17:03 +02:00
Valere 54b1d18812 Merge remote-tracking branch 'origin/feature/clean' into feature/clean 2019-07-10 18:07:03 +02:00
Valere 3aa30e5f15 Fix reply of reply 2019-07-10 18:06:44 +02:00
Benoit Marty ddf4a81905 Do not display the banner when keys backup is sending keys 2019-07-10 18:04:27 +02:00
Benoit Marty 794fd650a4 Mutualize code, and also, when replying to an edited event, use the last text in the reply prefix content 2019-07-10 17:37:22 +02:00
Benoit Marty 9a57a02996 Cleaner code: add TimelineEvent to special modes 2019-07-10 17:05:32 +02:00
Benoit Marty 7e8cd07e1e Do not send edition if text is identical 2019-07-10 16:32:44 +02:00
Benoit Marty d613abf4b4 i18n edited_suffix 2019-07-10 15:29:52 +02:00
Benoit Marty 06699eaefc Cleaner code 2019-07-10 14:40:08 +02:00
Benoit Marty e5082f662c Fix actually done TODO 2019-07-10 14:19:59 +02:00
Benoit Marty c8ab53e39c Video visibility fix 2019-07-10 14:11:49 +02:00
Valere d424a135a9
Merge pull request #324 from vector-im/feature/quick_react_e2e
Quick react on e2e was not displayed
2019-07-10 14:08:46 +02:00
Benoit Marty e6409d4c60 Create a common canReact() method 2019-07-10 12:10:55 +02:00
Benoit Marty 19c7de687e We can react on e2e room text event 2019-07-10 11:51:09 +02:00
Benoit Marty 1918302297 Reply with formatted content 2019-07-10 11:29:47 +02:00
Benoit Marty 92e3a02389 Create data class instead of Pair 2019-07-10 10:34:32 +02:00
Benoit Marty 0a54801fcc Code clarity 2019-07-10 10:16:21 +02:00
Benoit Marty 228ee52563 Remove extra space in <mx-reply> 2019-07-10 10:07:45 +02:00
Benoit Marty e6c74dc1fe Convert a Task to a ConfigurableTask without parameter 2019-07-09 18:41:08 +02:00
Benoit Marty fe82ad2002 Format 2019-07-09 18:31:04 +02:00
Benoit Marty f66739491a
Merge pull request #321 from vector-im/feature/workManager_clean
Fix bug on WorkManager: clean by tag
2019-07-09 18:30:07 +02:00
Benoit Marty c5dc9d4a9a Fix test 2019-07-09 18:29:32 +02:00
Valere 8f858f8119 Fix / line too long 2019-07-09 18:20:00 +02:00
Benoit Marty 6e036c24b8 Make the test be runnable 2019-07-09 18:14:58 +02:00
Benoit Marty 5e832e07cd Code cleanup 2019-07-09 18:04:19 +02:00
Benoit Marty e9700e04d8 Move method to JsonCanonicalizer and fix test compilation 2019-07-09 18:04:19 +02:00
Benoit Marty c19b1f917f Javadoc 2019-07-09 18:04:19 +02:00
Benoit Marty 4281b5967a Create object for work constraint 2019-07-09 18:04:19 +02:00
Benoit Marty aa743d8469 Ensure we do not cancel Work from other lib or SDK client 2019-07-09 18:04:19 +02:00
Valere a09850b16c
Merge pull request #316 from vector-im/feature/initial_sync_progress
Feature/initial sync progress
2019-07-09 17:58:24 +02:00
Valere 6cb94dd4d6 Fine tune task weights + more measure 2019-07-09 17:42:53 +02:00
Valere c9931e3ba3 Block interaction on initial sync 2019-07-09 17:36:08 +02:00
Valere fc302c1b5a FIx / crash notification drawer empty nam 2019-07-09 17:35:50 +02:00
Benoit Marty 34ac987494 Cleanup 2019-07-09 16:36:46 +02:00
Benoit Marty 24b2387703
Merge pull request #319 from vector-im/feature/code_quality
Feature/code quality
2019-07-09 16:29:44 +02:00
Benoit Marty 8a0c9ae9b0 Rename PreferencesManager to VectorPreferences for code clarity 2019-07-09 16:29:24 +02:00
Benoit Marty a79227424f Convert PreferencesManager file to Kotlin 2019-07-09 16:07:16 +02:00
Benoit Marty ffe0b9712c Convert file to Kotlin 2019-07-09 15:50:15 +02:00
Benoit Marty d92c090c30 Code quality: HashMap / HashSet 2019-07-09 15:40:49 +02:00
Valere 1a4157a663 review 2019-07-09 15:38:44 +02:00
Valere fa81d1a9c7 Fix / revert bad refactor rename 2019-07-09 15:38:44 +02:00
Valere dba4df6836 clean 2019-07-09 15:38:44 +02:00
Valere 4aae1f78d8 moved new strings + @StringRes annotation 2019-07-09 15:38:44 +02:00
Valere 8159a52bd7 cleaning 2019-07-09 15:38:44 +02:00
Valere 95d83db90c WIP 2019-07-09 15:38:44 +02:00
Benoit Marty ac5b0af63e Code quality: remove rule for map() 2019-07-09 15:37:20 +02:00
Benoit Marty e80473903e Code quality: import static 2019-07-09 15:35:27 +02:00
Benoit Marty d08778c674 Code quality: equalTo 2019-07-09 15:33:31 +02:00
Benoit Marty 0919b9460d Code quality: split long lines 2019-07-09 15:26:32 +02:00
Benoit Marty 66a018c79e Code quality: trim() 2019-07-09 15:11:20 +02:00
Benoit Marty dcd64de4b8 Check sdk modules 2019-07-09 15:07:11 +02:00
Benoit Marty a0bd206308
Merge pull request #318 from vector-im/feature/send_state
Fix some bugs on e2e rooms
2019-07-09 15:03:39 +02:00
Benoit Marty ba589e7961 Add missing permission request 2019-07-09 15:03:21 +02:00
Benoit Marty 5dc83d64c1 Fix compilation issue 2019-07-09 15:03:21 +02:00
Benoit Marty 9a4eb8e9a4 add getFileUrl extension 2019-07-09 15:03:21 +02:00
Benoit Marty 058e7153a1 Fix bug 2019-07-09 15:03:21 +02:00
Benoit Marty d7b2371854 Add long click listener to file items 2019-07-09 15:03:21 +02:00
Benoit Marty b0c939866f Download file - typo 2019-07-09 15:03:21 +02:00
Benoit Marty a07f8b615e Download file - WIP 2019-07-09 15:03:21 +02:00
Benoit Marty 12bd85e0a9 Decrypt video file 2019-07-09 15:02:31 +02:00
Benoit Marty 1b82ed5abb Fix regression 2019-07-09 15:02:31 +02:00
Benoit Marty c13ab62187 Fix issue when sending video in encrypted room 2019-07-09 15:02:31 +02:00
Benoit Marty ea77686746 Send file: cleanup 2019-07-09 15:02:31 +02:00
Benoit Marty 8a5612be3d Send file: improve UI feedback 2019-07-09 15:02:31 +02:00
Benoit Marty d24ce27903 Add missing call to contentUploadStateTracker.setFailure 2019-07-09 15:02:31 +02:00
Benoit Marty 2099965508 Avoid returning Result.failure() from appendable worker. 2019-07-09 15:02:31 +02:00
Benoit Marty 829e8da8dc lastFailureMessage is val, not var 2019-07-09 15:02:31 +02:00
Benoit Marty e149ee53de Fix bad mime type for encrypted thumbnail 2019-07-09 15:02:31 +02:00
Valere b73d3b15f8
Merge pull request #317 from vector-im/feature/realm_entity_rework
Feature/realm entity rework
2019-07-09 15:01:05 +02:00
Valere 61d7f23870 remove dead code 2019-07-09 15:00:37 +02:00
ganfra b5650b2b8f Pagination : avoid breaking timeline when paginating twice from same token (race condition) 2019-07-09 14:44:59 +02:00
Valere 8777d13d8b Fix / view source, decrypted source was not correct 2019-07-09 14:22:40 +02:00
Valere d52613d723 Trick / Remove home progress blank paddings 2019-07-09 11:17:36 +02:00
Benoit Marty 7ce476f858
Merge pull request #313 from vector-im/feature/notif_optim
Improve notification drawer manager: Dagger, throttle, and icon for API 9
2019-07-08 17:44:10 +02:00
ganfra dd07f5c2a6 TimelineEvent : update sender data when loading room members and prune event (+ remove RoomSummaryMapper param) 2019-07-08 15:32:24 +02:00
Valere 7e6e09bc19 fix / compilation 2019-07-08 15:30:11 +02:00
Valere 1d11a163af Notification resolver try to decrypt 2019-07-08 15:08:49 +02:00
Valere 57bd103de8 Fix / decrypt room summary latest event 2019-07-08 14:58:49 +02:00
Valere 25bc5001f9 RoomSummary / Use encrypted message screen 2019-07-08 14:57:37 +02:00
Valere e4c52484b1 Fix / ensure equals check for encryption result 2019-07-08 14:57:02 +02:00
Valere a30da07fd1 Fix / timeline auto refresh on new session 2019-07-08 14:12:46 +02:00
Valere ee27d3e047 Fix / clear unknown session map before re-request decrypt 2019-07-08 12:49:22 +02:00
Valere 7096094224 wip crypto 2019-07-08 12:05:41 +02:00
Benoit Marty 443fb41d18 Cleanup 2019-07-08 11:21:26 +02:00
Valere 94b4351e19 wip async crypto + persist 2019-07-08 11:18:27 +02:00
Benoit Marty e90aeff417 ThrottleLast the notification drawer manager 2019-07-08 11:08:23 +02:00
Valere e50dd265d4 merge develop 2019-07-08 10:58:41 +02:00
Valere 4521ea14ee Merge branch 'develop' into feature/realm_entity_rework 2019-07-08 10:55:20 +02:00
Benoit Marty 535b41d818 Rename Debouncer to FirstThrottler 2019-07-08 10:49:32 +02:00
Benoit Marty 21357a1ec7 private fun 2019-07-08 10:32:38 +02:00
Benoit Marty 8c872caf78 Inject IconLoader and BitmapLoader 2019-07-08 10:30:45 +02:00
Benoit Marty 62a81a556e Refresh notification drawer in a background thread. It also fixes the person and room avatar display 2019-07-08 10:26:22 +02:00
Benoit Marty 568e8c8bc0 Do not load user icon before Android Pie 2019-07-08 10:10:39 +02:00
Valere 98a7652403 Put back local echo 2019-07-05 19:13:34 +02:00
ganfra 78951b9155 Timeline event: handle displayName/avatar [WIP] 2019-07-05 19:07:33 +02:00
Benoit Marty 8c86a653b2
Merge pull request #309 from vector-im/feature/crypto_cleanup
Rework Crypto using Try
2019-07-05 19:03:59 +02:00
Benoit Marty ea0526821e Top left Back does not go to previous Activity anymore (Fixes #275) 2019-07-05 18:44:09 +02:00
Valere c503445092 Branch back relation summaries 2019-07-05 18:38:20 +02:00
Benoit Marty 205af8b122
Merge pull request #280 from Dominaezzz/kotlinify-1
Enhance CancelableBag
2019-07-05 18:34:28 +02:00
Benoit Marty 3abb7c8de6
Merge pull request #308 from Dominaezzz/kotlinify-2
Some "Kotlinification"
2019-07-05 18:11:18 +02:00
Benoit Marty a40510da3b
Merge pull request #310 from vector-im/feature/buildkite_pr
Build every branch which is not master, to be able to build PR from external repository
2019-07-05 18:06:14 +02:00
Benoit Marty a6ab4a349d Build every branch which is not master, to be able to build PR from external repository 2019-07-05 18:02:13 +02:00
ganfra 79a704d240 Timeline : Uncomment liveChunk to make pagination working 2019-07-05 17:27:24 +02:00
Benoit Marty e5adf174a8 Fix crash when invalid urls for image 2019-07-05 17:00:57 +02:00
Valere f01e796271 Timeline is back 2019-07-05 17:00:13 +02:00
Benoit Marty 302d23ba96 Create a realm locker to fast up next Realm.getInstance calls 2019-07-05 16:28:15 +02:00
Benoit Marty 03050c3f25 Cleanup 2019-07-05 16:11:54 +02:00
ganfra cbfd2af74b Start branching TimelineEventEntity 2019-07-05 16:07:12 +02:00
Benoit Marty f3fab0dc08 Rename ErrorTypes 2019-07-05 15:52:37 +02:00
Benoit Marty 4a512d2425 Create enum for errorType and fix a few issues 2019-07-05 15:43:28 +02:00
Benoit Marty 07f80f43bd Display clear type 2019-07-05 15:15:55 +02:00
Benoit Marty 87dec337d8 Rework Crypto using Try 2019-07-05 14:41:32 +02:00
ganfra b37877746a Introduce TimelineEventEntity to begin with the rework 2019-07-05 14:39:15 +02:00
Dominic Fischer b0e5612bdc Convert java-esque code to Kotlin
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2019-07-05 12:32:21 +01:00
ganfra 25b0cd0e4b Remove some work from UI thread 2019-07-04 19:02:37 +02:00
Benoit Marty 2800d86a57
Merge pull request #302 from vector-im/feature/invitation
Quick action in invitation and composer input type
2019-07-04 18:47:44 +02:00
Benoit Marty 01bc0de2c2 Set again input type for composer, lost after merge 2019-07-04 18:43:36 +02:00
Benoit Marty 857a4c5a26 Quick implementation of accept/reject invitation from notification 2019-07-04 18:14:39 +02:00
Benoit Marty 063c35380a Fix regression on invitation full screen display 2019-07-04 16:44:37 +02:00
Benoit Marty 5322251bc0 Fix wording for direct message tab 2019-07-04 15:37:19 +02:00
Benoit Marty c21b9df9a5 Fix issue with notification from previous account displayed after logout 2019-07-04 15:23:59 +02:00
Benoit Marty f2a52f0253
Merge pull request #297 from vector-im/feature/crypto_stabilization
Safely remove all usage of `!![`
2019-07-04 15:17:26 +02:00
Benoit Marty baaf493cb4
Merge pull request #299 from vector-im/feature/dix_concurrent_sync
Fix / Push worker could launch concurrent syncs
2019-07-04 15:10:18 +02:00
Benoit Marty 6cbd6d3a33 Valere's review 2019-07-04 14:59:29 +02:00
Benoit Marty 72e5aa981a
Merge pull request #298 from vector-im/feature/quote
Fix issue when quoting event in e2e rooms (Fixes #295)
2019-07-04 14:49:53 +02:00
Benoit Marty c0f085cdf8 SyncTask now handles by itself the sync token 2019-07-04 14:46:59 +02:00
Valere 10bc2297d4 Fix / Push worker could launch concurrent syncs 2019-07-04 14:04:36 +02:00
Benoit Marty 8fa5e63b07 Fix issue: reply to e2e event does not contain the base message 2019-07-04 12:52:43 +02:00
Benoit Marty 9d0c50907c Fix issue when quoting event in e2e rooms (Fixes #295) 2019-07-04 12:39:59 +02:00
Benoit Marty e5958983d8 Safely remove all usage of `!![` 2019-07-04 11:44:09 +02:00
ganfra ab23ec3f35 Fix https://github.com/matrix-org/riot-android-rageshakes/issues/5851 (DI) 2019-07-04 10:20:50 +02:00
ganfra a79a6443e7 Realm: update realm dependencie 2019-07-03 20:08:27 +02:00
ganfra 9ff24cbf2a Merge branch 'feature/fix_issues' into develop 2019-07-03 19:46:34 +02:00
Valere 2eee25bbc1 Fix / crash not called on UI Thread 2019-07-03 19:36:25 +02:00
Valere 2a2431e490
Merge pull request #290 from vector-im/feature/fix_crash_npe_cryptomanager
Fix / Rageshake crashes + cleaning
2019-07-03 18:47:45 +02:00
Valere 4041e2e8ca code review 2019-07-03 18:40:42 +02:00
Valere 031c4e5746 Crash on loggout
https://github.com/matrix-org/riot-android-rageshakes/issues/5881
2019-07-03 18:40:04 +02:00
Valere b4ea85fc76 Fix / Rageshake crashes + cleaning !!
https://github.com/matrix-org/riot-android-rageshakes/issues/5880
https://github.com/matrix-org/riot-android-rageshakes/issues/5877
https://github.com/matrix-org/riot-android-rageshakes/issues/5873
https://github.com/matrix-org/riot-android-rageshakes/issues/5871
2019-07-03 18:40:04 +02:00
ganfra 480f14902d Rx: observe on computation by default 2019-07-03 18:28:56 +02:00
Benoit Marty 20c8e8d922 Change the test to apply Google Service plugin to be able to run sonar 2019-07-03 18:18:07 +02:00
Benoit Marty 9cdecced57
Merge pull request #291 from vector-im/feature/start_crypto_earlier
Start crypto manager before handling first sync events
2019-07-03 18:05:44 +02:00
Benoit Marty 60d46538de
Merge pull request #292 from vector-im/feature/sonar_fix
Feature sonar fix and convert remaining Java files to Kotlin
2019-07-03 18:03:23 +02:00
Benoit Marty 223295c2f1 Convert MXUsersDevicesMap to kotlin - Fix issue 2019-07-03 18:01:28 +02:00
Benoit Marty f789fb275d Convert MXUsersDevicesMap to kotlin 2019-07-03 17:34:22 +02:00
Valere a7c12aeb93 Start crypto manager before handling first sync events 2019-07-03 17:17:58 +02:00
Benoit Marty 0ca9a5f68b Convert MXKey to kotlin 2019-07-03 16:45:08 +02:00
Valere 842345df9b
Merge pull request #284 from vector-im/feature/better_incoming_key_verif_mgmt
Moved incoming key/verif to active session holder
2019-07-03 15:54:15 +02:00
Benoit Marty 7d5c31c510 Fix Javadoc issues 2019-07-03 15:52:53 +02:00
Benoit Marty 1ee1c31b9c Fix bugs detected by Sonar 2019-07-03 15:42:35 +02:00
Benoit Marty e9eada77f9 Add comment to run sonar analysis and fix compilation issue 2019-07-03 15:42:35 +02:00
ganfra 93ce0cc5e9 Realm: avoid using monarchy thread for custom work 2019-07-03 14:48:45 +02:00
ganfra eefd09d022 Dagger: don't create MatrixCoroutineDispatchers multiple time!! 2019-07-03 14:48:03 +02:00
ganfra ef597cc67a RoomSummary: set unreadNotification to 0 by default 2019-07-03 14:47:33 +02:00
Valere 5d171e0240 Moved incoming key/verif to active session holder 2019-07-03 12:56:08 +02:00
Valere 39070820be
Merge pull request #283 from vector-im/feature/check_pushrule_on_sync_only
Check Push rule on sync only + fix bad room name in notif
2019-07-03 12:37:49 +02:00
Valere 1fdad38b9d Check Push rule on sync only + fix bad room name in notif 2019-07-03 11:59:45 +02:00
Benoit Marty f41c0311fa Fix done TODO 2019-07-03 11:58:50 +02:00
Benoit Marty a476ac71da Import translations from Riot 2019-07-03 10:20:07 +02:00
manuroe 4b971a9e67 README: Fix develop build links 2019-07-03 10:04:35 +02:00
ganfra bc2d321a84 Merge branch 'feature/Perf' into develop 2019-07-02 23:07:16 +02:00
ganfra 9adeab6bae Perf: revert constraintLayout version as it breaks at the moment 2019-07-02 23:06:40 +02:00
Dominic Fischer 0f3a63e366 Enhance CancelableBag
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2019-07-02 21:46:44 +01:00
Benoit Marty d90698fe92
Merge pull request #279 from vector-im/feature/clear_glide_cache
Clear media cache from the settings and clear cache when signing out
2019-07-02 21:56:31 +02:00
Benoit Marty af0af6e260 Fix bad background color in dark theme 2019-07-02 21:49:52 +02:00
Benoit Marty 6e71fb565a Fix bad layout for button when keyboard is opened (Fixes #268) 2019-07-02 21:23:57 +02:00
Benoit Marty 6c66ab1568 Fix code quality 2019-07-02 21:17:41 +02:00
Benoit Marty 77fd7cd33c Update wording 2019-07-02 20:48:20 +02:00
Benoit Marty 0d329f0338 Clear media cache from the settings and clear cache when signing out 2019-07-02 20:21:40 +02:00
ganfra 2f66321c2a RoomSummary: don't fetch last event by default as it takes some time 2019-07-02 19:59:01 +02:00
ganfra 5b102485bc Perf: timeline should reuse one background looper thread 2019-07-02 19:12:20 +02:00
Benoit Marty 313055b96d Fix bad alignment of button 2019-07-02 18:54:06 +02:00
Valere cbe8236036
Merge pull request #264 from vector-im/feature/fix_double_reaction
Fix / sometime sent reaction is count twice
2019-07-02 18:52:42 +02:00
manuroe 698fc35704 README: Put back link to #riotx:matrix.org 2019-07-02 18:41:28 +02:00
ganfra 37199da52f Merge branch 'develop' into feature/Perf 2019-07-02 18:29:59 +02:00
manuroe 1c69d8e425 README: Update it for the beta launch 2019-07-02 18:06:43 +02:00
Valere ec5ec3375a Fix / sometime sent reaction is count twice
Now use eventId format to check if local echo instead of state
2019-07-02 18:05:14 +02:00
Benoit Marty 156d88e7e2
Merge pull request #263 from vector-im/feature/appId
Rename im.vector.riotredesign to im.vector.riotx
2019-07-02 17:54:22 +02:00
Benoit Marty 504009499f Rename im.vector.riotredesign to im.vector.riotx 2019-07-02 17:27:08 +02:00
ganfra 11bf00030d Merge branch 'develop' into feature/Perf 2019-07-02 17:00:09 +02:00
Benoit Marty 73277c5b08
Merge pull request #259 from vector-im/feature/fix_read_receipts_not_updated
Fix / send read marker for collapsed items
2019-07-02 16:51:53 +02:00
Benoit Marty f21f4dbe91
Merge pull request #262 from vector-im/feature/update_timeline_when_new_key
Update timeline on new session
2019-07-02 16:51:07 +02:00
Benoit Marty 504d7e95fd
Merge pull request #227 from vector-im/feature/encrypt_local_data
Encrypt Realm databases
2019-07-02 16:49:36 +02:00
Benoit Marty 62d2443b85 Remove duplicated method 2019-07-02 16:48:58 +02:00
Benoit Marty bc1edcf33d Code review 2019-07-02 16:48:58 +02:00
Valere 363f52b10c Encrypt Realm databases 2019-07-02 16:48:58 +02:00
Benoit Marty 498b1f2b06
Merge pull request #261 from vector-im/feature/e2e_file
Encrypt attachment in e2e rooms
2019-07-02 16:44:17 +02:00
Valere 92222c269e Update timeline on new session 2019-07-02 16:18:16 +02:00
Valere ee9440c1cb Fix / crash signout bottom sheet 2019-07-02 16:05:01 +02:00
Benoit Marty fe81145680
Merge pull request #260 from vector-im/feature/misc_quick_fixes
Feature/misc quick fixes
2019-07-02 15:56:17 +02:00
Benoit Marty 0980a41752 use file name with extension 2019-07-02 14:59:44 +02:00
Benoit Marty 18a821f3f6 add message 2019-07-02 14:43:07 +02:00
Benoit Marty 14a2570ea4 Preview of encrypted images (first and fast implementation) 2019-07-02 14:35:22 +02:00
Benoit Marty 994ee1d23f Encrypt file + propagate error between chained workers 2019-07-02 14:07:48 +02:00
Benoit Marty f0e43d31f5 Encrypt file WIP 2019-07-02 12:34:56 +02:00
Valere 85e850bcde Fix / unwanted auto-mardown when trailing space 2019-07-02 12:29:36 +02:00
Valere 6cf24cc43b Fix / some state events are missing context action (view source) 2019-07-02 12:21:27 +02:00
Valere c7df433a44 Fix / send read marker for collapsed items
Also remove unnecessary check on matrix id format
2019-07-02 12:08:44 +02:00
ganfra 9378d30601 Merge branch 'develop' into feature/Perf 2019-07-02 11:25:39 +02:00
Valere 58a80ec543 Fix / crash user autocomplete after invite command 2019-07-02 10:43:55 +02:00
Benoit Marty 95ea6db946 Change name from "Riot X" to "RiotX" 2019-07-02 10:42:45 +02:00
Benoit Marty a47af4d915 Split buildkite build into two build to reduce build time and resource consumption. 2019-07-02 10:41:18 +02:00
Benoit Marty 0c2d3f36c3 Encrypt file WIP 2019-07-02 09:56:20 +02:00
Benoit Marty 014d03893a Fix issue after rebase and use classic request for clear image 2019-07-02 09:56:20 +02:00
ganfra 164c8dab09 Glide: try to handle encrypted image. [WIP] 2019-07-02 09:56:20 +02:00
Benoit Marty b54ca5a8a0 Decrypt Attachment - WIP 2019-07-02 09:56:20 +02:00
Benoit Marty 707a4712fc Add some javadoc from Matrix spec and add EncryptedFileInfo where necessary 2019-07-02 09:56:20 +02:00
Benoit Marty 8e76700c8d Handle redacted e2e event 2019-07-02 09:56:20 +02:00
Benoit Marty 3f74c4e933 Report change from https://github.com/matrix-org/matrix-android-sdk/pull/471 2019-07-02 09:56:20 +02:00
ganfra 41ed4b23d8 Update dependencies (tested ok) 2019-07-02 09:39:45 +02:00
Valere ce9fa15bcb Missing ? 2019-07-01 20:54:42 +02:00
Valere f9880283e9 Fix / crash when reporting bug with no active session 2019-07-01 20:47:21 +02:00
Valere f4b124d29f
Merge pull request #257 from vector-im/feature/room_list_improvements
Room list: last event preview - invitations list
2019-07-01 20:38:32 +02:00
Valere fb1f107911
Merge pull request #254 from vector-im/feature/enhance_notif_pre_n
Better summary for pre N devices
2019-07-01 20:38:02 +02:00
Valere 8e653979fd
Merge pull request #258 from vector-im/feature/fix_signout
Fix / signout sign-in not working
2019-07-01 20:37:32 +02:00
Valere a5584d27af QuickFIx / regression cannot decrypt message (no sender_key) 2019-07-01 20:34:42 +02:00
ganfra de9a5a3d12 Perf: eventHtmlRenderer is slow to build, get only one instance 2019-07-01 20:19:50 +02:00
Valere 95d64008aa Move to sdk 2019-07-01 20:12:05 +02:00
ganfra 19202cfca6 Perf: try to get better 2019-07-01 20:05:48 +02:00
Valere ca2223f201 Force passing realm to TimelineEvent factory 2019-07-01 19:46:18 +02:00
Valere a1ddd73d7d Fix / signout sign-in not working 2019-07-01 18:55:40 +02:00
Benoit Marty 01e3e71f98 Handle room invitation actions 2019-07-01 18:50:33 +02:00
Valere 8fefdc1019 Fix crash on logout 2019-07-01 16:56:24 +02:00
Benoit Marty 07309c90e1 Room list: rework invitations 2019-07-01 16:29:04 +02:00
Valere 0bdde4d994 Better summary for pre N devices 2019-07-01 16:19:46 +02:00
Benoit Marty b25098c52d Fix issue on invitation: restore background and composer could be opened 2019-07-01 15:24:28 +02:00
Benoit Marty 5e9ecfbcc0 Room summary; handle encrypted events 2019-07-01 15:12:35 +02:00
Benoit Marty e1b6f4bd74 Fix issue after rebase 2019-07-01 15:12:35 +02:00
Benoit Marty 4d79485fee Last event on room list 2019-07-01 15:12:35 +02:00
Valere 9224fcabfa Fix #253 / Image with no mimetype in info 2019-07-01 15:10:12 +02:00
Valere 0d433b2620 fix / missing reaction event in filter 2019-07-01 13:53:10 +02:00
Valere 6a829caf0f Perf / filter events for aggregation updater 2019-07-01 13:33:43 +02:00
ganfra d643abbb22 Sender name: fix for not synced events. 2019-07-01 13:20:03 +02:00
Valere e838794587 Do not check push rule on initial sync 2019-07-01 13:08:16 +02:00
Valere b0ad568df0 Fix / fdroid notif was broken due to merge 2019-07-01 13:07:52 +02:00
ganfra 4739aea793 Dagger: inject dependencies earlier into activity/fragment 2019-07-01 11:41:27 +02:00
Valere 3960742f38
Merge pull request #250 from vector-im/feature/fix_impure_reducers
Fix impure reducer and use live event
2019-07-01 11:33:34 +02:00
Benoit Marty 2eef0a6162 Fix ban and kick bad message error (Fixes #184 Fixes #248) 2019-07-01 11:27:57 +02:00
Benoit Marty 466a39d239 Robustness 2019-07-01 11:08:05 +02:00
Valere e78b703387 Fix / show source was showing content 2019-07-01 10:47:10 +02:00
Benoit Marty 9df928e709 Fix bad background color in dark themes 2019-07-01 10:04:02 +02:00
Valere a734c699ad Fix impure reducer and use live event 2019-07-01 09:56:00 +02:00
Valere b402bf829b Fix copy and inconsistency
thx kr0mbel
2019-06-28 18:45:49 +02:00
Benoit Marty 4d7f1b4fee Report Bug by default 2019-06-28 16:57:01 +02:00
Benoit Marty 38ceb6f52a Fix bad FCM token stored 2019-06-28 16:54:53 +02:00
Valere 419ef7b46f
Merge pull request #243 from vector-im/feature/reply_e2e
Reply in e2e room
2019-06-28 16:07:08 +02:00
Benoit Marty 4ad23f0f37 Fix bad copyright block 2019-06-28 16:05:36 +02:00
Benoit Marty 0f039fce32 Add 30 missing copyright block 2019-06-28 15:59:20 +02:00
Benoit Marty fef1c7cc45 Set default theme in pref screen 2019-06-28 15:36:57 +02:00
Benoit Marty 7ff2477a4f
Merge pull request #241 from vector-im/feature/api16
min API 19 - tested
2019-06-28 15:06:40 +02:00
Benoit Marty 7af55a48f6 Fix lint warning 2019-06-28 15:05:57 +02:00
Benoit Marty ee402fd328 Now with min API set to 19, we do not need Left and Right attribute, Start and End is enougth. For the moment, just reduce the severity 2019-06-28 14:57:41 +02:00
Valere 75c1718252 code review 2019-06-28 14:57:22 +02:00
Valere f83491fdfc Fix / impure reducer in action view model 2019-06-28 14:57:22 +02:00
Valere a9dd06562a Reply in e2e room
+ Add reply option in e2e room
+ Fix bug 242
+ Show preview of messages in menu and in text composer preview
2019-06-28 14:57:22 +02:00
Benoit Marty cea8abb9b1 Fix issue in test and add a test for Json canonicalization (will pass when reply_e2e branch will be merged) 2019-06-28 14:27:08 +02:00
Benoit Marty 13a0b809e1 Fix compilation issue in release 2019-06-28 14:08:38 +02:00
Benoit Marty d28e9862a2
Merge pull request #236 from vector-im/feature/lab_show_hidden_events
Feature/lab show hidden events
2019-06-28 12:51:31 +02:00
Benoit Marty bf68a6bafc Comment used labs settings 2019-06-28 12:50:56 +02:00
Valere b14a6224ba Add lab option to show hidden events in timeline
+ cleaning labs settings
2019-06-28 12:45:08 +02:00
Valere b92cc524b6 Fix / Day separator flickering in timeline
Sending events were not filtered, so sending events like reactions would make the day separator appear
2019-06-28 11:33:33 +02:00
Benoit Marty 17a4a86ad1
Merge pull request #220 from vector-im/feature/restrict_reaction_emoji
Only show reactions with an emoji key
2019-06-28 11:29:32 +02:00
Benoit Marty 0a908136b6 Only show reactions with an emoji key 2019-06-28 11:28:51 +02:00
Benoit Marty 83ceb36a12
Merge pull request #233 from vector-im/feature/suggestion
Feature suggestion
2019-06-28 10:47:14 +02:00
Benoit Marty 2ef53e2066 Fix compilation issue after rebase 2019-06-28 10:44:02 +02:00
Benoit Marty 519f49b50d Add report bug in the menu 2019-06-28 10:40:00 +02:00
Benoit Marty a550743f2f Report suggestion feature 2019-06-28 10:40:00 +02:00
Benoit Marty 40bf3a15cd Move signout action to the settings General 2019-06-28 10:37:25 +02:00
Benoit Marty 4422ebb77b Remove old menu 2019-06-28 10:28:41 +02:00
Benoit Marty 99271ce5d6
Merge pull request #234 from vector-im/feature/alpha_disclaimer
Show disclaimer at first launch (Fixes #215)
2019-06-28 10:25:55 +02:00
Benoit Marty 2c9280dca6
Merge pull request #235 from vector-im/feature/debounce
Debounce click on room
2019-06-28 10:24:45 +02:00
Benoit Marty 7187cc23a1 code quality 2019-06-28 10:23:27 +02:00
Benoit Marty 10353c9871 add dagger2 licence 2019-06-28 10:12:04 +02:00
Benoit Marty f410538e2f minSdkVersion 19 (mainly for security reason and also because of MotionLayout only supported on API 18) 2019-06-28 10:06:36 +02:00
Benoit Marty 76fc455d93 Stop using textColorTertiary (fix crash on API 19) 2019-06-28 10:04:43 +02:00
Benoit Marty 22c005d05a
Merge pull request #239 from vector-im/feature/dagger
Feature/dagger
2019-06-28 10:02:20 +02:00
ganfra 604de7eebc Dagger: fix some merging issues 2019-06-28 09:35:34 +02:00
ganfra f18bc9bd00 Dagger: fix no session 2019-06-27 19:12:46 +02:00
ganfra f91959ea96 Merge branch 'develop' into feature/dagger 2019-06-27 18:57:49 +02:00
ganfra 2063a3e535 Merge branch 'develop' into feature/dagger 2019-06-27 18:56:23 +02:00
Benoit Marty a1c22c9aa6 Remove useless property for a SDK 2019-06-27 18:25:50 +02:00
Valere d5625b95fe Fix / use senderId when display name cannot be resolved 2019-06-27 17:58:11 +02:00
Benoit Marty d205f63928 Debounce click on room 2019-06-27 17:32:49 +02:00
Benoit Marty bd8d6f92da Update wording 2019-06-27 16:04:02 +02:00
Benoit Marty f9c8e4f85a Show disclaimer at first launch (Fixes #215) 2019-06-27 16:01:11 +02:00
ganfra 1fa7b7367a Dagger: merge develop compiling now. 2019-06-27 15:25:01 +02:00
Valere 0765d6d1da Fix / Action bottom sheet show preview for encrypted messages 2019-06-27 15:21:10 +02:00
Benoit Marty f98f0e1a87
Merge pull request #232 from vector-im/feature/settings_v2_clean_notif
Cleans notification pref screen
2019-06-27 14:12:12 +02:00
Valere fb7ada72dd Fix / register/unregister pusher 2019-06-27 14:08:54 +02:00
Valere 338de3ebf5 Cleans notification pref screen
+ fix troubleshoots
2019-06-27 12:21:38 +02:00
Benoit Marty fb43c87107
Merge pull request #231 from vector-im/feature/fcm_privacy
Upgrade firebase messaging version and disable Firebase Analytics
2019-06-27 11:55:19 +02:00
Benoit Marty f092c40999
Merge pull request #228 from vector-im/feature/settings_v2
Split settings into sub sections
2019-06-27 11:54:03 +02:00
Benoit Marty f414f46cba General setting: avatar and display name 2019-06-27 11:53:28 +02:00
Benoit Marty 9ec364b60e
Merge pull request #226 from vector-im/feature/notification_beta
Notification beta
2019-06-27 10:46:27 +02:00
Benoit Marty ae7e617fdd Rename and format and remove duplicate EventType.REDACTION 2019-06-27 10:46:04 +02:00
Benoit Marty d1642c928a Move specific classes for FDroid into FDroid variant source code 2019-06-27 10:46:04 +02:00
Benoit Marty 5e619f2593 Upgrade firebase messaging version and disable Firebase Analytics 2019-06-27 10:42:36 +02:00
Benoit Marty 679a4c7f31 Add ignored users icon in the root settings 2019-06-27 10:17:57 +02:00
Benoit Marty 76b890fe06
Merge pull request #230 from vector-im/feature/e2e_hint
Change hint for encrypted room (fix #210)
2019-06-26 21:05:19 +02:00
ganfra b2d2582e0f Merge branch 'develop' into feature/dagger [WIP] 2019-06-26 20:58:46 +02:00
Valere 715b44ec79
Merge pull request #229 from vector-im/feature/update_icons
Feature/update icons
2019-06-26 19:30:55 +02:00
Benoit Marty 25b7bf76bf Change hint for encrypted room (fix #210) 2019-06-26 18:49:55 +02:00
Benoit Marty b69940a5da Hide some settings for notifications 2019-06-26 18:28:45 +02:00
Benoit Marty 28f2bb3ebd Use im.vector.riotredesign.core.preference.VectorPreferenceCategory 2019-06-26 18:15:50 +02:00
Valere 6bf940bedf Updated login logo 2019-06-26 18:09:42 +02:00
Benoit Marty 56fc223930 Add missing point in the interrogation point 2019-06-26 18:00:51 +02:00
Valere 3e00576230 New status bar notification icons 2019-06-26 17:55:07 +02:00
ganfra 6e7adaec59 Dagger: prepare for multi session [WIP] 2019-06-26 17:51:24 +02:00
Benoit Marty 9fd9124643 Disable some unimplemented pref 2019-06-26 17:43:36 +02:00
Benoit Marty ad3d303405 Fix issue in notification preference 2019-06-26 17:37:03 +02:00
Benoit Marty 7c47c6a033 split preference (Kotlin) 2019-06-26 17:20:26 +02:00
Valere 33f17e4c5c Quick Fix / DI crash when not logged in 2019-06-26 17:15:10 +02:00
Valere 289b2a4eb1 Launch icons update 2019-06-26 17:14:28 +02:00
Benoit Marty e63f51821f split preference (XML) 2019-06-26 15:26:08 +02:00
Benoit Marty 8370f4fc76 rename file 2019-06-26 15:05:07 +02:00
Benoit Marty 5feebeba01 Integrate new icons for preference root screen 2019-06-26 15:01:46 +02:00
Benoit Marty 0c0ef38b4f Fix notification on FDroid 2019-06-26 13:32:55 +02:00
Benoit Marty bec5ca1420
Merge pull request #213 from vector-im/feature/notification_alpha
Riot X alpha - Notification phase 1
2019-06-26 13:30:22 +02:00
Benoit Marty 895f0f0079 Fix compilation issue on FDroid 2019-06-26 12:21:30 +02:00
Benoit Marty 134c2fcd42 Notification: Fix TestAccountSettings test 2019-06-26 12:19:54 +02:00
Benoit Marty 2625e11508 rename method 2019-06-26 12:19:54 +02:00
Benoit Marty 9fa3a75fb6 Notification: display room avatar 2019-06-26 12:19:54 +02:00
Benoit Marty b388be93c8 Notification: better code 2019-06-26 12:19:54 +02:00
Benoit Marty 5a1242109d Notification: display rooms and users' avatars 2019-06-26 12:19:54 +02:00
Benoit Marty 4f0ed402bf Notification: cleanup 2019-06-26 12:19:54 +02:00
Benoit Marty f6c500d120 Notification: dismiss all on sign out 2019-06-26 12:19:54 +02:00
Benoit Marty 785f33177d Notification: open room and clear drawer - Smart reply - Mark as read - dismiss all 2019-06-26 12:19:54 +02:00
Benoit Marty 328f090723 Code quality: i18n 2019-06-26 12:19:54 +02:00
Benoit Marty ce3242c748 Code quality: preference 2019-06-26 12:19:54 +02:00
Benoit Marty 71ae99012b Code review and cleanup 2019-06-26 12:19:54 +02:00
Benoit Marty ab0141a5c6 Fix issue after rebase 2019-06-26 12:19:54 +02:00
Valere abb1c3f3c4 Fix / try to get edited message content first 2019-06-26 12:19:54 +02:00
Valere 1feb1f9c3f Fix test 2019-06-26 12:19:54 +02:00
Valere 090ee1d4e9 Fix / ignore message sent by me in push rules 2019-06-26 12:19:54 +02:00
Valere 7821ca12fd Fix / fetch from realm without copy (proxy error) 2019-06-26 12:19:54 +02:00
Valere c01af6ac78 Stop notification using preference when disabled 2019-06-26 12:19:54 +02:00
Valere 74099be316 Remove / Add pusher from enable notif preference
+Added Retrofit/Moshi null serializer for pusher kind
2019-06-26 12:19:54 +02:00
Valere 4e6b34b9d1 Fix issues on Notification Event resolver 2019-06-26 12:19:54 +02:00
Valere 6743dc6273 Set sync timeout to 30s when in foreground 2019-06-26 12:19:54 +02:00
Valere 288ebe48fd Doc / quick fixes 2019-06-26 12:19:54 +02:00
Valere 9ae9830de4 Fix / compilation in gplay flavor 2019-06-26 12:19:54 +02:00
Valere 0584fc3666 Get real push rules from server and evaluate them 2019-06-26 12:19:54 +02:00
Valere 2e417a9143 Basic FCM vs fdroid mode 2019-06-26 12:19:54 +02:00
Valere 0e46fc4c0a WIP 2019-06-26 12:19:54 +02:00
Benoit Marty 79735c6338 Introduce activity-alias for Launcher Activity 2019-06-26 12:16:05 +02:00
Valere 4505d13385 Fix / SAS verification infinite waiting on last step
Missing state update to verified after mac verification
2019-06-26 10:46:58 +02:00
Valere 8fe0bd5abe
Merge pull request #214 from vector-im/feature/update_quick_reactions
Feature/ Update quick reactions
2019-06-25 15:47:17 +02:00
Valere 98176b9760 Cleaning (code review) 2019-06-25 15:45:44 +02:00
Benoit Marty 104ffc930d
Merge pull request #200 from vector-im/feature/permalinks
Handle permalink with the new navigation UX - WIP
2019-06-25 09:34:58 +02:00
Benoit Marty 2741780553 Change scope of PermalinkHandler 2019-06-25 09:34:12 +02:00
Benoit Marty 625242a3d9 handle all themes 2019-06-25 09:34:12 +02:00
Benoit Marty 401f878a9c Fix ConcurrentModificationException 2019-06-25 09:34:12 +02:00
Benoit Marty 3e97503220 Avoid erasing all cache 2019-06-25 09:34:12 +02:00
Benoit Marty 76ade2957e Handle permalink click 2019-06-25 09:34:12 +02:00
Benoit Marty b1e009f8b4 Handle eventId v4 (https://matrix.org/docs/spec/rooms/v4#event-ids) 2019-06-25 09:33:52 +02:00
Benoit Marty 90f420b287 Cleanup PermalinkHandler and Navigation 2019-06-25 09:33:52 +02:00
Benoit Marty 73b55fd975 Group navigation cleanup 2019-06-25 09:33:52 +02:00
Benoit Marty ad601c7d5a
Merge pull request #189 from vector-im/feature/third_party_notice
Feature/third party notice
2019-06-25 09:32:08 +02:00
Benoit Marty 046aac74c2 Add link for reference 2019-06-25 09:31:45 +02:00
Benoit Marty 0998ffb5f2 Update open source license file 2019-06-25 09:31:45 +02:00
Benoit Marty 8ff6fbb153 Handle redirection 2019-06-25 09:31:45 +02:00
Benoit Marty 9d3a8e7c40 Add usage of com.google.android.gms:oss-licenses-plugin to list open source licenses 2019-06-25 09:31:45 +02:00
Valere 56aaa9dce3 Fix / updated unicode for smiling 2019-06-24 16:15:26 +02:00
Valere 43ead66991 Update quick reactions to new design 2019-06-24 16:13:58 +02:00
Benoit Marty 92eb7d55dc
Merge pull request #207 from vector-im/feature/version
Display some version of Riot and SDK (Fix #185)
2019-06-21 17:07:55 +02:00
Benoit Marty 1cfc85a772 Display some version of Riot and SDK (Fix #185) 2019-06-21 11:13:16 +02:00
ganfra 47968c9447 Dagger: everything should be injected ok now 2019-06-21 10:36:02 +02:00
ganfra 07fee8ed3d Dagger: continue reworking on app and sdk [WIP] 2019-06-20 19:26:59 +02:00
Benoit Marty 1eb374fa49
Merge pull request #188 from vector-im/feature/disambiguation
Disambiguation of display names
2019-06-20 17:29:01 +02:00
Benoit Marty 285da114e7 better code (ganfra's review) 2019-06-20 17:27:15 +02:00
Benoit Marty 34870591b4 Update wording 2019-06-20 17:22:38 +02:00
ganfra ee87c253fe Dagger: continue working on app side. Now compile but some DI are not branched yet. 2019-06-19 19:40:59 +02:00
ganfra 9c1f870694 Dagger: start handling app dependencies [WIP] 2019-06-18 20:00:20 +02:00
Benoit Marty 56e0680398 Remove unused class 2019-06-18 16:11:24 +02:00
Benoit Marty 8c0a1ed37d Rename "sender" to "senderId" for code clarity 2019-06-18 16:11:24 +02:00
Benoit Marty 625500212d Manage display name disambiguation (Fixes #172) 2019-06-18 16:09:48 +02:00
Benoit Marty b1f5b3ad96
Merge pull request #187 from vector-im/feature/issues_fix
Add a few feature
2019-06-18 16:03:36 +02:00
Benoit Marty 02f84a3b53 View source of encrypted event 2019-06-18 13:14:39 +02:00
Benoit Marty 7fe662598b Handle click on encryption message 2019-06-18 12:56:08 +02:00
Benoit Marty 5bfa67b442 Handle click on encrypted message 2019-06-18 12:45:24 +02:00
Benoit Marty a53e40e1ee Create MessageInformationDataFactory for reusability 2019-06-18 12:33:07 +02:00
Benoit Marty 273c8a19b8 Fix UI issue notification troubleshot screen 2019-06-18 10:30:56 +02:00
Benoit Marty 53bdd58c1b Fix UI issue on BugReportActivity (send button not visible) 2019-06-18 10:25:13 +02:00
Benoit Marty 51879845f2
Merge pull request #186 from vector-im/feature/crypto_up
Crypto work
2019-06-17 19:07:24 +02:00
Benoit Marty f2372841f6 KeysBackup: import change from https://github.com/vector-im/riot-android/pull/3127 2019-06-17 19:07:04 +02:00
Benoit Marty 0497d14a08 SAS: import change from https://github.com/matrix-org/matrix-android-sdk/pull/467 2019-06-17 19:06:32 +02:00
Benoit Marty 0b6b95110f
Merge pull request #182 from vector-im/feature/cryptoKeys
Crypto: Import/export room keys (the old way)
2019-06-17 19:05:43 +02:00
Benoit Marty 191d80e5f5 Fix issue with key importation 2019-06-17 19:05:26 +02:00
Benoit Marty 659ba34fb3 Remove CryptoAsyncHelper and use only coroutine 2019-06-17 19:05:26 +02:00
Benoit Marty 907a1d1a4b Import keys: WIP 2019-06-17 19:05:26 +02:00
Benoit Marty 99d2e8388a Fix crash 2019-06-17 19:04:48 +02:00
Benoit Marty 38b1d24953 Use foldToCallback() whenever it's possible 2019-06-17 19:04:48 +02:00
Benoit Marty b682f3e982 Cleaner code 2019-06-17 19:04:48 +02:00
Benoit Marty 5f0d1d9536 Crypto: export room keys 2019-06-17 19:04:48 +02:00
ganfra c2c2d0b21e Dagger: make SDK DI working 2019-06-17 18:17:37 +02:00
Benoit Marty 8c8a4dcbd1 Fix margin issue when second text is not displayed 2019-06-17 18:13:34 +02:00
Benoit Marty 7e9275831b
Merge pull request #180 from vector-im/feature/fix_timeline
Request can now be canceled properly
2019-06-17 18:01:46 +02:00
Benoit Marty 6266f9e6a1 Handle device deletion the proper way 2019-06-17 17:32:35 +02:00
Benoit Marty 9649e190ef Fix compilation issue after rebase 2019-06-17 16:28:27 +02:00
ganfra 1547045165 Request can now be canceled properly: it should fix the issue with live chunk being deleted. 2019-06-17 15:08:16 +02:00
Benoit Marty 5b0cab3e8a Merge branch 'feature/i18n_sync' into develop 2019-06-17 14:55:54 +02:00
Benoit Marty 97b066b8fa Import strings from Riot 2019-06-17 14:55:17 +02:00
ganfra 4be0ab87fc Dagger: continue adding it to SDK [WIP] 2019-06-16 17:00:47 +02:00
ganfra 3d465f6fdf Start to introduce Dagger into SDK [WIP] 2019-06-14 16:32:23 +02:00
Benoit Marty e3bc88e36c
Merge pull request #183 from vector-im/feature/motionLayout
Better anim of ome button
2019-06-14 16:17:27 +02:00
Benoit Marty eaf1e080ba format file 2019-06-14 16:14:39 +02:00
Benoit Marty 02ef1172ce
Merge pull request #179 from vector-im/feature/cryptoFinalization
Crypto: Delete device
2019-06-14 16:06:23 +02:00
Benoit Marty 8f6f72ca48 Review: Added optional to stage and renamed to "InteractiveAuthenticationFlow" 2019-06-14 16:06:07 +02:00
ganfra df4f0eac20 Merge branch 'feature/sync_ui' into develop 2019-06-13 18:16:45 +02:00
Benoit Marty d353e9314b Crypto: Delete device 2019-06-13 16:48:42 +02:00
Benoit Marty 567c1fd7a5
Merge pull request #175 from vector-im/feature/crypto
Feature/crypto
2019-06-13 15:28:09 +02:00
Benoit Marty ab95cbee92 Improve keys backup banner rendering 2019-06-13 14:20:43 +02:00
ganfra 9dc1684179 Crypto: check for encryption state event to know if room isEncrypted 2019-06-13 11:49:11 +02:00
Benoit Marty c20b256b24 Move KeysBackupStateListener to a dedicated file 2019-06-13 11:13:05 +02:00
Benoit Marty 02d3fea4a9 Move javadoc to interface 2019-06-13 11:10:26 +02:00
Benoit Marty ca98ff5864 Clear crypto database when signing out 2019-06-13 10:58:45 +02:00
Benoit Marty 6cd3b4dd95 Import https://github.com/vector-im/riot-android/pull/3111/files in RiotX 2019-06-13 10:33:04 +02:00
Benoit Marty 480d197ffa Keys share request handling 2019-06-12 18:32:24 +02:00
Benoit Marty a7c0e87f40 Alerter: upgrade lib and change status icon color when alert is displayed 2019-06-12 16:30:30 +02:00
Benoit Marty af1a48d918 SAS: fix issue on emoji rendering 2019-06-12 15:44:25 +02:00
Benoit Marty e17ffc85e7 KeysBackup: save recovery key to file 2019-06-12 14:59:54 +02:00
Benoit Marty 9c654ba72c Use observeEvent when appropriate 2019-06-12 13:19:52 +02:00
Benoit Marty b47ef9220e Keys backup: migrate settings to Epoxy and MvRx 2019-06-12 13:09:43 +02:00
ganfra 0204bade8b Content: hide some internal methods 2019-06-12 10:54:26 +02:00
ganfra 481a25d4df Settings: add some webview content 2019-06-12 10:53:48 +02:00
ganfra 3dd161d65a Sync: add progress indicator for sync, need UI inputs. 2019-06-11 16:54:44 +02:00
Benoit Marty 53dd9c3427 Keys backup fix some issue on layout 2019-06-11 16:48:48 +02:00
Benoit Marty 4827b76b80 Integrate keysbackup banner 2019-06-11 15:45:40 +02:00
Valere 1206107a73 Fix / visibility bug after scroll
+ refine animation
2019-06-11 15:43:40 +02:00
Benoit Marty 5621f0661e Merge branch 'develop' into feature/crypto 2019-06-11 14:56:27 +02:00
Benoit Marty 875947dd61 Give the opportunity to override log configuration in local gradle properties file 2019-06-11 14:52:39 +02:00
Benoit Marty 61b1d83bbd Clean 2019-06-11 14:37:02 +02:00
Benoit Marty 64e5fed7ac Fix issue: lastSeenTs can be null 2019-06-11 13:57:35 +02:00
Benoit Marty f6c36670c3 Rename class members and class name for code clarity 2019-06-11 13:32:09 +02:00
Benoit Marty 2e39a678db Code quality 2019-06-11 10:15:50 +02:00
Benoit Marty 6dacb9894e Merge branch 'develop' into feature/crypto 2019-06-11 10:11:53 +02:00
ganfra 612b13808f Crypto: clean some code + add failure send state (but not handled yet). 2019-06-10 19:22:48 +02:00
Benoit Marty 90a011c4e4 Fix issue on animation 2019-06-10 18:16:06 +02:00
Benoit Marty 56f1c726b2 FAB Motion WIP
FAB Motion WIP

FAB Motion WIP

FAB Motion WIP
2019-06-10 17:22:00 +02:00
Benoit Marty 6323183119 Ganfra's review: use sumBy() instead of reduce() 2019-06-10 17:06:58 +02:00
Benoit Marty 3439a9ca27
Merge pull request #173 from vector-im/feature/create_room
Create Room screen
2019-06-10 17:01:44 +02:00
Benoit Marty 9772bbe157 Ganfra's review: revert change 2019-06-10 16:58:48 +02:00
Benoit Marty fa297a7b6a Ganfra's review: use NavigationViewModel to open the drawer 2019-06-10 16:53:21 +02:00
Benoit Marty b48c920292 Ganfra's review: use simple ViewModel 2019-06-10 16:45:42 +02:00
Benoit Marty c0be04f46c Ganfra's review: use observeEvent 2019-06-10 16:39:46 +02:00
Benoit Marty b437837809 Ganfra's review: use RealmQueryLatch 2019-06-10 16:35:51 +02:00
Benoit Marty 33f8059846 Increase connect timeout from 30 seconds to 1 minute, for slow Homeserver (should fix #170) 2019-06-10 15:57:42 +02:00
Benoit Marty 4eab0a3704 Add foreground attribute 2019-06-10 15:35:05 +02:00
Benoit Marty 933e06a7ef Auto collapse toolbar 2019-06-10 15:24:25 +02:00
Benoit Marty ad8baf8091 Fix screen rotation issue 2019-06-10 14:13:14 +02:00
Benoit Marty 598245531a Fix compilation issue after rebase 2019-06-10 13:45:34 +02:00
Benoit Marty 4f044c0cd6 Create room screen - Navigate to change protocol 2019-06-10 13:39:51 +02:00
Benoit Marty 77fc793e89 Create room screen - Navigate to freshly created room 2019-06-10 13:39:51 +02:00
Benoit Marty aa95ce3d02 Create room screen - Better navigation pattern 2019-06-10 13:39:51 +02:00
Benoit Marty 4c5bffe0f5 Create room screen - WIP TODO: screen rotation - navigate to created room 2019-06-10 13:39:51 +02:00
Benoit Marty ed18a504e4 Open drawer when clicking on group avatar 2019-06-10 13:39:11 +02:00
Benoit Marty aec7e72dcf Add missing files for Status theme 2019-06-10 13:39:11 +02:00
ganfra f2722f4766 Crypto: fix a small issue 2019-06-07 20:38:39 +02:00
ganfra 07c516ccdd Merge branch 'develop' into feature/crypto 2019-06-07 19:25:55 +02:00
ganfra 81330d30cf Merge branch 'develop' into feature/crypto 2019-06-07 18:53:24 +02:00
Valere 8f2c005d82
Merge pull request #168 from vector-im/feature/aggregation_p1_wrapup
Feature/aggregation p1 wrapup
2019-06-07 16:40:22 +02:00
Valere a4a813708c Fix / send state always returning Unknown 2019-06-07 16:39:45 +02:00
ganfra 664e5354d3 Crypto: continue cleaning + fix some issues. 2019-06-07 16:01:24 +02:00
Valere 10251b906a clean / format 2019-06-07 15:57:55 +02:00
Valere c9240c2dce Fix / disable context menu on not sent messages 2019-06-07 15:49:41 +02:00
Valere 220e6224e7 Merge develop 2019-06-07 15:42:04 +02:00
Valere d3518c4944
Merge pull request #161 from vector-im/feature/fix_timeline_clicks
Fix / click|longclick link interference
2019-06-07 14:43:04 +02:00
Valere 5f34e58bd3 Fix / style on emoji picker appbar layout 2019-06-07 14:29:42 +02:00
Valere 438404b5ba code review cleaning 2019-06-07 14:14:51 +02:00
Valere 651d0472cd Show preview for notice events in context menu + fix merge issues 2019-06-07 14:14:51 +02:00
Valere 5cf9deb329 Menu action for non room messages 2019-06-07 14:14:51 +02:00
Valere 7409003949 Fix / Bug aggregation on initial sync
fix / All messages were not processed due to a test exiting the for loop
+ started adding context menu for non room messages
2019-06-07 14:14:51 +02:00
Valere 3f1bf00fdd Fix / use emoji Compat font for view reaction screen 2019-06-07 14:14:51 +02:00
Valere 04576ba7fd Permalink message action + Fix crash on injection of navigator 2019-06-07 14:14:51 +02:00
Valere 053dc1d8dd Show 'view reaction' option in context menu 2019-06-07 14:14:51 +02:00
Valere 834a865dfa Show text with only few emojis in bigger 2019-06-07 14:14:51 +02:00
Valere e22b555b58 Refactoring (duplication in Message Item Factory) + cleaning 2019-06-07 14:14:51 +02:00
Valere 297f202005 Fix / Local echo taking too much time 2019-06-07 14:14:51 +02:00
Valere 440442bb99 New View Reactions bottom sheet
+ visible on reaction long click
+ Reaction pills size adapt to count, and number format
2019-06-07 14:14:51 +02:00
Valere d2f648edec Use Font emoji compat for quickReactions and pills 2019-06-07 14:14:51 +02:00
Valere 53c91dc0c2 Ignore server aggregation until API ready 2019-06-07 14:14:51 +02:00
Valere adbfde94d6 Fix / move read receipt on m.replace events 2019-06-07 14:14:51 +02:00
Valere 1b3ec2d0fb fix / review 2019-06-07 13:38:58 +02:00
Valere ecccb80e04 Fix / No elevation on toolbars
In order to work se need to set a background on toolbar
2019-06-07 13:26:03 +02:00
Benoit Marty 11914ca188
Merge pull request #166 from vector-im/feature/debug_signature
Share the debug signature to all machines which build the debug APK
2019-06-07 10:38:40 +02:00
Benoit Marty fb9627b7c4 Share the debug signature to all machines which build the debug APK 2019-06-07 10:17:14 +02:00
Benoit Marty b782e5e8af
Merge pull request #164 from vector-im/feature/cleanup
Theme integration
2019-06-06 19:27:39 +02:00
Benoit Marty b67c686d67 Fix lint warning 2019-06-06 19:23:14 +02:00
ganfra c4d7711d2f Crypto: finally get a working encrypt/decrypt + SAS 2019-06-06 19:10:04 +02:00
Benoit Marty f2da46b5f9 Dark dialog 2019-06-06 19:09:59 +02:00
Benoit Marty a0b2d4c8f2 L'oeil à l'interieur 2019-06-06 18:56:54 +02:00
Benoit Marty 1f85f4a007 Remove unused themes 2019-06-06 18:47:27 +02:00
Benoit Marty 2c2f517e52 Hot change of theme - WIP 2019-06-06 18:34:14 +02:00
Benoit Marty bfbb29b2cf Theme FAB menu 2019-06-06 16:45:45 +02:00
Benoit Marty dd563ec9ae Fix issue in theme 2019-06-06 15:56:05 +02:00
Benoit Marty e2d36aa213 Fix issue in theme 2019-06-06 15:24:04 +02:00
Benoit Marty 2cc2844abf Fix issue in theme 2019-06-06 15:16:56 +02:00
Benoit Marty 75b8932395 Fix issue in theme 2019-06-06 14:37:30 +02:00
Benoit Marty 311d8484a2 Add test Theme Activity 2019-06-06 13:39:08 +02:00
Benoit Marty 917282303d Import test Activities from Riot 2019-06-06 10:28:11 +02:00
Benoit Marty 8afe31192b Fix issue in themes 2019-06-06 09:50:26 +02:00
Benoit Marty bbbf64f543 Fix issue in themes 2019-06-06 09:39:08 +02:00
ganfra 6b0ab10231 Crypto: continue threading rework. WIP to shash 2019-06-05 22:18:16 +02:00
Benoit Marty acedff4e89 FAB Menu
FAB Menu WIP

FAB Menu WIP

FAB Menu WIP
2019-06-05 18:59:50 +02:00
Benoit Marty f9bfda059f Theme rework WIP 2019-06-05 16:16:37 +02:00
Benoit Marty 94c91e0dae Theme rework WIP 2019-06-05 15:58:00 +02:00
Benoit Marty 48fadd1a11 Theme rework WIP 2019-06-05 15:27:35 +02:00
Benoit Marty 51f5594ea0 Theme rework WIP 2019-06-05 14:57:30 +02:00
Benoit Marty 91114e2afe Quick and dirty implementation of password reveal on HomeScreen 2019-06-05 10:17:59 +02:00
Benoit Marty e058fa9069 Add elevation on Toolbar 2019-06-04 18:10:38 +02:00
Benoit Marty 2ba7ec48f6 Code cleanup, remove duplicate code, and add some comments 2019-06-04 17:36:49 +02:00
ganfra e125862794 Crypto: start reworking threading - WIP (to squash) 2019-06-04 16:26:37 +02:00
Benoit Marty ab6220a4cb Fix crash when reducing empty collection 2019-06-04 15:12:09 +02:00
Benoit Marty 647a066c90
Merge pull request #159 from vector-im/feature/home_rework
Feature/home rework
2019-06-04 12:54:38 +02:00
Benoit Marty 2b6eee4237 Merge branch 'develop' into feature/home_rework 2019-06-04 12:54:16 +02:00
Benoit Marty 7eb1be4633 Valere's review 2019-06-04 12:35:50 +02:00
Valere 0ecc53f59c Added simple (limited) message preview 2019-06-04 12:02:34 +02:00
Benoit Marty e3983deacc dispose uiDisposable in onDestroy() 2019-06-04 11:02:40 +02:00
Valere 9357059cbc
Merge pull request #155 from vector-im/feature/aggregation_local_echo
Local echo for reactions/edits/redacts
2019-06-04 10:43:22 +02:00
Benoit Marty 9061d5c972 better code 2019-06-04 10:37:49 +02:00
Valere 471170a3e0 Fix / click|longclick link interference
+ some missing long click (image content wrapper)
+ update markwon version
2019-06-04 10:29:56 +02:00
Benoit Marty 43521c6e09 Cleanup 2019-06-04 10:25:29 +02:00
Benoit Marty fc5edcdf0f Expanding Fab menu 2019-06-04 10:14:48 +02:00
ganfra 3d50393b33 Crypto: continue cleaning. Need threading refactoring 2019-06-03 18:39:37 +02:00
Valere 424fd1347d Code review 2019-06-03 18:23:40 +02:00
Benoit Marty 3475b169ea icon change 2019-06-03 16:46:27 +02:00
Benoit Marty c1fa728c24 Public rooms little rework 2019-06-03 16:44:31 +02:00
Benoit Marty 3b12f5eec7 Room preview toolbar + link on topic 2019-06-03 14:37:22 +02:00
Benoit Marty 12b03a844d Room preview world readable room 2019-06-03 14:29:29 +02:00
Benoit Marty 4716ceb950 Correct initial state 2019-06-03 14:13:56 +02:00
Benoit Marty c91a409258 Do not use execute{ } 2019-06-03 14:06:01 +02:00
ganfra 784d55c16c Crypto: WIP cleaning 2019-06-02 20:34:19 +02:00
Valere 99925d7cf9 Local echo for reactions/edits/redacts 2019-05-29 18:43:33 +02:00
Benoit Marty ae38917a33 Home badge 2019-05-29 18:04:41 +02:00
Benoit Marty 9da727b623 All caught up screen 2019-05-29 16:20:25 +02:00
Benoit Marty 241ee1cb9d Fix issue with Avatar renderer in invitation screen 2019-05-29 15:07:08 +02:00
Benoit Marty e959fe2e9d Hide FAB when list is scrolling 2019-05-29 14:52:08 +02:00
Benoit Marty 6978ec4246 cleanup 2019-05-29 14:19:40 +02:00
Benoit Marty 2b8bbc550c Room list 2019-05-29 13:36:24 +02:00
Benoit Marty 25f6528049 Drawer layout 2019-05-29 10:52:26 +02:00
Benoit Marty 3289cbd6e7 Cleanup 2019-05-29 09:58:29 +02:00
Benoit Marty b91e7e9fb8 Cleanup 2019-05-29 09:39:55 +02:00
Benoit Marty e70a483d6b Introduce Navigator 2019-05-28 21:24:29 +02:00
Benoit Marty 6244913ab9 Join room from room preview 2019-05-28 17:21:54 +02:00
Benoit Marty 33fbcc8ba3 RoomPreview when the room is not world readable 2019-05-28 15:58:30 +02:00
ganfra 3f7d20ec5b Crypto: make encryption working. 2019-05-28 15:54:16 +02:00
Valere 466be1dca5 Fix / issue with avatar url 2019-05-28 15:17:06 +02:00
Valere bdbd521257
Merge pull request #148 from vector-im/feature/edit_message
Edit message in timeline (+ quote / reply)
2019-05-28 14:57:00 +02:00
Valere deba756598 Added doc 2019-05-28 10:51:02 +02:00
Valere 3cb99ff64f Renamed package .internal.session.room.annotation to xx.relation 2019-05-28 10:45:58 +02:00
Valere 20e903914c Cleaning / code review 2019-05-28 10:43:36 +02:00
Valere 71ea1c5f9b Fix / avoid newlines and ws in reply event representations 2019-05-27 18:21:59 +02:00
Valere 4a4c0a3da1 Added auto markdown (as per preference)
Fix / show formatted message preview upon composer in edit/quote/reply
Fix / use aggregated content to decide for actions on long click
2019-05-27 18:08:29 +02:00
Benoit Marty 8f2754493c Fix issue with Avatar URL 2019-05-27 17:42:29 +02:00
Benoit Marty dde94c0d0f Plug screens together 2019-05-27 17:28:18 +02:00
Valere 00d66ffd48
Merge branch 'develop' into feature/edit_message 2019-05-27 17:08:39 +02:00
Valere c7c7211978 Fix layout preview 2019-05-27 17:02:12 +02:00
Benoit Marty 02a81dd9e1 Fix issue 2019-05-27 16:07:26 +02:00
Benoit Marty 02555fcbac Fix compilation issues after rebase 2019-05-27 15:43:26 +02:00
ganfra b9d76f5047 Room list & event : decouple notice events formatting to be used within room controller 2019-05-27 15:37:18 +02:00
ganfra 9f9f4c0755 Home: change some UI in room list 2019-05-27 15:34:11 +02:00
ganfra 1691537a1e Room list : add chronological and alphabetical comparators 2019-05-27 15:32:20 +02:00
ganfra eb2344a43f Home: continue room list rework. 2019-05-27 15:32:20 +02:00
ganfra c0fd06fd2d Home: start reworking room list. 2019-05-27 15:31:26 +02:00
ganfra 275521db70 Home: continue architecture rework. WIP 2019-05-27 15:30:47 +02:00
ganfra 268730e71b Home: start reworking UX [WIP] 2019-05-27 15:28:27 +02:00
Benoit Marty 0feb10315b
Merge pull request #150 from vector-im/feature/rooms_directory
Feature/rooms directory
2019-05-27 14:28:21 +02:00
Benoit Marty 39f69a6c3b Code quality 2019-05-27 14:00:13 +02:00
Valere d9fecabc1f Fix / Edits could break cells merging
Edits are not displayable
2019-05-27 12:30:05 +02:00
Benoit Marty 14611d1f7b Disable log 2019-05-27 12:28:06 +02:00
Benoit Marty fe6e27fd6a Create ButtonStateView with some custom attributes 2019-05-27 12:08:18 +02:00
Valere 0e06908a48 Design update
+ Reply 
+ Better preview in action menu
2019-05-27 11:55:52 +02:00
Benoit Marty 390c6a1977 layout 2019-05-27 10:04:54 +02:00
ganfra af338b0607 Crypto: decryption is working (but still a lot to do) 2019-05-26 19:21:45 +02:00
Valere b45cc0e63f Refactoring/ create custom view for composerLayout in timeline
+ simplify quote/edit composer preview animation
2019-05-25 14:49:35 +02:00
Benoit Marty 128dea2677 Scope and error manager 2019-05-24 22:27:26 +02:00
Benoit Marty cd5e808bb6 Retry join room 2019-05-24 17:38:46 +02:00
Benoit Marty bbf2f96288 Add marging around item 2019-05-24 15:57:28 +02:00
Benoit Marty 2404eeadf0 RoomDirectoryPicker WIP 2019-05-24 15:43:12 +02:00
Benoit Marty 877de1f597 Get Public rooms and join public room 2019-05-24 11:36:04 +02:00
ganfra 3519ad7c8d Crypto : WIP 2019-05-23 19:12:06 +02:00
Valere 3c16701766 Fix / line too long 2019-05-23 17:56:05 +02:00
Valere 1da0b5be76 Fix / Block command completion in Quote and Edit mode 2019-05-23 17:53:11 +02:00
Valere c6e428c047 Fix / remove DebugActivity + clean 2019-05-23 17:27:32 +02:00
Valere 45ea5c356e WIP / edit message 2019-05-23 16:44:51 +02:00
Benoit Marty 5da29e8063 Update MxRx library from 0.7.0 to 1.0.1 2019-05-22 16:36:31 +02:00
Benoit Marty 99087019d2 Input type on message text field (Fixes #129) 2019-05-22 15:33:22 +02:00
Benoit Marty 71f8ce001d Fix Crash when connecting to a homeserver URL with a subpath (Fixes #133) 2019-05-22 15:23:36 +02:00
Benoit Marty bb39db3f42 WIP 2019-05-21 16:33:43 +02:00
Valere b0e80e49b3 QuickFix / Allow to scroll under login button 2019-05-21 16:28:47 +02:00
Valere ec53ce9d00
Merge pull request #141 from vector-im/feature/edit_aggregation
Support incoming message edition
2019-05-21 16:21:46 +02:00
Benoit Marty 52d9adad70 WIP 2019-05-21 15:42:09 +02:00
Valere 118a4392a2 Fix / Support redaction of a m.replace event
+ refactoring
2019-05-21 15:33:16 +02:00
Valere b8c3bdbbf6 Cleaning 2019-05-21 14:27:57 +02:00
Valere d49007538b Fix / Annotate emote also 2019-05-21 14:26:46 +02:00
Valere 6f103101b6 Show edited annotation in timeline + simple edit history 2019-05-21 14:12:18 +02:00
Valere a5a9fa3750 Color provider need to be aware of theme 2019-05-21 14:10:19 +02:00
Valere efcac6b3e4 Fix / Missing schema for realm 2019-05-21 09:50:10 +02:00
Valere 8cb884f10e Support message edition 2019-05-20 18:52:48 +02:00
Benoit Marty 6d8000b957 Log 2019-05-20 17:13:08 +02:00
Benoit Marty f5bd215f36 rework 2019-05-20 16:55:45 +02:00
Benoit Marty 532a028e41 Split again 2019-05-20 16:13:50 +02:00
Valere 2581bf69e0
Merge pull request #139 from vector-im/feature/undo_reaction
Undo Reaction
2019-05-20 14:28:36 +02:00
Valere 2da4823e33 Fix / crash on logout
cannot access deleted object from delete
2019-05-20 13:58:45 +02:00
Valere 70c4b7528d Fix doc 2019-05-20 12:49:35 +02:00
Valere 5dfc0b3c0e Toggle Quick React (agree/disagree like/dislike) 2019-05-20 12:43:02 +02:00
Valere 44d1d063e9 Fix / theme update after rebase was displaying emojis grayed out 2019-05-20 10:16:00 +02:00
Valere 71e50b1bb9 Fix / Missing inject after rebase 2019-05-20 10:16:00 +02:00
Valere 64c307077f Refactoring / PruneWorker should be a task not a worker 2019-05-20 10:16:00 +02:00
Valere 71e364b42f Fix / Hide reactions on redacted message 2019-05-20 10:16:00 +02:00
Valere 054d339b48 Fix / Reaction stays highlighted when undone
When undoing my reaction, the reactji stays selected as if i have done the reaction
2019-05-20 10:16:00 +02:00
Valere e3b9031e71 Fix / day separator flicker when adding reaction
When adding a reaction, the tmp local echo force the display of a new 'day separator' at the bottom if there was no new message for this day yet (then disappears just after -flicker-)
2019-05-20 10:16:00 +02:00
Valere 3fa9d7a1d4 Fix formatting 2019-05-20 10:16:00 +02:00
Valere 6eafa3c43d Undo Reaction 2019-05-20 10:16:00 +02:00
Valere 207579c59f Fix / margin end-right missing for compatibility 2019-05-20 10:14:40 +02:00
ganfra 2780ca30a8 Merge branch 'feature/invites' into develop 2019-05-17 17:38:09 +02:00
Benoit Marty e0e41d9e5c Create common action 2019-05-17 15:33:38 +02:00
Benoit Marty 340830d45f Test passed 2019-05-17 15:21:44 +02:00
Benoit Marty de4662b9d5 Remove all async thread 2019-05-17 15:05:07 +02:00
Benoit Marty c66e82c4ae Create OneTimeKeysManager 2019-05-17 12:39:18 +02:00
Benoit Marty a2210a6b0d WIP 2019-05-17 11:20:22 +02:00
Valere 41c54029b5
Merge pull request #138 from vector-im/feature/send_reaction-phase1
Send reaction view quick react and picker
2019-05-17 09:05:58 +02:00
Valere f9142fedfd Increment reaction when reaction pill clicked in timeline 2019-05-16 18:33:32 +02:00
Benoit Marty 102bc9c01b SAS Tested 2019-05-16 17:28:51 +02:00
Valere ef26519993 Send reaction view quick react and picker
+ fix / Error when to many reactions in cells (more than placeholders -8-)
+ fix / DefaultTimeline quick map access was not shifted when items inserted at given index
2019-05-16 16:35:54 +02:00
Valere e27367e3f2
Merge pull request #137 from vector-im/feature/aggregations_relations
Feature/aggregations relations
2019-05-16 16:22:47 +02:00
Benoit Marty e70fd8e351 canonicalize 2019-05-16 15:36:51 +02:00
Valere dc9db9a438 Fix / was using wrong emoji for agree 2019-05-16 10:56:37 +02:00
Valere 6fe455dac0 Support AddedByMe in reaction + context menu reflect agree/like state 2019-05-16 10:49:52 +02:00
Benoit Marty 1436667e7d Crypto 2019-05-16 10:34:17 +02:00
Valere a9a1fe2aa0 Fix / hide keyboard when showing context action sheet
+ fix reaction colors
2019-05-16 09:33:49 +02:00
Valere d68b447874 Relations Model + Aggregation + Reactions Summary 2019-05-16 09:21:10 +02:00
Valere 11e3a5def8 Moved reactions view to a stub 2019-05-16 09:20:24 +02:00
Valere 6aae943e77
Merge pull request #135 from vector-im/feature/reaction_timeline_ux
Reactions: Display existing reactions below the message
2019-05-15 11:24:00 +02:00
ganfra 8d0322c0c3 Hot fix LL not working 2019-05-15 11:11:38 +02:00
ganfra f60a5f568f Invitation : start polishing but theme has to be rework. Waiting for Nad inputs. 2019-05-14 11:55:48 +02:00
Valere 00fd866cc8 Reactions: Display existing reactions below the message
- Reaction Button Bellow the message
- Upgrade to constraint layout 2.0.0 beta (for Constraint Helpers / Flow)
- Added tap on member name action
- Cleaning
2019-05-14 11:07:53 +02:00
Valere 8929898397
Merge pull request #134 from vector-im/feature/refactor_timeline_layouts
Refactoring / Use view ViewStub to avoid layout xml duplication
2019-05-13 16:59:13 +02:00
Valere 73d5110d67 Code review / Renamed base item class name 2019-05-13 16:29:33 +02:00
Valere 0c559976d6 Default avatar style so small 2019-05-13 09:38:52 +02:00
Valere 540989f38a Fix / ripple effect broken after merge 2019-05-10 18:43:06 +02:00
Valere 608bbdd4ee Refactoring / Use view ViewStub to avoid layout xml duplication 2019-05-10 18:31:56 +02:00
Valere 9a5f96f80b
Merge pull request #132 from vector-im/feature/reactions_chooser
Feature/reactions chooser
2019-05-10 16:59:14 +02:00
Valere 6bf1deb99b Code Review 2019-05-10 12:14:40 +02:00
Valere cfca4927e2 Cleaning 2019-05-10 09:28:52 +02:00
Valere 93cb7b8ce6 Cleaning 2019-05-09 18:43:10 +02:00
Valere dcc430f91b Refactoring / revert reaction module to package in main module 2019-05-09 18:26:32 +02:00
Valere 64216f74ae fix / code quality 2019-05-09 09:15:30 +02:00
Valere 8fd15f4082 Debounce click + avatar click 2019-05-08 15:49:32 +02:00
Valere 38abf31889 Fix / ripple effect after merging 2019-05-08 10:33:14 +02:00
ganfra c39cfbe2ae Invites : allow to accept or reject the invite + clean some code. Require UI polishing. 2019-05-07 19:33:58 +02:00
Valere b00bff0af5 Icon Update / Added timestamp on context menu
+ played with avatar sizes
2019-05-07 18:03:56 +02:00
Valere 56a2a3a065 [WIP] Emoji Reactions 2019-05-07 18:01:51 +02:00
Valere a64f509872 WIP / emoji picker 2019-05-07 17:20:48 +02:00
Valere 359cc67fab fix indent? 2019-05-07 14:13:50 +02:00
ganfra 72cd409735 Invites : start handling invite/left sync 2019-05-06 19:17:30 +02:00
ganfra ceac06caf6
Merge pull request #109 from vector-im/feature/timeline_formatting 2019-05-06 15:01:08 +02:00
ganfra 694df9d845 Timeline : fix some timeline rendering issues (senderName, merge item, left event). Still need to work on it. 2019-05-06 14:26:41 +02:00
Benoit Marty 360d2a3c2e Fix Buildkite file format 2019-05-06 10:18:32 +02:00
Benoit Marty 9cfc67329a Fix Buildkite file format
Fix Buildkite file format
2019-05-06 10:13:29 +02:00
Benoit Marty 75c74c25e1
Merge pull request #119 from vector-im/feature/buildkite
Buildkite - WIP
2019-05-06 10:07:57 +02:00
Benoit Marty 7dce8c29bc Buildkite generate release APK (unsigned) 2019-05-06 10:07:16 +02:00
Benoit Marty 41337d0ca4 Configure pipeline for buildkite 2019-04-30 13:58:13 +02:00
ganfra 287feace12 Timeline : merged events are now handled directly within the recyclerview and do not need a LinearLayout. 2019-04-20 10:42:37 +02:00
ganfra b3e2eca43d Timeline : start to handle merging room member events. Need to get better perf. 2019-04-18 16:50:02 +02:00
Benoit Marty 0818c55b6d
Merge pull request #107 from vector-im/feature/cache
Clear cache and rework Signout
2019-04-17 16:26:48 +02:00
Benoit Marty b1b526a516 Clear cache and rework Signout 2019-04-17 15:55:38 +02:00
Benoit Marty b6cbed1c90 Fix build after merge 2019-04-17 12:50:43 +02:00
Benoit Marty 65e2abf402
Merge pull request #106 from vector-im/feature/apis
Handle filter for sync
2019-04-17 12:35:31 +02:00
Benoit Marty bee5da8f64 Format and avoid long lines 2019-04-17 12:35:18 +02:00
Benoit Marty ab7b807740 Rename APIs 2019-04-17 12:06:15 +02:00
Benoit Marty 4c02721ada Create realm module to avoid losing credentials when Realm model change. 2019-04-17 12:06:15 +02:00
Benoit Marty 5dca31e6f9 Do not loop sync in case of JsonEncodingException (if HS is down) 2019-04-17 12:05:39 +02:00
Benoit Marty d2e1aff453 Convert JsonFilter to FilterId 2019-04-17 12:05:39 +02:00
ganfra dab80466c5 Timeline : extract video thumbnail and upload it 2019-04-16 17:24:28 +02:00
ganfra 2c83ba0824 Timeline : start to handle video media. Probably to amend 2019-04-12 13:46:59 +02:00
ganfra 657f4d3e9c Timeline : handle file/audio message 2019-04-12 12:38:02 +02:00
ganfra 9c9c09db2b Adjust colors for avatar and display names + start handling video in timeline 2019-04-11 19:19:52 +02:00
ganfra c38a601bcc Timeline : apply color for sender 2019-04-11 15:40:07 +02:00
ganfra dcac9aed55 Merge branch 'feature/media_attachment' into develop 2019-04-11 13:21:51 +02:00
ganfra 0225fc7120 Media upload: handle local echo by pinning at the bottom... will probably be changed 2019-04-11 12:48:35 +02:00
Benoit Marty 2a2b4e7bd9
Merge pull request #104 from vector-im/feature/emote
Send emote and update room topic
2019-04-10 09:40:32 +02:00
Benoit Marty 7d872420f0
Merge pull request #103 from vector-im/feature/linkify
Linkification: import workaround done on Riot
2019-04-09 18:37:48 +02:00
Benoit Marty 0055514f90 Update room topic 2019-04-09 18:33:28 +02:00
Benoit Marty 6248cc5552 Send emote 2019-04-09 17:53:23 +02:00
Benoit Marty 347967700b Linkification: import workaround done on Riot 2019-04-09 17:33:47 +02:00
Benoit Marty eaff5ac9f0
Merge pull request #102 from vector-im/feature/completion
Add Slash command parser and handle room member invitation
2019-04-09 16:33:20 +02:00
Benoit Marty 63964ac101 SlashCommand: add TODO 2019-04-09 15:21:17 +02:00
Benoit Marty 3b52fa4be8 Command parser: check userId format 2019-04-09 14:52:31 +02:00
Benoit Marty 81ddb8c5fb SlashCommand: handle user invitation 2019-04-09 14:44:48 +02:00
Benoit Marty eae8f993e6 SlashCommand: implement parser 2019-04-09 14:00:30 +02:00
Benoit Marty fab1d249f4 Autocomplete : better code 2019-04-09 10:03:06 +02:00
Benoit Marty 3f1cc466ed Autocomplete : handle click 2019-04-09 09:58:07 +02:00
Benoit Marty c64d6b6b28 Autocomplete : handle click and better detection for / commands 2019-04-08 18:31:24 +02:00
ganfra c9658918ed Media upload : start handling progress. 2019-04-08 16:39:08 +02:00
Benoit Marty 6d3028c2d7 Autocomplete : start fetching users. Still need to adjust UI and manage selection. 2019-04-08 16:18:36 +02:00
Benoit Marty aec7b73345 Introduce room member service 2019-04-08 15:53:02 +02:00
Benoit Marty 56563412aa Autocomplete : start integrating commands. Still need to work on it 2019-04-08 15:51:35 +02:00
Benoit Marty a9b8c57464 Allow cleartext communication on 127.0.0.1 (Fixes #98) 2019-04-08 15:21:12 +02:00
Benoit Marty 314771cce2 Allow cleartext communication on localhost (Fixes #98) 2019-04-08 15:15:11 +02:00
Benoit Marty bb65dc5247
Merge pull request #99 from vector-im/feature/create_room
Create Room
2019-04-08 14:16:47 +02:00
Benoit Marty 460a72e6b5 Create Room 2019-04-08 13:49:28 +02:00
Benoit Marty 748090d0f9 Avoid critical log for timeout on event thread 2019-04-05 11:07:45 +02:00
Benoit Marty 968258852f Add a log 2019-04-05 11:01:43 +02:00
Benoit Marty 260cc0dd5f Rename class from Riot* to Vector* 2019-04-05 10:40:59 +02:00
Benoit Marty 57cea677e4 Import resource from Riot 2019-04-05 10:14:45 +02:00
ganfra c47eeb9cec Send media: first working implementation. Then, need to fix local echo and handle other types than image. 2019-04-04 19:55:58 +02:00
Benoit Marty e929019247
Merge pull request #97 from vector-im/feature/settings
Feature/settings
2019-04-04 11:39:56 +02:00
Benoit Marty 43659dffd3 Improve signout task 2019-04-04 11:10:45 +02:00
Benoit Marty 82d89825d3 Differentiate icon from Riot one 2019-04-04 11:10:31 +02:00
Benoit Marty 772670252a Make build FDroid pass 2019-04-04 11:10:12 +02:00
ganfra 18591d0287 Media: start to play with uploading media 2019-04-03 23:06:17 +02:00
Benoit Marty 08dacacdda SignOut 2019-04-03 18:25:39 +02:00
Benoit Marty 3091a337c9 Launcher + Animated logo 2019-04-03 14:46:15 +02:00
Benoit Marty 73580493ea Import resource from riot 2019-04-03 14:34:52 +02:00
Benoit Marty c188bb290f Not implemented toast or Snackbar 2019-04-03 14:08:25 +02:00
Benoit Marty d9c8867c0b Introduce common parent for PreferenceFragment 2019-04-03 12:10:02 +02:00
Benoit Marty 87c9f6b2a0 Improve lint configuration 2019-04-03 12:04:24 +02:00
Benoit Marty 6830957d31 Import settings from Riot - not all fonctional of course 2019-04-02 18:08:43 +02:00
ganfra 96a67a44ac Media: grab some code from Riot legacy 2019-04-02 15:59:36 +02:00
Benoit Marty b9b8527b38 Improve RiotFragment 2019-04-02 12:14:16 +02:00
Benoit Marty 10520fb1bd Upgrade string from Riot 2019-04-02 11:57:12 +02:00
Benoit Marty 494d893aa3
Merge pull request #96 from vector-im/feature/vector
Rename `app` to `vector`
2019-04-02 11:46:43 +02:00
Benoit Marty 9048a1dbbe Rename `app` to `vector` 2019-04-02 11:24:54 +02:00
ganfra 04b4f32e16 Sync : add log and continue when read_receipts fail 2019-04-01 17:39:27 +02:00
ganfra d110dac0a6 Merge feature/replace_paged_list into develop 2019-04-01 17:33:53 +02:00
ganfra be6a4efacb Timeline : make tests compile and pass 2019-04-01 15:18:52 +02:00
Benoit Marty f75fe1201d
Merge pull request #95 from vector-im/feature/fix_state
RageShake
2019-03-29 21:13:14 +01:00
Benoit Marty 547272b17b Please TravisCI build 2019-03-29 18:25:44 +01:00
ganfra 94db36d6c4 Fix room summary not being updated when room members are loaded 2019-03-29 11:15:27 +01:00
Benoit Marty 3efcbaaea9 cleanup 2019-03-29 09:49:07 +01:00
Benoit Marty fde09b4a94 Forbid backup 2019-03-28 17:55:38 +01:00
Benoit Marty 317503aa2b userAgent, userId and deviceId in rageshake 2019-03-28 17:49:13 +01:00
Benoit Marty be2dad9b17 ExceptionHandler + Log in files for RageShake 2019-03-28 17:28:20 +01:00
ganfra 2e2d5b9f86 Timeline : add non empty content to displayable conditions => should probably be removed later if we want to handle this case with special epoxy item. 2019-03-28 16:24:40 +01:00
ganfra a7b81a4671 Timeline : remove item animation for now. 2019-03-28 16:07:05 +01:00
ganfra 86a60f7ebd Timeline : fix avatar issues / remove glide logs 2019-03-28 16:06:43 +01:00
ganfra a6366e47fe Timeline : change some database details to make it faster 2019-03-28 12:00:45 +01:00
Benoit Marty bc467340c9 RageShake impleme + Import stuff from Riot 2019-03-28 11:53:28 +01:00
ganfra 4154df7c21 Timeline : stabilize the pagedList replacement. Seems ok for phase0 2019-03-27 19:57:36 +01:00
Benoit Marty 79e273b1ca Add Doc 2019-03-27 18:03:36 +01:00
Benoit Marty 4ab3c39415
Merge pull request #18 from z3ntu/develop_api19
Hacks to get it running on API 19
2019-03-21 15:58:37 +01:00
ganfra ad243ae41f Clean code and update dependencies 2019-03-20 18:24:17 +01:00
ganfra 2898eae566 Timeline : reactivate loaders and get off the main thread 2019-03-20 16:24:50 +01:00
Benoit Marty cbd62b9e93 Rename Realm DB file 2019-03-20 14:36:47 +01:00
Benoit Marty 27374aea3f Add DebugReceiver 2019-03-20 14:12:10 +01:00
Benoit Marty a4ef259bd2 Add FIXME 2019-03-19 18:17:40 +01:00
Benoit Marty 3f10829dcd Use correct wording for room list 2019-03-19 18:11:02 +01:00
Benoit Marty 289c820b48
Merge pull request #92 from vector-im/feature/user-agent
User agent and log of request in debug mode
2019-03-19 15:26:11 +01:00
Benoit Marty 40d4e3fe83 Log http requests, for easy debugging 2019-03-19 12:55:14 +01:00
Benoit Marty f4170f55b7 Configure user agent 2019-03-19 12:29:45 +01:00
Benoit Marty d8bff8201f Use gradle all distribution 2019-03-19 10:17:33 +01:00
Benoit Marty dffcc3f405 Fix gradle issue 2019-03-18 18:53:14 +01:00
Benoit Marty 7030258de5
Add logo to badges 2019-03-18 18:49:05 +01:00
Benoit Marty 89a2aad561
Add logo to badges 2019-03-18 18:48:28 +01:00
Benoit Marty 6406c4021a
Merge pull request #89 from vector-im/feature/gradle5.2.1
Upgrade gradle wrapper to 5.2.1, and pass first sonar analysis
2019-03-18 18:42:30 +01:00
Benoit Marty ddc5a0d30b
Add some badges FTW, and link to contributing.md 2019-03-18 18:42:04 +01:00
Benoit Marty d4b1f074e3
Merge pull request #87 from Bubu/reproducible_versioncode
get timestamp for versioncode from last git commmit
2019-03-18 18:21:56 +01:00
Benoit Marty 3b68b304f5
Merge branch 'develop' into reproducible_versioncode 2019-03-18 18:21:22 +01:00
Benoit Marty b8cceaa17a Upgrade gradle wrapper to 5.2.1, and pass first sonar analysis 2019-03-18 18:16:59 +01:00
Benoit Marty 8a7675d2e4
Merge pull request #88 from vector-im/feature/build_process
Configure CI
2019-03-18 17:26:32 +01:00
Benoit Marty 6cf91e5eca Configure sonar 2019-03-18 16:53:52 +01:00
Benoit Marty e938866081 Fix issue in Strings 2019-03-18 16:42:19 +01:00
Benoit Marty 20108c2603 Add bug_report_url config 2019-03-18 16:32:35 +01:00
Benoit Marty 02c7deb783 Import strings from Riot and create a script to do so 2019-03-18 16:06:06 +01:00
Benoit Marty 368cf4b3f0 Create new file for RiotX string 2019-03-18 15:17:17 +01:00
Benoit Marty c093e07c24 Deactivate test compilation by Travis for now. 2019-03-18 15:15:40 +01:00
Benoit Marty a97142272c Fix lint issue 2019-03-18 15:08:57 +01:00
Marcus Hoffmann 97fa94592e get timestamp for versioncode from last git commmit
This makes the versioncode for an apk reproducible. Building the same
commit/code will produce an apk with the same VC.

Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu>
2019-03-16 13:56:25 +01:00
ganfra 0c76178bee Markwon : update method name 2019-03-15 19:28:13 +01:00
ganfra c12bc5e02d Timeline rework : first version working for backward navigation (need more testing) 2019-03-15 19:27:56 +01:00
Benoit Marty 0db1d98f41 Fix compilation issue 2019-03-15 19:18:43 +01:00
Benoit Marty 008f6e2bdd Android version for TravisCI 2019-03-15 18:48:53 +01:00
ganfra 820709d433 Timeline rework : initial commit - to amend. 2019-03-13 22:30:05 +01:00
Benoit Marty d5838262ea Fix i18n issue 2019-03-13 18:36:57 +01:00
Benoit Marty 617f71fd51 Remove .idea files 2019-03-13 18:04:57 +01:00
Benoit Marty 1ac143a065 Travis 2019-03-13 18:02:12 +01:00
Benoit Marty eca59114dd Setup various tools 2019-03-13 17:50:03 +01:00
Benoit Marty a199eaa171 Setup various tools 2019-03-13 17:00:30 +01:00
Benoit Marty 26ae034ba9 Add debug_mode resValue 2019-03-13 15:11:02 +01:00
Benoit Marty 99b1c0bed4
Merge pull request #73 from tulir/patch-1
Fix room link in readme
2019-03-13 11:56:58 +01:00
ganfra 388eae6a1c Merge branch 'feature/image_viewer' into develop 2019-03-12 17:26:41 +01:00
ganfra ff6d1f611a Media : exposes the view to allow animation. 2019-03-12 16:54:33 +01:00
ganfra 157068634a MediaViewer : start adding simple way of seing image in full size. Will probably change in the future. 2019-03-12 08:29:49 +01:00
ganfra 1d4882e596 Timeline : fix small issue, reduce animation time and reorganize a bit some files. 2019-03-05 18:31:03 +01:00
Tulir Asokan 415d9e702b
Fix room link 2019-03-05 13:40:05 +02:00
ganfra 4c3f7171e7 Update README.md & Create LICENSE 2019-03-04 19:18:15 +01:00
ganfra a146fc43e4 Merge branch 'feature/home_state_issues' into develop 2019-03-04 17:00:50 +01:00
ganfra ef3fb561e9 Pills : finalize avatar retrieval 2019-03-04 16:52:44 +01:00
ganfra fffdf4b8c1 Pills : try to optimize memory and get better perf. Still need to rework a bit. 2019-03-01 21:44:26 +01:00
ganfra 3d7562ea8e UI : fix notice avatar position 2019-02-28 18:50:46 +01:00
ganfra fd3fce6deb State issues : restore recyclerview state + fix DI issues 2019-02-28 18:50:30 +01:00
ganfra 753e70775a Merge branch 'feature/html_rendering' into develop 2019-02-27 17:51:06 +01:00
ganfra 2c0bc93f5a Home: getting Room interface slow (blocking Main Thread). Maybe we should get this async. 2019-02-27 17:41:06 +01:00
ganfra adc51529f2 Pills : handle avatar 2019-02-27 17:17:47 +01:00
ganfra 63bf4355b9 Html : continue work on Pills. Still need to find how to handle avatar drawable. 2019-02-26 19:35:47 +01:00
ganfra 41b06bca60 User : rework UserEntityUpdater (and make others RealmLiveEntityObserver process on MonarchyThread instead of Main) 2019-02-26 19:32:01 +01:00
ganfra d6f6764b0c Timeline : avoid epoxy to build on main thread first 2019-02-26 19:28:39 +01:00
ganfra 46226c4efc Avatar : skip '@' when name is userId 2019-02-26 15:04:43 +01:00
ganfra f59977f884 Room state: fix sync state events duplicates with timeline 2019-02-26 14:50:53 +01:00
ganfra 40f1fcab18 User : start handling users. Need to fine a good strategy to process room member events. 2019-02-25 21:55:33 +01:00
ganfra 85b119bdcb Home : hide keyboard when drawer state change 2019-02-25 18:13:53 +01:00
ganfra 6c7bc2b40c Timeline: get better perf 2019-02-25 18:10:37 +01:00
ganfra f06211ce4f Start playing with ChipDrawable to show Pills 2019-02-25 15:18:36 +01:00
ganfra d2db5e32fc Html : start handling reply 2019-02-22 15:43:48 +01:00
ganfra 4458e28ce2 Html : introduce markown lib to handle html rendering. 2019-02-21 19:21:08 +01:00
ganfra 14ac3a8ae6 Merge branch 'feature/timeline_new_events' into develop 2019-02-20 18:09:37 +01:00
ganfra ca890e1ef4 Room tag: let the tag order be anything to avoid breaking at the moment. 2019-02-20 18:09:07 +01:00
ganfra 9cc2cf8360 Timeline: set empty item as fallback item 2019-02-20 16:14:12 +01:00
ganfra 28c837a47f Timeline: handle call events 2019-02-20 15:47:20 +01:00
ganfra 42cf45c8f3 Timeline: handle room history visibility 2019-02-20 12:06:33 +01:00
ganfra 8fdce937bd Timeline: handle notice events and hide some not displayable events. 2019-02-20 11:39:25 +01:00
ganfra f36bec7176 Merge branch 'feature/emote' into develop 2019-02-19 19:37:31 +01:00
ganfra 9477316b61 Sync : add timber log on sync failure 2019-02-19 19:37:16 +01:00
ganfra 36d1d52880 Timeline : handle emote content 2019-02-19 19:12:58 +01:00
ganfra abb44839af Merge branch 'feature/epoxy' into develop 2019-02-19 17:49:36 +01:00
ganfra e91276bb76 Epoxy : make sures RiotEpoxyModel is used everywhere. 2019-02-19 17:48:30 +01:00
ganfra b5f40f9732 Add stetho in debug to allow some inspection 2019-02-19 17:40:38 +01:00
ganfra 24ffd96b6e Epoxy : finalize replacing KotlinModels 2019-02-19 15:47:50 +01:00
ganfra c977c651a2 Epoxy : timeline messages to holder WIP 2019-02-19 11:57:17 +01:00
ganfra 5c78991ae1 Rx : hides subject inside a class 2019-02-19 11:16:31 +01:00
ganfra c467f179e1 Epoxy : start using viewholder instead of kotlin model as it's more efficient 2019-02-19 10:31:05 +01:00
ganfra 264265a1f7 Merge branch 'feature/quick_fixes' into develop 2019-02-18 18:14:26 +01:00
ganfra a12a9da627 Update Realm 2019-02-18 17:42:03 +01:00
ganfra c42294a21e Handle room v3 event id format 2019-02-18 17:41:35 +01:00
ganfra 03437885ef Read receipts : fix issues with receipts not being sent 2019-02-18 17:41:21 +01:00
ganfra 5e81fc8dc2 Temporary workarounds to avoid some crashes. 2019-02-11 13:47:47 +01:00
manuroe 7a5ff282b6 Fix room list display on my account
following Ganfra's advices
2019-02-01 18:57:19 +01:00
Luca Weiss e4069ab51b
Hacks to get it running on API 19 2019-01-30 17:52:44 +01:00
1883 changed files with 144516 additions and 8099 deletions

53
.buildkite/pipeline.yml Normal file
View File

@ -0,0 +1,53 @@
# Use Docker file from https://hub.docker.com/r/runmymind/docker-android-sdk
# Last docker plugin version can be found here:
# https://github.com/buildkite-plugins/docker-buildkite-plugin/releases

# Build debug version of the RiotX application, from the develop branch and the features branches

steps:
- label: "Assemble GPlay Debug version"
agents:
# We use a medium sized instance instead of the normal small ones because
# gradle build is long
queue: "medium"
commands:
- "./gradlew clean lintGplayRelease assembleGplayDebug --stacktrace"
artifact_paths:
- "vector/build/outputs/apk/gplay/debug/*.apk"
branches: "!master"
plugins:
- docker#v3.1.0:
image: "runmymind/docker-android-sdk"

- label: "Assemble FDroid Debug version"
agents:
# We use a medium sized instance instead of the normal small ones because
# gradle build is long
queue: "medium"
commands:
- "./gradlew clean lintFdroidRelease assembleFdroidDebug --stacktrace"
artifact_paths:
- "vector/build/outputs/apk/fdroid/debug/*.apk"
branches: "!master"
plugins:
- docker#v3.1.0:
image: "runmymind/docker-android-sdk"

- label: "Build Google Play unsigned APK"
agents:
# We use a medium sized instance instead of the normal small ones because
# gradle build is long
queue: "medium"
commands:
- "./gradlew clean assembleGplayRelease --stacktrace"
artifact_paths:
- "vector/build/outputs/apk/gplay/release/*.apk"
branches: "master"
plugins:
- docker#v3.1.0:
image: "runmymind/docker-android-sdk"

# Code quality

- label: "Code quality"
command: "./tools/check/check_code_quality.sh"

10
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,10 @@
### Pull Request Checklist

<!-- Please read [CONTRIBUTING.md](https://github.com/vector-im/riotX-android/blob/develop/CONTRIBUTING.md) before submitting your pull request -->

- [ ] Changes has been tested on an Android device or Android emulator with API 16
- [ ] UI change has been tested on both light and dark themes
- [ ] Pull request is based on the develop branch
- [ ] Pull request updates [CHANGES.md](https://github.com/vector-im/riotX-android/blob/develop/CHANGES.md)
- [ ] Pull request includes screenshots or videos if containing UI changes
- [ ] Pull request includes a [sign off](https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.rst#sign-off)

2
.gitignore vendored
View File

@ -10,3 +10,5 @@
/build
/captures
.externalNativeBuild

/tmp

View File

@ -1,29 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
</component>

View File

@ -1,5 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@ -1,13 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="ganfra">
<words>
<w>connectable</w>
<w>coroutine</w>
<w>merlins</w>
<w>moshi</w>
<w>persistor</w>
<w>synchronizer</w>
<w>untimelined</w>
</words>
</dictionary>
</component>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/matrix-sdk-android" />
<option value="$PROJECT_DIR$/matrix-sdk-android-rx" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

View File

@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="DifferentStdlibGradleVersion" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="5">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>

60
.travis.yml Normal file
View File

@ -0,0 +1,60 @@
# FTR: Configuration on https://travis-ci.org/vector-im/riotX-android/settings
#
# - Build only if .travis.yml is present -> On
# - Limit concurrent jobs -> Off
# - Build pushed branches -> On (build the branch)
# - Build pushed pull request -> On (build the PR after auto-merge)
#
# - Auto cancel branch builds -> On
# - Auto cancel pull request builds -> On

language: android
jdk: oraclejdk8
sudo: false

notifications:
email: false

android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- tools
- platform-tools

# The BuildTools version used by your project
- build-tools-28.0.3

# The SDK version used to compile your project
- android-28

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache

# Build with the development SDK
before_script:
# Not necessary for the moment
# - /bin/sh ./set_debug_env.sh

# Just build the project for now
script:
# Build app (assembleGplayRelease assembleFdroidRelease)
# Build Android test (assembleAndroidTest) (disabled for now)
# Code quality (lintGplayRelease lintFdroidRelease)
# Split into two steps because if a task contain Fdroid, PlayService will be disabled
- ./gradlew clean assembleGplayRelease lintGplayRelease --stacktrace
- ./gradlew clean assembleFdroidRelease lintFdroidRelease --stacktrace
# Run unitary test (Disable for now, see https://travis-ci.org/vector-im/riot-android/builds/502504370)
# - ./gradlew testGplayReleaseUnitTest --stacktrace
# Other code quality check
- ./tools/check/check_code_quality.sh
- ./tools/travis/check_pr.sh
# Check that indonesians file are identical. Due to Android issue, the resource folder must be value-in/, and Weblate export data into value-id/.
- diff ./vector/src/main/res/values-id/strings.xml ./vector/src/main/res/values-in/strings.xml

0
AUTHORS.md Normal file
View File

131
CHANGES.md Normal file
View File

@ -0,0 +1,131 @@
Changes in RiotX 0.5.0 (2019-XX-XX)
===================================================

Features:
-

Improvements:
- Reduce default release build log level, and lab option to enable more logs.

Other changes:
-

Bugfix:
- Fix crash due to missing informationData (#535)
- Progress in initial sync dialog is decreasing for a step and should not (#532)

Translations:
-

Build:
- Fix issue with version name (#533)
- Fix rendering issue of accepted third party invitation event

Changes in RiotX 0.4.0 (2019-XX-XX)
===================================================

Features:
- Display read receipts in timeline (#81)

Improvements:
- Reactions: Reinstate the ability to react with non-unicode keys (#307)

Bugfix:
- Fix text diff linebreak display (#441)
- Date change message repeats for each redaction until a normal message (#358)
- Slide-in reply icon is distorted (#423)
- Regression / e2e replies not encrypted
- Some video won't play
- Privacy: remove log of notifiable event (#519)
- Fix crash with EmojiCompat (#530)

Changes in RiotX 0.3.0 (2019-08-08)
===================================================

Features:
- Create Direct Room flow
- Handle `/markdown` command

Improvements:
- UI for pending edits (#193)
- UX image preview screen transition (#393)
- Basic support for resending failed messages (retry/remove)
- Enable proper cancellation of suspending functions (including db transaction)
- Enhances network connectivity checks in SDK
- Add "View Edit History" item in the message bottom sheet (#401)
- Cancel sync request on pause and timeout to 0 after pause (#404)

Other changes:
- Show sync progress also in room detail screen (#403)

Bugfix:
- Edited message: link confusion when (edited) appears in body (#398)
- Close detail room screen when the room is left with another client (#256)
- Clear notification for a room left on another client
- Fix messages with empty `in_reply_to` not rendering (#447)
- Fix clear cache (#408) and Logout (#205)
- Fix `(edited)` link can be copied to clipboard (#402)

Build:
- Split APK: generate one APK per arch, to reduce APK size of about 30%


Changes in RiotX 0.2.0 (2019-07-18)
===================================================

Features:
- Message Editing: View edit history (#121)
- Rooms filtering (#304)
- Edit in encrypted room

Improvements:
- Handle click on redacted events: view source and create permalink
- Improve long tap menu: reply on top, more compact (#368)
- Quick reply in timeline with swipe gesture (#167)
- Improve edit of replies
- Improve performance on Room Members and Users management (#381)

Other changes:
- migrate from rxbinding 2 to rxbinding 3

Bugfix:
- Fix regression on permalink click
- Fix crash reported by the PlayStore (#341)
- Fix Chat composer separator color in dark/black theme
- Fix bad layout for room directory filter (#349)
- Fix Copying link from a message shouldn't open context menu (#364)

Changes in RiotX 0.1.0 (2019-07-11)
===================================================

First release!

Mode details here: https://medium.com/@RiotChat/introducing-the-riotx-beta-for-android-b17952e8f771


=======================================================
+ TEMPLATE WHEN PREPARING A NEW RELEASE +
=======================================================


Changes in RiotX 0.0.0 (2019-XX-XX)
===================================================

Features:
-

Improvements:
-

Other changes:
-

Bugfix:
-

Translations:
-

Build:
-

76
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,76 @@
# Contributing code to Matrix

Please read https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.rst

Android support can be found in this [![Riot Android Matrix room #riot-android:matrix.org](https://img.shields.io/matrix/riot-android:matrix.org.svg?label=%23riot-android:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#riot-android:matrix.org) room.

Dedicated room for RiotX: [![RiotX Android Matrix room #riot-android:matrix.org](https://img.shields.io/matrix/riotx:matrix.org.svg?label=%23RiotX:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#riotx:matrix.org)

# Specific rules for Matrix Android projects

## Android Studio settings

Please set the "hard wrap" setting of Android Studio to 160 chars, this is the setting we use internally to format the source code (Menu `Settings/Editor/Code Style` then `Hard wrap at`).

## Compilation

For now, the Matrix SDK and the RiotX application are in the same project. So there is no specific thing to do, this project should compile without any special action.

## I want to help translating RiotX

If you want to fix an issue with an English string, please submit a PR.
If you want to fix an issue in other languages, or add a missing translation, or even add a new language, please use [Weblate](https://translate.riot.im/projects/riot-android/).

For the moment, Strings from Riot will be used, there is no dedicated project in Weblate for RiotX.

## I want to submit a PR to fix an issue

Please check if a corresponding issue exists. If yes, please let us know in a comment that you're working on it.
If an issue does not exist yet, it may be relevant to open a new issue and let us know that you're implementing it.

### Kotlin

This project is full Kotlin. Please do not write Java classes.

### CHANGES.md

Please add a line to the top of the file `CHANGES.md` describing your change.

### Code quality

Make sure the following commands execute without any error:

> ./tools/check/check_code_quality.sh

> ./gradlew lintGplayRelease

### Unit tests

Make sure the following commands execute without any error:

> ./gradlew testGplayReleaseUnitTest

### Tests

RiotX is currently supported on Android Jelly Bean (API 16+): please test your change on an Android device (or Android emulator) running with API 16. Many issues can happen (including crashes) on older devices.
Also, if possible, please test your change on a real device. Testing on Android emulator may not be sufficient.

### Internationalisation

When adding new string resources, please only add new entries in file `value/strings.xml`. Translations will be added later by the community of translators with a specific tool named [Weblate](https://translate.riot.im/projects/riot-android/).
Do not hesitate to use plurals when appropriate.

### Layout

When adding or editing layouts, make sure the layout will render correctly if device uses a RTL (Right To Left) language.
You can check this in the layout editor preview by selecting any RTL language (ex: Arabic).

Also please check that the colors are ok for all the current themes of RiotX. Please use `?attr` instead of `@color` to reference colors in the layout. You can check this in the layout editor preview by selecting all the main themes (`AppTheme.Status`, `AppTheme.Dark`, etc.).

### Authors

Feel free to add an entry in file AUTHORS.md

## Thanks

Thanks for contributing to Matrix projects!

176
LICENSE Normal file
View File

@ -0,0 +1,176 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

View File

@ -1 +1,37 @@
# riot-android-redesign-PoC
[![Buildkite](https://badge.buildkite.com/657d3db27364448d69d54f66c690f7788bc6aa80a7628e37f3.svg?branch=develop)](https://buildkite.com/matrix-dot-org/riotx-android/builds?branch=develop)
[![Weblate](https://translate.riot.im/widgets/riot-android/-/svg-badge.svg)](https://translate.riot.im/engage/riot-android/?utm_source=widget)
[![RiotX Android Matrix room #riot-android:matrix.org](https://img.shields.io/matrix/riotx:matrix.org.svg?label=%23RiotX:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#riotx:matrix.org)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=vector.android.riotx&metric=alert_status)](https://sonarcloud.io/dashboard?id=vector.android.riotx)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=vector.android.riotx&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=vector.android.riotx)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=vector.android.riotx&metric=bugs)](https://sonarcloud.io/dashboard?id=vector.android.riotx)

# RiotX Android

RiotX is an Android Matrix Client currently in beta but in active development.

It is a total rewrite of [Riot-Android](https://github.com/vector-im/riot-android) with a new user experience. RiotX will become the official replacement as soon as all features are implemented.

[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" alt="Get it on Google Play" height="60">](https://play.google.com/store/apps/details?id=im.vector.riotx)

Nightly build: [![Buildkite](https://badge.buildkite.com/657d3db27364448d69d54f66c690f7788bc6aa80a7628e37f3.svg?branch=develop)](https://buildkite.com/matrix-dot-org/riotx-android/builds?branch=develop)

# New Android SDK

RiotX is based on a new Android SDK fully written in Kotlin (like RiotX). In order to make the early development as fast as possible, RiotX and the new SDK currently share the same git repository. We will make separate repos once the API is stable enough.


# Roadmap

The current target is to release an application out of beta with the same level of features (and even more) as Riot.
The roadmap has 3 phases:

- [phase 0](https://github.com/vector-im/riotX-android/labels/phase0): Prototyping / Project setup
- [phase 1](https://github.com/vector-im/riotX-android/labels/phase1): Beta release to the Play Store
- [phase 2](https://github.com/vector-im/riotX-android/labels/phase2): Out of beta


## Contributing

Please refer to [CONTRIBUTING.md](https://github.com/vector-im/riotX-android/blob/develop/CONTRIBUTING.md) if you want to contribute on Matrix Android projects!

Come chat with the community in the dedicated Matrix [room](https://matrix.to/#/#riotx:matrix.org).

View File

@ -1,102 +0,0 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

kapt {
correctErrorTypes = true
}

androidExtensions {
experimental = true
}

def versionMajor = 0
def versionMinor = 1
def versionPatch = 0

def generateVersionCodeFromTimestamp() {
// It's unix timestamp divided by 10: It's incremented by one every 10 seconds.
return (System.currentTimeMillis() / 1_000 / 10).toInteger()
}

def generateVersionCodeFromVersionName() {
return versionMajor * 10000 + versionMinor * 100 + versionPatch
}

android {
compileSdkVersion 28
defaultConfig {
applicationId "im.vector.riotredesign"
minSdkVersion 16
targetSdkVersion 28
multiDexEnabled true
versionCode generateVersionCodeFromTimestamp()
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

dependencies {

def epoxy_version = "3.0.0"
def arrow_version = "0.8.2"

implementation project(":matrix-sdk-android")
implementation project(":matrix-sdk-android-rx")
implementation 'com.android.support:multidex:1.0.3'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.core:core-ktx:1.0.1'

// Paging
implementation 'androidx.paging:paging-runtime:2.0.0'

implementation 'com.jakewharton.threetenabp:threetenabp:1.1.1'
implementation 'com.jakewharton.timber:timber:4.7.1'

// rx
implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'com.jakewharton.rxrelay2:rxrelay:2.1.0'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.2.0'

implementation("com.airbnb.android:epoxy:$epoxy_version")
kapt "com.airbnb.android:epoxy-processor:$epoxy_version"
implementation 'com.airbnb.android:mvrx:0.7.0'

// FP
implementation "io.arrow-kt:arrow-core:$arrow_version"

// UI
implementation 'com.github.bumptech.glide:glide:4.8.0'
kapt 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.google.android.material:material:1.1.0-alpha02'

// DI
implementation "org.koin:koin-android:$koin_version"
implementation "org.koin:koin-android-scope:$koin_version"

// TESTS
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}


View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="im.vector.riotredesign">


<uses-permission android:name="android.permission.INTERNET" />

<application
android:name=".Riot"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Riot">

<activity
android:name=".features.MainActivity"
android:theme="@style/Theme.Riot.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity android:name=".features.home.HomeActivity" />
<activity android:name=".features.login.LoginActivity" />
</application>

</manifest>

View File

@ -1,46 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign

import android.app.Application
import android.content.Context
import androidx.multidex.MultiDex
import com.jakewharton.threetenabp.AndroidThreeTen
import im.vector.matrix.android.BuildConfig
import im.vector.riotredesign.core.di.AppModule
import org.koin.log.EmptyLogger
import org.koin.standalone.StandAloneContext.startKoin
import timber.log.Timber


class Riot : Application() {

override fun onCreate() {
super.onCreate()
if (BuildConfig.DEBUG) {
Timber.plant(Timber.DebugTree())
}
AndroidThreeTen.init(this)
startKoin(listOf(AppModule(this).definition), logger = EmptyLogger())
}

override fun attachBaseContext(base: Context) {
super.attachBaseContext(base)
MultiDex.install(this)
}

}

View File

@ -1,47 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.core.di

import android.content.Context
import android.content.Context.MODE_PRIVATE
import im.vector.riotredesign.core.resources.LocaleProvider
import im.vector.riotredesign.core.resources.StringProvider
import im.vector.riotredesign.features.home.room.list.RoomSelectionRepository
import org.koin.dsl.module.module

class AppModule(private val context: Context) {

val definition = module {

single {
LocaleProvider(context.resources)
}

single {
StringProvider(context.resources)
}

single {
context.getSharedPreferences("im.vector.riot", MODE_PRIVATE)
}

single {
RoomSelectionRepository(get())
}

}
}

View File

@ -1,74 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.core.epoxy

import android.view.View
import androidx.annotation.IdRes
import androidx.annotation.LayoutRes
import com.airbnb.epoxy.EpoxyModel
import com.airbnb.epoxy.OnModelVisibilityStateChangedListener
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty

abstract class KotlinModel(
@LayoutRes private val layoutRes: Int
) : EpoxyModel<View>() {

private var view: View? = null
private var onBindCallback: (() -> Unit)? = null
private var onModelVisibilityStateChangedListener: OnModelVisibilityStateChangedListener<KotlinModel, View>? = null

abstract fun bind()

override fun bind(view: View) {
this.view = view
onBindCallback?.invoke()
bind()
}

override fun unbind(view: View) {
this.view = null
}

fun onBind(lambda: (() -> Unit)?): KotlinModel {
onBindCallback = lambda
return this
}

override fun onVisibilityStateChanged(visibilityState: Int, view: View) {
onModelVisibilityStateChangedListener?.onVisibilityStateChanged(this, view, visibilityState)
super.onVisibilityStateChanged(visibilityState, view)
}

fun setOnVisibilityStateChanged(listener: OnModelVisibilityStateChangedListener<KotlinModel, View>): KotlinModel {
this.onModelVisibilityStateChangedListener = listener
return this
}

override fun getDefaultLayout() = layoutRes

protected fun <V : View> bind(@IdRes id: Int) = object : ReadOnlyProperty<KotlinModel, V> {
override fun getValue(thisRef: KotlinModel, property: KProperty<*>): V {
// This is not efficient because it looks up the view by id every time (it loses
// the pattern of a "holder" to cache that look up). But it is simple to use and could
// be optimized with a map
@Suppress("UNCHECKED_CAST")
return view?.findViewById(id) as V?
?: throw IllegalStateException("View ID $id for '${property.name}' not found.")
}
}
}

View File

@ -1,38 +0,0 @@
/*
*
* * Copyright 2019 New Vector Ltd
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * See the License for the specific language governing permissions and
* * limitations under the License.
*
*/

package im.vector.riotredesign.core.extensions

/**
* Returns the last element yielding the smallest value of the given function or `null` if there are no elements.
*/
public inline fun <T, R : Comparable<R>> Iterable<T>.lastMinBy(selector: (T) -> R): T? {
val iterator = iterator()
if (!iterator.hasNext()) return null
var minElem = iterator.next()
var minValue = selector(minElem)
while (iterator.hasNext()) {
val e = iterator.next()
val v = selector(e)
if (minValue >= v) {
minElem = e
minValue = v
}
}
return minElem
}

View File

@ -1,42 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.core.platform

import android.os.Bundle
import android.os.Parcelable
import com.airbnb.mvrx.BaseMvRxFragment
import com.airbnb.mvrx.MvRx

abstract class RiotFragment : BaseMvRxFragment(), OnBackPressed {

val riotActivity: RiotActivity by lazy {
activity as RiotActivity
}

override fun onBackPressed(): Boolean {
return false
}

override fun invalidate() {
//no-ops by default
}

protected fun setArguments(args: Parcelable? = null) {
arguments = args?.let { Bundle().apply { putParcelable(MvRx.KEY_ARG, it) } }
}

}

View File

@ -1,41 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features

import android.os.Bundle
import im.vector.matrix.android.api.Matrix
import im.vector.riotredesign.core.platform.RiotActivity
import im.vector.riotredesign.features.home.HomeActivity
import im.vector.riotredesign.features.login.LoginActivity


class MainActivity : RiotActivity() {

private val authenticator = Matrix.getInstance().authenticator()

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val intent = if (authenticator.hasActiveSessions()) {
HomeActivity.newIntent(this)
} else {
LoginActivity.newIntent(this)
}
startActivity(intent)
finish()
}

}

View File

@ -1,57 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home

import android.widget.ImageView
import androidx.core.content.ContextCompat
import com.amulyakhare.textdrawable.TextDrawable
import com.bumptech.glide.request.RequestOptions
import im.vector.matrix.android.api.Matrix
import im.vector.matrix.android.api.session.room.model.RoomMember
import im.vector.matrix.android.api.session.room.model.RoomSummary
import im.vector.riotredesign.R
import im.vector.riotredesign.core.extensions.firstCharAsString
import im.vector.riotredesign.core.glide.GlideApp

object AvatarRenderer {

fun render(roomMember: RoomMember, imageView: ImageView) {
render(roomMember.avatarUrl, roomMember.displayName, imageView)
}

fun render(roomSummary: RoomSummary, imageView: ImageView) {
render(roomSummary.avatarUrl, roomSummary.displayName, imageView)
}

fun render(avatarUrl: String?, name: String?, imageView: ImageView) {
if (name.isNullOrEmpty()) {
return
}
val resolvedUrl = Matrix.getInstance().currentSession.contentUrlResolver().resolveFullSize(avatarUrl)
val avatarColor = ContextCompat.getColor(imageView.context, R.color.pale_teal)
val fallbackDrawable = TextDrawable.builder().buildRound(name.firstCharAsString().toUpperCase(), avatarColor)

GlideApp
.with(imageView)
.load(resolvedUrl)
.placeholder(fallbackDrawable)
.apply(RequestOptions.circleCropTransform())
.into(imageView)
}


}

View File

@ -1,124 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home

import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.Gravity
import android.view.MenuItem
import androidx.appcompat.app.ActionBarDrawerToggle
import androidx.appcompat.widget.Toolbar
import androidx.core.view.GravityCompat
import androidx.fragment.app.FragmentManager
import com.airbnb.mvrx.viewModel
import im.vector.riotredesign.R
import im.vector.riotredesign.core.extensions.observeEvent
import im.vector.riotredesign.core.extensions.replaceFragment
import im.vector.riotredesign.core.platform.OnBackPressed
import im.vector.riotredesign.core.platform.RiotActivity
import im.vector.riotredesign.core.platform.ToolbarConfigurable
import im.vector.riotredesign.features.home.room.detail.LoadingRoomDetailFragment
import kotlinx.android.synthetic.main.activity_home.*
import org.koin.android.ext.android.inject
import org.koin.standalone.StandAloneContext.loadKoinModules


class HomeActivity : RiotActivity(), ToolbarConfigurable {


private val homeActivityViewModel: HomeActivityViewModel by viewModel()
private val homeNavigator by inject<HomeNavigator>()

override fun onCreate(savedInstanceState: Bundle?) {
loadKoinModules(listOf(HomeModule().definition))
homeNavigator.activity = this
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_home)
if (savedInstanceState == null) {
val homeDrawerFragment = HomeDrawerFragment.newInstance()
val loadingDetail = LoadingRoomDetailFragment.newInstance()
replaceFragment(loadingDetail, R.id.homeDetailFragmentContainer)
replaceFragment(homeDrawerFragment, R.id.homeDrawerFragmentContainer)
}
homeActivityViewModel.openRoomLiveData.observeEvent(this) {
homeNavigator.openRoomDetail(it, null)
}
}

override fun onDestroy() {
homeNavigator.activity = null
super.onDestroy()
}

override fun configure(toolbar: Toolbar) {
setSupportActionBar(toolbar)
supportActionBar?.setHomeButtonEnabled(true)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
val drawerToggle = ActionBarDrawerToggle(this, drawerLayout, toolbar, 0, 0)
drawerLayout.addDrawerListener(drawerToggle)
drawerToggle.syncState()
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
android.R.id.home -> {
drawerLayout.openDrawer(GravityCompat.START)
return true
}
}

return true
}

override fun onBackPressed() {
if (drawerLayout.isDrawerOpen(Gravity.LEFT)) {
drawerLayout.closeDrawer(Gravity.LEFT)
} else {
val handled = recursivelyDispatchOnBackPressed(supportFragmentManager)
if (!handled) {
super.onBackPressed()
}
}
}

private fun recursivelyDispatchOnBackPressed(fm: FragmentManager): Boolean {
if (fm.backStackEntryCount == 0)
return false
val reverseOrder = fm.fragments.filter { it is OnBackPressed }.reversed()
for (f in reverseOrder) {
val handledByChildFragments = recursivelyDispatchOnBackPressed(f.childFragmentManager)
if (handledByChildFragments) {
return true
}
val backPressable = f as OnBackPressed
if (backPressable.onBackPressed()) {
return true
}
}
return false
}


companion object {
fun newIntent(context: Context): Intent {
return Intent(context, HomeActivity::class.java)
}

}

}

View File

@ -1,77 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.airbnb.mvrx.MvRxState
import com.airbnb.mvrx.MvRxViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import im.vector.matrix.android.api.Matrix
import im.vector.matrix.android.api.session.Session
import im.vector.matrix.rx.rx
import im.vector.riotredesign.core.platform.RiotViewModel
import im.vector.riotredesign.core.utils.LiveEvent
import im.vector.riotredesign.features.home.room.list.RoomSelectionRepository
import io.reactivex.rxkotlin.subscribeBy
import org.koin.android.ext.android.get

class EmptyState : MvRxState

class HomeActivityViewModel(state: EmptyState,
private val session: Session,
roomSelectionRepository: RoomSelectionRepository
) : RiotViewModel<EmptyState>(state) {

companion object : MvRxViewModelFactory<HomeActivityViewModel, EmptyState> {

@JvmStatic
override fun create(viewModelContext: ViewModelContext, state: EmptyState): HomeActivityViewModel? {
val session = Matrix.getInstance().currentSession
val roomSelectionRepository = viewModelContext.activity.get<RoomSelectionRepository>()
return HomeActivityViewModel(state, session, roomSelectionRepository)
}
}

private val _openRoomLiveData = MutableLiveData<LiveEvent<String>>()
val openRoomLiveData: LiveData<LiveEvent<String>>
get() = _openRoomLiveData

init {
val lastSelectedRoom = roomSelectionRepository.lastSelectedRoom()
if (lastSelectedRoom == null) {
getTheFirstRoomWhenAvailable()
} else {
_openRoomLiveData.postValue(LiveEvent(lastSelectedRoom))
}
}

private fun getTheFirstRoomWhenAvailable() {
session.rx().liveRoomSummaries()
.filter { it.isNotEmpty() }
.first(emptyList())
.subscribeBy {
val firstRoom = it.firstOrNull()
if (firstRoom != null) {
_openRoomLiveData.postValue(LiveEvent(firstRoom.roomId))
}
}
.disposeOnClear()
}


}

View File

@ -1,52 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import im.vector.riotredesign.R
import im.vector.riotredesign.core.extensions.replaceChildFragment
import im.vector.riotredesign.core.platform.RiotFragment
import im.vector.riotredesign.features.home.group.GroupListFragment
import im.vector.riotredesign.features.home.room.list.RoomListFragment

class HomeDrawerFragment : RiotFragment() {

companion object {

fun newInstance(): HomeDrawerFragment {
return HomeDrawerFragment()
}
}

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.fragment_home_drawer, container, false)
}

override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
if (savedInstanceState == null) {
val groupListFragment = GroupListFragment.newInstance()
replaceChildFragment(groupListFragment, R.id.groupListFragmentContainer)
val roomListFragment = RoomListFragment.newInstance()
replaceChildFragment(roomListFragment, R.id.roomListFragmentContainer)
}
}

}

View File

@ -1,100 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home

import im.vector.riotredesign.features.home.group.SelectedGroupHolder
import im.vector.riotredesign.features.home.room.VisibleRoomHolder
import im.vector.riotredesign.features.home.room.detail.timeline.DefaultItemFactory
import im.vector.riotredesign.features.home.room.detail.timeline.MessageItemFactory
import im.vector.riotredesign.features.home.room.detail.timeline.RoomMemberItemFactory
import im.vector.riotredesign.features.home.room.detail.timeline.RoomNameItemFactory
import im.vector.riotredesign.features.home.room.detail.timeline.RoomTopicItemFactory
import im.vector.riotredesign.features.home.room.detail.timeline.TimelineDateFormatter
import im.vector.riotredesign.features.home.room.detail.timeline.TimelineEventController
import im.vector.riotredesign.features.home.room.detail.timeline.TimelineItemFactory
import im.vector.riotredesign.features.home.room.detail.timeline.helper.TimelineMediaSizeProvider
import im.vector.riotredesign.features.home.room.list.RoomSummaryComparator
import im.vector.riotredesign.features.home.room.list.RoomSummaryController
import org.koin.dsl.module.module

class HomeModule {

val definition = module(override = true) {

single {
TimelineDateFormatter(get())
}

single {
MessageItemFactory(get(), get())
}

single {
RoomNameItemFactory(get())
}

single {
RoomTopicItemFactory(get())
}

single {
RoomMemberItemFactory(get())
}

single {
DefaultItemFactory()
}

single {
TimelineItemFactory(get(), get(), get(), get(), get())
}

single {
HomeNavigator()
}

factory {
RoomSummaryController(get())
}

factory { (roomId: String) ->
TimelineEventController(roomId, get(), get(), get())
}

single {
TimelineMediaSizeProvider()
}

single {
SelectedGroupHolder()
}

single {
VisibleRoomHolder()
}

single {
HomePermalinkHandler(get())
}

single {
RoomSummaryComparator()
}


}
}

View File

@ -1,75 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home

import android.view.Gravity
import androidx.fragment.app.FragmentManager
import im.vector.riotredesign.R
import im.vector.riotredesign.core.extensions.addFragmentToBackstack
import im.vector.riotredesign.core.extensions.replaceFragment
import im.vector.riotredesign.features.home.room.detail.RoomDetailArgs
import im.vector.riotredesign.features.home.room.detail.RoomDetailFragment
import kotlinx.android.synthetic.main.activity_home.*
import timber.log.Timber

class HomeNavigator {

var activity: HomeActivity? = null

private var currentRoomId: String? = null

fun openRoomDetail(roomId: String,
eventId: String?,
addToBackstack: Boolean = false) {
Timber.v("Open room detail $roomId - $eventId - $addToBackstack")
if (!addToBackstack && isRoomOpened(roomId)) {
return
}
activity?.let {
val args = RoomDetailArgs(roomId, eventId)
val roomDetailFragment = RoomDetailFragment.newInstance(args)
it.drawerLayout?.closeDrawer(Gravity.LEFT)
if (addToBackstack) {
it.addFragmentToBackstack(roomDetailFragment, R.id.homeDetailFragmentContainer, roomId)
} else {
currentRoomId = roomId
clearBackStack(it.supportFragmentManager)
it.replaceFragment(roomDetailFragment, R.id.homeDetailFragmentContainer)
}
}
}

fun openGroupDetail(groupId: String) {
Timber.v("Open group detail $groupId")
}

fun openUserDetail(userId: String) {
Timber.v("Open user detail $userId")
}

fun isRoomOpened(roomId: String): Boolean {
return currentRoomId == roomId
}

private fun clearBackStack(fragmentManager: FragmentManager) {
if (fragmentManager.backStackEntryCount > 0) {
val first = fragmentManager.getBackStackEntryAt(0)
fragmentManager.popBackStack(first.id, FragmentManager.POP_BACK_STACK_INCLUSIVE)
}
}

}

View File

@ -1,54 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home

import android.net.Uri
import im.vector.matrix.android.api.permalinks.PermalinkData
import im.vector.matrix.android.api.permalinks.PermalinkParser

class HomePermalinkHandler(private val navigator: HomeNavigator) {

fun launch(deepLink: String?) {
val uri = deepLink?.let { Uri.parse(it) }
launch(uri)
}

fun launch(deepLink: Uri?) {
if (deepLink == null) {
return
}
val permalinkData = PermalinkParser.parse(deepLink)
when (permalinkData) {
is PermalinkData.EventLink -> {
navigator.openRoomDetail(permalinkData.roomIdOrAlias, permalinkData.eventId, true)
}
is PermalinkData.RoomLink -> {
navigator.openRoomDetail(permalinkData.roomIdOrAlias, null, true)
}
is PermalinkData.GroupLink -> {
navigator.openGroupDetail(permalinkData.groupId)
}
is PermalinkData.UserLink -> {
navigator.openUserDetail(permalinkData.userId)
}
is PermalinkData.FallbackLink -> {

}
}
}

}

View File

@ -1,79 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.group

import com.airbnb.mvrx.MvRxViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import im.vector.matrix.android.api.Matrix
import im.vector.matrix.android.api.session.Session
import im.vector.matrix.rx.rx
import im.vector.riotredesign.core.platform.RiotViewModel
import org.koin.android.ext.android.get

class GroupListViewModel(initialState: GroupListViewState,
private val selectedGroupHolder: SelectedGroupHolder,
private val session: Session
) : RiotViewModel<GroupListViewState>(initialState) {

companion object : MvRxViewModelFactory<GroupListViewModel, GroupListViewState> {

@JvmStatic
override fun create(viewModelContext: ViewModelContext, state: GroupListViewState): GroupListViewModel? {
val currentSession = Matrix.getInstance().currentSession
val selectedGroupHolder = viewModelContext.activity.get<SelectedGroupHolder>()
return GroupListViewModel(state, selectedGroupHolder, currentSession)
}
}

init {
observeGroupSummaries()
observeState()
}

private fun observeState() {
subscribe {
selectedGroupHolder.setSelectedGroup(it.selectedGroup)
}
}

fun accept(action: GroupListActions) {
when (action) {
is GroupListActions.SelectGroup -> handleSelectGroup(action)
}
}

// PRIVATE METHODS *****************************************************************************

private fun handleSelectGroup(action: GroupListActions.SelectGroup) = withState { state ->
if (state.selectedGroup?.groupId != action.groupSummary.groupId) {
setState { copy(selectedGroup = action.groupSummary) }
} else {
setState { copy(selectedGroup = null) }
}
}


private fun observeGroupSummaries() {
session
.rx().liveGroupSummaries()
.execute { async ->
copy(asyncGroups = async)
}
}


}

View File

@ -1,41 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.group

import android.widget.ImageView
import im.vector.riotredesign.R
import im.vector.riotredesign.core.epoxy.KotlinModel
import im.vector.riotredesign.core.platform.CheckableFrameLayout
import im.vector.riotredesign.features.home.AvatarRenderer


data class GroupSummaryItem(
val groupName: CharSequence,
val avatarUrl: String?,
val isSelected: Boolean,
val listener: (() -> Unit)? = null
) : KotlinModel(R.layout.item_group) {

private val avatarImageView by bind<ImageView>(R.id.groupAvatarImageView)
private val rootView by bind<CheckableFrameLayout>(R.id.itemGroupLayout)

override fun bind() {
rootView.isSelected = isSelected
rootView.setOnClickListener { listener?.invoke() }
AvatarRenderer.render(avatarUrl, groupName.toString(), avatarImageView)
}
}

View File

@ -1,49 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.bumptech.glide.Glide
import im.vector.riotredesign.R
import im.vector.riotredesign.core.platform.RiotFragment
import kotlinx.android.synthetic.main.fragment_loading_room_detail.*

class LoadingRoomDetailFragment : RiotFragment() {

companion object {

fun newInstance(): LoadingRoomDetailFragment {
return LoadingRoomDetailFragment()
}
}

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.fragment_loading_room_detail, container, false)
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
Glide.with(this)
.load(R.drawable.riot_splash)
.into(animatedLogoImageView)
}


}

View File

@ -1,154 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail

import android.os.Bundle
import android.os.Parcelable
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.airbnb.epoxy.EpoxyVisibilityTracker
import com.airbnb.mvrx.Success
import com.airbnb.mvrx.args
import com.airbnb.mvrx.fragmentViewModel
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.riotredesign.R
import im.vector.riotredesign.core.platform.RiotFragment
import im.vector.riotredesign.core.platform.ToolbarConfigurable
import im.vector.riotredesign.features.home.AvatarRenderer
import im.vector.riotredesign.features.home.HomePermalinkHandler
import im.vector.riotredesign.features.home.room.detail.timeline.TimelineEventController
import kotlinx.android.parcel.Parcelize
import kotlinx.android.synthetic.main.fragment_room_detail.*
import org.koin.android.ext.android.inject
import org.koin.core.parameter.parametersOf

@Parcelize
data class RoomDetailArgs(
val roomId: String,
val eventId: String? = null
) : Parcelable

class RoomDetailFragment : RiotFragment(), TimelineEventController.Callback {

companion object {

fun newInstance(args: RoomDetailArgs): RoomDetailFragment {
return RoomDetailFragment().apply {
setArguments(args)
}
}
}

private val roomDetailViewModel: RoomDetailViewModel by fragmentViewModel()
private val roomDetailArgs: RoomDetailArgs by args()

private val timelineEventController by inject<TimelineEventController> { parametersOf(roomDetailArgs.roomId) }
private val homePermalinkHandler by inject<HomePermalinkHandler>()
private lateinit var scrollOnNewMessageCallback: ScrollOnNewMessageCallback

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.fragment_room_detail, container, false)
}

override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
setupRecyclerView()
setupToolbar()
setupSendButton()
roomDetailViewModel.subscribe { renderState(it) }
}

override fun onResume() {
super.onResume()
roomDetailViewModel.process(RoomDetailActions.IsDisplayed)
}

private fun setupToolbar() {
val parentActivity = riotActivity
if (parentActivity is ToolbarConfigurable) {
parentActivity.configure(toolbar)
}
}

private fun setupRecyclerView() {
val epoxyVisibilityTracker = EpoxyVisibilityTracker()
epoxyVisibilityTracker.attach(recyclerView)
val layoutManager = LinearLayoutManager(context, RecyclerView.VERTICAL, true)
scrollOnNewMessageCallback = ScrollOnNewMessageCallback(layoutManager)
recyclerView.layoutManager = layoutManager
recyclerView.setHasFixedSize(true)
timelineEventController.addModelBuildListener { it.dispatchTo(scrollOnNewMessageCallback) }
recyclerView.setController(timelineEventController)
timelineEventController.callback = this
}

private fun setupSendButton() {
sendButton.setOnClickListener {
val textMessage = composerEditText.text.toString()
if (textMessage.isNotBlank()) {
composerEditText.text = null
roomDetailViewModel.process(RoomDetailActions.SendMessage(textMessage))
}
}
}

private fun renderState(state: RoomDetailViewState) {
renderRoomSummary(state)
renderTimeline(state)
}

private fun renderTimeline(state: RoomDetailViewState) {
when (state.asyncTimelineData) {
is Success -> {
val timelineData = state.asyncTimelineData()
val lockAutoScroll = timelineData?.let {
it.events == timelineEventController.currentList && it.isLoadingForward
} ?: true

scrollOnNewMessageCallback.isLocked.set(lockAutoScroll)
timelineEventController.update(timelineData)
}
}
}

private fun renderRoomSummary(state: RoomDetailViewState) {
state.asyncRoomSummary()?.let {
toolbarTitleView.text = it.displayName
AvatarRenderer.render(it, toolbarAvatarImageView)
if (it.topic.isNotEmpty()) {
toolbarSubtitleView.visibility = View.VISIBLE
toolbarSubtitleView.text = it.topic
} else {
toolbarSubtitleView.visibility = View.GONE
}
}
}

// TimelineEventController.Callback ************************************************************

override fun onUrlClicked(url: String) {
homePermalinkHandler.launch(url)
}

override fun onEventVisible(event: TimelineEvent, index: Int) {
roomDetailViewModel.process(RoomDetailActions.EventDisplayed(event, index))
}

}

View File

@ -1,114 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail

import com.airbnb.mvrx.MvRxViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import com.jakewharton.rxrelay2.BehaviorRelay
import im.vector.matrix.android.api.Matrix
import im.vector.matrix.android.api.MatrixCallback
import im.vector.matrix.android.api.session.Session
import im.vector.matrix.android.api.session.events.model.Event
import im.vector.matrix.rx.rx
import im.vector.riotredesign.core.extensions.lastMinBy
import im.vector.riotredesign.core.platform.RiotViewModel
import im.vector.riotredesign.features.home.room.VisibleRoomHolder
import io.reactivex.rxkotlin.subscribeBy
import org.koin.android.ext.android.get
import java.util.concurrent.TimeUnit

class RoomDetailViewModel(initialState: RoomDetailViewState,
private val session: Session,
private val visibleRoomHolder: VisibleRoomHolder
) : RiotViewModel<RoomDetailViewState>(initialState) {

private val room = session.getRoom(initialState.roomId)!!
private val roomId = initialState.roomId
private val eventId = initialState.eventId

private val displayedEventsObservable = BehaviorRelay.create<RoomDetailActions.EventDisplayed>()

companion object : MvRxViewModelFactory<RoomDetailViewModel, RoomDetailViewState> {

@JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomDetailViewState): RoomDetailViewModel? {
val currentSession = Matrix.getInstance().currentSession
val visibleRoomHolder = viewModelContext.activity.get<VisibleRoomHolder>()
return RoomDetailViewModel(state, currentSession, visibleRoomHolder)
}
}

init {
observeRoomSummary()
observeTimeline()
observeDisplayedEvents()
room.loadRoomMembersIfNeeded()
}

fun process(action: RoomDetailActions) {
when (action) {
is RoomDetailActions.SendMessage -> handleSendMessage(action)
is RoomDetailActions.IsDisplayed -> handleIsDisplayed()
is RoomDetailActions.EventDisplayed -> handleEventDisplayed(action)
}
}

// PRIVATE METHODS *****************************************************************************

private fun handleSendMessage(action: RoomDetailActions.SendMessage) {
room.sendTextMessage(action.text, callback = object : MatrixCallback<Event> {})
}

private fun handleEventDisplayed(action: RoomDetailActions.EventDisplayed) {
displayedEventsObservable.accept(action)
}

private fun handleIsDisplayed() {
visibleRoomHolder.setVisibleRoom(roomId)
}

private fun observeDisplayedEvents() {
// We are buffering scroll events for one second
// and keep the most recent one to set the read receipt on.
displayedEventsObservable.hide()
.buffer(1, TimeUnit.SECONDS)
.filter { it.isNotEmpty() }
.subscribeBy(onNext = { actions ->
val mostRecentEvent = actions.lastMinBy { it.index }
mostRecentEvent?.event?.root?.eventId?.let { eventId ->
room.setReadReceipt(eventId, callback = object : MatrixCallback<Void> {})
}
})
.disposeOnClear()
}

private fun observeRoomSummary() {
room.rx().liveRoomSummary()
.execute { async ->
copy(asyncRoomSummary = async)
}
}

private fun observeTimeline() {
room.rx().timeline(eventId)
.execute { timelineData ->
copy(asyncTimelineData = timelineData)
}
}


}

View File

@ -1,49 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline

import android.view.View
import android.widget.ImageView
import android.widget.TextView
import androidx.annotation.LayoutRes
import im.vector.riotredesign.core.epoxy.KotlinModel
import im.vector.riotredesign.features.home.AvatarRenderer

abstract class AbsMessageItem(private val informationData: MessageInformationData,
@LayoutRes layoutRes: Int
) : KotlinModel(layoutRes) {

protected abstract val avatarImageView: ImageView
protected abstract val memberNameView: TextView
protected abstract val timeView: TextView

override fun bind() {
if (informationData.showInformation) {
avatarImageView.visibility = View.VISIBLE
memberNameView.visibility = View.VISIBLE
timeView.visibility = View.VISIBLE
timeView.text = informationData.time
memberNameView.text = informationData.memberName
AvatarRenderer.render(informationData.avatarUrl, informationData.memberName?.toString(), avatarImageView)
} else {
avatarImageView.visibility = View.GONE
memberNameView.visibility = View.GONE
timeView.visibility = View.GONE
}
}

}

View File

@ -1,40 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline

import android.widget.ImageView
import android.widget.TextView
import im.vector.riotredesign.R
import im.vector.riotredesign.features.media.MediaContentRenderer

class MessageImageItem(
private val mediaData: MediaContentRenderer.Data,
informationData: MessageInformationData
) : AbsMessageItem(informationData, R.layout.item_timeline_event_image_message) {

override val avatarImageView by bind<ImageView>(R.id.messageAvatarImageView)
override val memberNameView by bind<TextView>(R.id.messageMemberNameView)
override val timeView by bind<TextView>(R.id.messageTimeView)
private val imageView by bind<ImageView>(R.id.messageImageView)

override fun bind() {
super.bind()
MediaContentRenderer.render(mediaData, MediaContentRenderer.Mode.THUMBNAIL, imageView)
}


}

View File

@ -1,110 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline

import android.text.SpannableStringBuilder
import android.text.util.Linkify
import im.vector.matrix.android.api.permalinks.MatrixLinkify
import im.vector.matrix.android.api.permalinks.MatrixPermalinkSpan
import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.events.model.toModel
import im.vector.matrix.android.api.session.room.model.message.MessageContent
import im.vector.matrix.android.api.session.room.model.message.MessageImageContent
import im.vector.matrix.android.api.session.room.model.message.MessageTextContent
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.riotredesign.core.extensions.localDateTime
import im.vector.riotredesign.features.home.room.detail.timeline.helper.TimelineMediaSizeProvider
import im.vector.riotredesign.features.media.MediaContentRenderer

class MessageItemFactory(private val timelineMediaSizeProvider: TimelineMediaSizeProvider,
private val timelineDateFormatter: TimelineDateFormatter) {

private val messagesDisplayedWithInformation = HashSet<String?>()

fun create(event: TimelineEvent,
nextEvent: TimelineEvent?,
callback: TimelineEventController.Callback?
): AbsMessageItem? {

val roomMember = event.roomMember
val nextRoomMember = nextEvent?.roomMember

val date = event.root.localDateTime()
val nextDate = nextEvent?.root?.localDateTime()
val addDaySeparator = date.toLocalDate() != nextDate?.toLocalDate()
val isNextMessageReceivedMoreThanOneHourAgo = nextDate?.isBefore(date.minusMinutes(60))
?: false

if (addDaySeparator
|| nextRoomMember != roomMember
|| nextEvent?.root?.type != EventType.MESSAGE
|| isNextMessageReceivedMoreThanOneHourAgo) {
messagesDisplayedWithInformation.add(event.root.eventId)
}

val messageContent: MessageContent = event.root.content.toModel() ?: return null
val showInformation = messagesDisplayedWithInformation.contains(event.root.eventId)
val time = timelineDateFormatter.formatMessageHour(date)
val avatarUrl = roomMember?.avatarUrl
val memberName = roomMember?.displayName ?: event.root.sender
val informationData = MessageInformationData(time, avatarUrl, memberName, showInformation)

return when (messageContent) {
is MessageTextContent -> buildTextMessageItem(messageContent, informationData, callback)
is MessageImageContent -> buildImageMessageItem(messageContent, informationData)
else -> null
}
}

private fun buildImageMessageItem(messageContent: MessageImageContent,
informationData: MessageInformationData): MessageImageItem? {

val (maxWidth, maxHeight) = timelineMediaSizeProvider.getMaxSize()
val data = MediaContentRenderer.Data(
url = messageContent.url,
height = messageContent.info?.height,
maxHeight = maxHeight,
width = messageContent.info?.width,
maxWidth = maxWidth,
rotation = messageContent.info?.rotation,
orientation = messageContent.info?.orientation
)
return MessageImageItem(data, informationData)
}

private fun buildTextMessageItem(messageContent: MessageTextContent,
informationData: MessageInformationData,
callback: TimelineEventController.Callback?): MessageTextItem? {

val message = messageContent.body.let {
val spannable = SpannableStringBuilder(it)
MatrixLinkify.addLinks(spannable, object : MatrixPermalinkSpan.Callback {
override fun onUrlClicked(url: String) {
callback?.onUrlClicked(url)
}
})
Linkify.addLinks(spannable, Linkify.ALL)
spannable
}
return MessageTextItem(
message = message,
informationData = informationData
)
}


}

View File

@ -1,39 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline

import android.widget.ImageView
import android.widget.TextView
import im.vector.matrix.android.api.permalinks.MatrixLinkify
import im.vector.riotredesign.R

class MessageTextItem(
val message: CharSequence? = null,
informationData: MessageInformationData
) : AbsMessageItem(informationData, R.layout.item_timeline_event_text_message) {

override val avatarImageView by bind<ImageView>(R.id.messageAvatarImageView)
override val memberNameView by bind<TextView>(R.id.messageMemberNameView)
override val timeView by bind<TextView>(R.id.messageTimeView)
private val messageView by bind<TextView>(R.id.messageTextView)

override fun bind() {
super.bind()
messageView.text = message
MatrixLinkify.addLinkMovementMethod(messageView)
}
}

View File

@ -1,37 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline

import android.widget.ImageView
import android.widget.TextView
import im.vector.riotredesign.R
import im.vector.riotredesign.core.epoxy.KotlinModel
import im.vector.riotredesign.features.home.AvatarRenderer

class NoticeItem(private val noticeText: CharSequence? = null,
private val avatarUrl: String?,
private val memberName: CharSequence? = null)
: KotlinModel(R.layout.item_timeline_event_notice) {

private val avatarImageView by bind<ImageView>(R.id.itemNoticeAvatarView)
private val noticeTextView by bind<TextView>(R.id.itemNoticeTextView)

override fun bind() {
noticeTextView.text = noticeText
AvatarRenderer.render(avatarUrl, memberName?.toString(), avatarImageView)
}
}

View File

@ -1,113 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline

import android.text.TextUtils
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.matrix.android.api.session.events.model.toModel
import im.vector.matrix.android.api.session.room.model.Membership
import im.vector.matrix.android.api.session.room.model.RoomMember
import im.vector.riotredesign.R
import im.vector.riotredesign.core.resources.StringProvider


//TODO : complete with call membership events
class RoomMemberItemFactory(private val stringProvider: StringProvider) {

fun create(event: TimelineEvent): NoticeItem? {
val roomMember = event.roomMember ?: return null
val noticeText = buildRoomMemberNotice(event) ?: return null
return NoticeItem(noticeText, roomMember.avatarUrl, roomMember.displayName)
}

private fun buildRoomMemberNotice(event: TimelineEvent): String? {
val eventContent: RoomMember? = event.root.content.toModel()
val prevEventContent: RoomMember? = event.root.prevContent.toModel()
val isMembershipEvent = prevEventContent?.membership != eventContent?.membership
return if (isMembershipEvent) {
buildMembershipNotice(event, eventContent, prevEventContent)
} else {
buildProfileNotice(event, eventContent, prevEventContent)
}
}

private fun buildProfileNotice(event: TimelineEvent, eventContent: RoomMember?, prevEventContent: RoomMember?): String? {
val displayText = StringBuilder()
// Check display name has been changed
if (!TextUtils.equals(eventContent?.displayName, prevEventContent?.displayName)) {
val displayNameText = when {
prevEventContent?.displayName.isNullOrEmpty() -> stringProvider.getString(R.string.notice_display_name_set, event.root.sender, eventContent?.displayName)
eventContent?.displayName.isNullOrEmpty() -> stringProvider.getString(R.string.notice_display_name_removed, event.root.sender, prevEventContent?.displayName)
else -> stringProvider.getString(R.string.notice_display_name_changed_from, event.root.sender, prevEventContent?.displayName, eventContent?.displayName)
}
displayText.append(displayNameText)
}
// Check whether the avatar has been changed
if (!TextUtils.equals(eventContent?.avatarUrl, prevEventContent?.avatarUrl)) {
val displayAvatarText = if (displayText.isNotEmpty()) {
displayText.append(" ")
stringProvider.getString(R.string.notice_avatar_changed_too)
} else {
stringProvider.getString(R.string.notice_avatar_url_changed, event.roomMember?.displayName)
}
displayText.append(displayAvatarText)
}
return displayText.toString()
}

private fun buildMembershipNotice(event: TimelineEvent, eventContent: RoomMember?, prevEventContent: RoomMember?): String? {
val senderDisplayName = event.roomMember?.displayName ?: return null
val targetDisplayName = eventContent?.displayName ?: event.root.sender
return when {
Membership.INVITE == eventContent?.membership -> {
// TODO get userId
val selfUserId: String = ""
when {
eventContent.thirdPartyInvite != null -> stringProvider.getString(R.string.notice_room_third_party_registered_invite, targetDisplayName, eventContent.thirdPartyInvite?.displayName)
TextUtils.equals(event.root.stateKey, selfUserId)
-> stringProvider.getString(R.string.notice_room_invite_you, senderDisplayName)
event.root.stateKey.isNullOrEmpty() -> stringProvider.getString(R.string.notice_room_invite_no_invitee, senderDisplayName)
else -> stringProvider.getString(R.string.notice_room_invite, senderDisplayName, targetDisplayName)
}
}
Membership.JOIN == eventContent?.membership -> stringProvider.getString(R.string.notice_room_join, senderDisplayName)
Membership.LEAVE == eventContent?.membership -> // 2 cases here: this member may have left voluntarily or they may have been "left" by someone else ie. kicked
return if (TextUtils.equals(event.root.sender, event.root.stateKey)) {
if (prevEventContent?.membership == Membership.INVITE) {
stringProvider.getString(R.string.notice_room_reject, senderDisplayName)
} else {
stringProvider.getString(R.string.notice_room_leave, senderDisplayName)
}
} else if (prevEventContent?.membership == Membership.INVITE) {
stringProvider.getString(R.string.notice_room_withdraw, senderDisplayName, targetDisplayName)
} else if (prevEventContent?.membership == Membership.JOIN) {
stringProvider.getString(R.string.notice_room_kick, senderDisplayName, targetDisplayName)
} else if (prevEventContent?.membership == Membership.BAN) {
stringProvider.getString(R.string.notice_room_unban, senderDisplayName, targetDisplayName)
} else {
null
}
Membership.BAN == eventContent?.membership -> stringProvider.getString(R.string.notice_room_ban, senderDisplayName, targetDisplayName)
Membership.KNOCK == eventContent?.membership -> stringProvider.getString(R.string.notice_room_kick, senderDisplayName, targetDisplayName)
else -> null
}
}


}


View File

@ -1,44 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline

import android.text.TextUtils
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.matrix.android.api.session.events.model.toModel
import im.vector.matrix.android.api.session.room.model.RoomNameContent
import im.vector.riotredesign.R
import im.vector.riotredesign.core.resources.StringProvider

class RoomNameItemFactory(private val stringProvider: StringProvider) {

fun create(event: TimelineEvent): NoticeItem? {

val content: RoomNameContent? = event.root.content.toModel()
val roomMember = event.roomMember
if (content == null || roomMember == null) {
return null
}
val text = if (!TextUtils.isEmpty(content.name)) {
stringProvider.getString(R.string.notice_room_name_changed, roomMember.displayName, content.name)
} else {
stringProvider.getString(R.string.notice_room_name_removed, roomMember.displayName)
}
return NoticeItem(text, roomMember.avatarUrl, roomMember.displayName)
}


}

View File

@ -1,43 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline

import im.vector.matrix.android.api.session.events.model.toModel
import im.vector.matrix.android.api.session.room.model.RoomTopicContent
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.riotredesign.R
import im.vector.riotredesign.core.resources.StringProvider

class RoomTopicItemFactory(private val stringProvider: StringProvider) {

fun create(event: TimelineEvent): NoticeItem? {

val content: RoomTopicContent? = event.root.content.toModel()
val roomMember = event.roomMember
if (content == null || roomMember == null) {
return null
}
val text = if (content.topic.isNullOrEmpty()) {
stringProvider.getString(R.string.notice_room_topic_removed, roomMember.displayName)
} else {
stringProvider.getString(R.string.notice_room_topic_changed, roomMember.displayName, content.topic)
}
return NoticeItem(text, roomMember.avatarUrl, roomMember.displayName)
}


}

View File

@ -1,33 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline

import im.vector.riotredesign.core.resources.LocaleProvider
import org.threeten.bp.LocalDateTime
import org.threeten.bp.format.DateTimeFormatter

class TimelineDateFormatter(private val localeProvider: LocaleProvider) {

fun formatMessageHour(localDateTime: LocalDateTime): String {
return DateTimeFormatter.ofPattern("H:mm", localeProvider.current()).format(localDateTime)
}

fun formatMessageDay(localDateTime: LocalDateTime): String {
return DateTimeFormatter.ofPattern("EEE d MMM", localeProvider.current()).format(localDateTime)
}

}

View File

@ -1,114 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline

import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.airbnb.epoxy.EpoxyAsyncUtil
import com.airbnb.epoxy.EpoxyModel
import com.airbnb.epoxy.OnModelVisibilityStateChangedListener
import com.airbnb.epoxy.VisibilityState
import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.room.timeline.TimelineData
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.riotredesign.core.epoxy.KotlinModel
import im.vector.riotredesign.core.extensions.localDateTime
import im.vector.riotredesign.features.home.LoadingItemModel_
import im.vector.riotredesign.features.home.room.detail.timeline.helper.TimelineMediaSizeProvider
import im.vector.riotredesign.features.home.room.detail.timeline.paging.PagedListEpoxyController

class TimelineEventController(private val roomId: String,
private val dateFormatter: TimelineDateFormatter,
private val timelineItemFactory: TimelineItemFactory,
private val timelineMediaSizeProvider: TimelineMediaSizeProvider
) : PagedListEpoxyController<TimelineEvent>(
EpoxyAsyncUtil.getAsyncBackgroundHandler(),
EpoxyAsyncUtil.getAsyncBackgroundHandler()
) {
init {
setFilterDuplicates(true)
}

private var isLoadingForward: Boolean = false
private var isLoadingBackward: Boolean = false
private var hasReachedEnd: Boolean = false

var callback: Callback? = null

fun update(timelineData: TimelineData?) {
timelineData?.let {
isLoadingForward = it.isLoadingForward
isLoadingBackward = it.isLoadingBackward
hasReachedEnd = it.events.lastOrNull()?.root?.type == EventType.STATE_ROOM_CREATE
submitList(it.events)
requestModelBuild()
}
}

override fun onAttachedToRecyclerView(recyclerView: RecyclerView) {
super.onAttachedToRecyclerView(recyclerView)
timelineMediaSizeProvider.recyclerView = recyclerView
}

override fun buildItemModels(currentPosition: Int, items: List<TimelineEvent?>): List<EpoxyModel<*>> {
if (items.isNullOrEmpty()) {
return emptyList()
}
val epoxyModels = ArrayList<EpoxyModel<*>>()
val event = items[currentPosition] ?: return emptyList()
val nextEvent = if (currentPosition + 1 < items.size) items[currentPosition + 1] else null

val date = event.root.localDateTime()
val nextDate = nextEvent?.root?.localDateTime()
val addDaySeparator = date.toLocalDate() != nextDate?.toLocalDate()

timelineItemFactory.create(event, nextEvent, callback)?.also {
it.id(event.localId)
it.setOnVisibilityStateChanged(OnModelVisibilityStateChangedListener<KotlinModel, View> { model, view, visibilityState ->
if (visibilityState == VisibilityState.VISIBLE) {
callback?.onEventVisible(event, currentPosition)
}
})
epoxyModels.add(it)
}
if (addDaySeparator) {
val formattedDay = dateFormatter.formatMessageDay(date)
val daySeparatorItem = DaySeparatorItem(formattedDay).id(roomId + formattedDay)
epoxyModels.add(daySeparatorItem)
}
return epoxyModels
}

override fun addModels(models: List<EpoxyModel<*>>) {
LoadingItemModel_()
.id(roomId + "forward_loading_item")
.addIf(isLoadingForward, this)

super.add(models)

LoadingItemModel_()
.id(roomId + "backward_loading_item")
.addIf(!hasReachedEnd, this)
}


interface Callback {
fun onEventVisible(event: TimelineEvent, index: Int)
fun onUrlClicked(url: String)
}

}

View File

@ -1,42 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline

import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.riotredesign.core.epoxy.KotlinModel

class TimelineItemFactory(private val messageItemFactory: MessageItemFactory,
private val roomNameItemFactory: RoomNameItemFactory,
private val roomTopicItemFactory: RoomTopicItemFactory,
private val roomMemberItemFactory: RoomMemberItemFactory,
private val defaultItemFactory: DefaultItemFactory) {

fun create(event: TimelineEvent,
nextEvent: TimelineEvent?,
callback: TimelineEventController.Callback?): KotlinModel? {

return when (event.root.type) {
EventType.MESSAGE -> messageItemFactory.create(event, nextEvent, callback)
EventType.STATE_ROOM_NAME -> roomNameItemFactory.create(event)
EventType.STATE_ROOM_TOPIC -> roomTopicItemFactory.create(event)
EventType.STATE_ROOM_MEMBER -> roomMemberItemFactory.create(event)
else -> defaultItemFactory.create(event)
}
}

}

View File

@ -1,129 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline.paging

import androidx.paging.PagedList
import android.os.Handler
import androidx.recyclerview.widget.DiffUtil
import com.airbnb.epoxy.EpoxyController
import com.airbnb.epoxy.EpoxyModel
import com.airbnb.epoxy.EpoxyViewHolder

/**
* An [EpoxyController] that can work with a [PagedList].
*
* Internally, it caches the model for each item in the [PagedList]. You should override
* [buildItemModel] method to build the model for the given item. Since [PagedList] might include
* `null` items if placeholders are enabled, this method needs to handle `null` values in the list.
*
* By default, the model for each item is added to the model list. To change this behavior (to
* filter items or inject extra items), you can override [addModels] function and manually add built
* models.
*
* @param T The type of the items in the [PagedList].
*/
abstract class PagedListEpoxyController<T>(
/**
* The handler to use for building models. By default this uses the main thread, but you can use
* [EpoxyAsyncUtil.getAsyncBackgroundHandler] to do model building in the background.
*
* The notify thread of your PagedList (from setNotifyExecutor in the PagedList Builder) must be
* the same as this thread. Otherwise Epoxy will crash.
*/
modelBuildingHandler: Handler = EpoxyController.defaultModelBuildingHandler,
/**
* The handler to use when calculating the diff between built model lists.
* By default this uses the main thread, but you can use
* [EpoxyAsyncUtil.getAsyncBackgroundHandler] to do diffing in the background.
*/
diffingHandler: Handler = EpoxyController.defaultDiffingHandler,
/**
* [PagedListEpoxyController] uses an [DiffUtil.ItemCallback] to detect changes between
* [PagedList]s. By default, it relies on simple object equality but you can provide a custom
* one if you don't use all fields in the object in your models.
*/
itemDiffCallback: DiffUtil.ItemCallback<T> = DEFAULT_ITEM_DIFF_CALLBACK as DiffUtil.ItemCallback<T>
) : EpoxyController(modelBuildingHandler, diffingHandler) {
// this is where we keep the already built models
protected val modelCache = PagedListModelCache(
modelBuilder = { pos, item ->
buildItemModels(pos, item)
},
rebuildCallback = {
requestModelBuild()
},
itemDiffCallback = itemDiffCallback,
modelBuildingHandler = modelBuildingHandler
)

var currentList: PagedList<T>? = null
private set

final override fun buildModels() {
addModels(modelCache.getModels())
}

override fun onModelBound(
holder: EpoxyViewHolder,
boundModel: EpoxyModel<*>,
position: Int,
previouslyBoundModel: EpoxyModel<*>?
) {
modelCache.loadAround(boundModel)
}

/**
* This function adds all built models to the adapter. You can override this method to add extra
* items into the model list or remove some.
*/
open fun addModels(models: List<EpoxyModel<*>>) {
super.add(models)
}

/**
* Builds the model for a given item. This must return a single model for each item. If you want
* to inject headers etc, you can override [addModels] function.
*
* If the `item` is `null`, you should provide the placeholder. If your [PagedList] is configured
* without placeholders, you don't need to handle the `null` case.
*/
abstract fun buildItemModels(currentPosition: Int, items: List<T?>): List<EpoxyModel<*>>

/**
* Submit a new paged list.
*
* A diff will be calculated between this list and the previous list so you may still get calls
* to [buildItemModel] with items from the previous list.
*/
fun submitList(newList: PagedList<T>?) {
currentList = newList
modelCache.submitList(newList)
}

companion object {
/**
* [PagedListEpoxyController] calculates a diff on top of the PagedList to check which
* models are invalidated.
* This is the default [DiffUtil.ItemCallback] which uses object equality.
*/
val DEFAULT_ITEM_DIFF_CALLBACK = object : DiffUtil.ItemCallback<Any>() {
override fun areItemsTheSame(oldItem: Any, newItem: Any) = oldItem == newItem

override fun areContentsTheSame(oldItem: Any, newItem: Any) = oldItem == newItem
}
}
}

View File

@ -1,149 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.detail.timeline.paging

import android.annotation.SuppressLint
import android.os.Handler
import androidx.paging.AsyncPagedListDiffer
import androidx.paging.PagedList
import androidx.recyclerview.widget.AsyncDifferConfig
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListUpdateCallback
import com.airbnb.epoxy.EpoxyModel
import java.util.concurrent.Executor
import java.util.concurrent.atomic.AtomicBoolean

/**
* A PagedList stream wrapper that caches models built for each item. It tracks changes in paged lists and caches
* models for each item when they are invalidated to avoid rebuilding models for the whole list when PagedList is
* updated.
*/
class PagedListModelCache<T>(
private val modelBuilder: (itemIndex: Int, items: List<T>) -> List<EpoxyModel<*>>,
private val rebuildCallback: () -> Unit,
private val itemDiffCallback: DiffUtil.ItemCallback<T>,
private val diffExecutor: Executor? = null,
private val modelBuildingHandler: Handler
) {


// Int is the index of the pagedList item
// We have to be able to find the pagedlist position coming from an epoxy model to trigger
// LoadAround with accuracy
private val modelCache = linkedMapOf<EpoxyModel<*>, Int>()
private var isCacheStale = AtomicBoolean(true)

/**
* Tracks the last accessed position so that we can report it back to the paged list when models are built.
*/
private var lastPosition: Int? = null

/**
* Observer for the PagedList changes that invalidates the model cache when data is updated.
*/
private val updateCallback = object : ListUpdateCallback {
override fun onChanged(position: Int, count: Int, payload: Any?) {
invalidate()
rebuildCallback()
}

override fun onMoved(fromPosition: Int, toPosition: Int) {
invalidate()
rebuildCallback()
}

override fun onInserted(position: Int, count: Int) {
invalidate()
rebuildCallback()
}

override fun onRemoved(position: Int, count: Int) {
invalidate()
rebuildCallback()
}
}

@SuppressLint("RestrictedApi")
private val asyncDiffer = AsyncPagedListDiffer<T>(
updateCallback,
AsyncDifferConfig.Builder<T>(
itemDiffCallback
).also { builder ->
if (diffExecutor != null) {
builder.setBackgroundThreadExecutor(diffExecutor)
}
// we have to reply on this private API, otherwise, paged list might be changed when models are being built,
// potentially creating concurrent modification problems.
builder.setMainThreadExecutor { runnable: Runnable ->
modelBuildingHandler.post(runnable)
}
}.build()
)

fun submitList(pagedList: PagedList<T>?) {
asyncDiffer.submitList(pagedList)
}

fun getModels(): List<EpoxyModel<*>> {
if (isCacheStale.compareAndSet(true, false)) {
asyncDiffer.currentList?.forEachIndexed { position, _ ->
buildModel(position)
}
}
lastPosition?.let {
triggerLoadAround(it)
}
return modelCache.keys.toList()
}

fun loadAround(model: EpoxyModel<*>) {
modelCache[model]?.let { itemPosition ->
triggerLoadAround(itemPosition)
lastPosition = itemPosition
}
}

// PRIVATE METHODS *****************************************************************************

private fun invalidate() {
modelCache.clear()
isCacheStale.set(true)
}

private fun cacheModelsAtPosition(itemPosition: Int, epoxyModels: Set<EpoxyModel<*>>) {
epoxyModels.forEach {
modelCache[it] = itemPosition
}
}

private fun buildModel(pos: Int) {
if (pos >= asyncDiffer.currentList?.size ?: 0) {
return
}
modelBuilder(pos, asyncDiffer.currentList as List<T>).also {
cacheModelsAtPosition(pos, it.toSet())
}
}

private fun triggerLoadAround(position: Int) {
asyncDiffer.currentList?.let {
if (it.size > 0) {
it.loadAround(Math.min(position, it.size - 1))
}
}
}
}

View File

@ -1,52 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.list

import android.view.ViewGroup
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.DrawableCompat
import im.vector.riotredesign.R
import im.vector.riotredesign.core.epoxy.KotlinModel

data class RoomCategoryItem(
val title: CharSequence,
val isExpanded: Boolean,
val unreadCount: Int,
val showHighlighted: Boolean,
val listener: (() -> Unit)? = null
) : KotlinModel(R.layout.item_room_category) {

private val unreadCounterBadgeView by bind<UnreadCounterBadgeView>(R.id.roomCategoryUnreadCounterBadgeView)
private val titleView by bind<TextView>(R.id.roomCategoryTitleView)
private val rootView by bind<ViewGroup>(R.id.roomCategoryRootView)

private val tintColor by lazy {
ContextCompat.getColor(rootView.context, R.color.bluey_grey_two)
}

override fun bind() {
val expandedArrowDrawableRes = if (isExpanded) R.drawable.ic_expand_more_white else R.drawable.ic_expand_less_white
val expandedArrowDrawable = ContextCompat.getDrawable(rootView.context, expandedArrowDrawableRes)?.also {
DrawableCompat.setTint(it, tintColor)
}
unreadCounterBadgeView.render(unreadCount, showHighlighted)
titleView.setCompoundDrawablesWithIntrinsicBounds(expandedArrowDrawable, null, null, null)
titleView.text = title
rootView.setOnClickListener { listener?.invoke() }
}
}

View File

@ -1,113 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.list

import android.os.Bundle
import android.text.Editable
import android.text.TextWatcher
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Incomplete
import com.airbnb.mvrx.Success
import com.airbnb.mvrx.activityViewModel
import im.vector.matrix.android.api.failure.Failure
import im.vector.matrix.android.api.session.room.model.RoomSummary
import im.vector.riotredesign.R
import im.vector.riotredesign.core.extensions.setupAsSearch
import im.vector.riotredesign.core.platform.RiotFragment
import im.vector.riotredesign.core.platform.StateView
import im.vector.riotredesign.features.home.HomeNavigator
import kotlinx.android.synthetic.main.fragment_room_list.*
import org.koin.android.ext.android.inject

class RoomListFragment : RiotFragment(), RoomSummaryController.Callback {

companion object {
fun newInstance(): RoomListFragment {
return RoomListFragment()
}
}

private val homeNavigator by inject<HomeNavigator>()
private val roomController by inject<RoomSummaryController>()
private val homeViewModel: RoomListViewModel by activityViewModel()

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.fragment_room_list, container, false)
}

override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
roomController.callback = this
stateView.contentView = epoxyRecyclerView
epoxyRecyclerView.setController(roomController)
setupFilterView()
homeViewModel.subscribe { renderState(it) }
}

private fun renderState(state: RoomListViewState) {
when (state.asyncRooms) {
is Incomplete -> renderLoading()
is Success -> renderSuccess(state)
is Fail -> renderFailure(state.asyncRooms.error)
}
}

private fun renderSuccess(state: RoomListViewState) {
if (state.asyncRooms().isNullOrEmpty()) {
stateView.state = StateView.State.Empty(getString(R.string.room_list_empty))
} else {
stateView.state = StateView.State.Content
}
roomController.setData(state)
}

private fun renderLoading() {
stateView.state = StateView.State.Loading
}

private fun renderFailure(error: Throwable) {
val message = when (error) {
is Failure.NetworkConnection -> getString(R.string.error_no_network)
else -> getString(R.string.error_common)
}
stateView.state = StateView.State.Error(message)
}

private fun setupFilterView() {
filterRoomView.setupAsSearch()
filterRoomView.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) = Unit

override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) = Unit

override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
homeViewModel.accept(RoomListActions.FilterRooms(s))
}
})
}

// RoomSummaryController.Callback **************************************************************

override fun onRoomSelected(room: RoomSummary) {
homeViewModel.accept(RoomListActions.SelectRoom(room))
homeNavigator.openRoomDetail(room.roomId, null)
}

}

View File

@ -1,171 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.list

import arrow.core.Option
import com.airbnb.mvrx.MvRxViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import com.jakewharton.rxrelay2.BehaviorRelay
import im.vector.matrix.android.api.Matrix
import im.vector.matrix.android.api.session.Session
import im.vector.matrix.android.api.session.group.model.GroupSummary
import im.vector.matrix.android.api.session.room.model.RoomSummary
import im.vector.matrix.android.api.session.room.model.tag.RoomTag
import im.vector.matrix.rx.rx
import im.vector.riotredesign.core.platform.RiotViewModel
import im.vector.riotredesign.features.home.group.SelectedGroupHolder
import im.vector.riotredesign.features.home.room.VisibleRoomHolder
import io.reactivex.Observable
import io.reactivex.functions.Function3
import io.reactivex.rxkotlin.subscribeBy
import org.koin.android.ext.android.get
import java.util.concurrent.TimeUnit

typealias RoomListFilterName = CharSequence

class RoomListViewModel(initialState: RoomListViewState,
private val session: Session,
private val selectedGroupHolder: SelectedGroupHolder,
private val visibleRoomHolder: VisibleRoomHolder,
private val roomSelectionRepository: RoomSelectionRepository,
private val roomSummaryComparator: RoomSummaryComparator)
: RiotViewModel<RoomListViewState>(initialState) {

companion object : MvRxViewModelFactory<RoomListViewModel, RoomListViewState> {

@JvmStatic
override fun create(viewModelContext: ViewModelContext, state: RoomListViewState): RoomListViewModel? {
val currentSession = Matrix.getInstance().currentSession
val roomSelectionRepository = viewModelContext.activity.get<RoomSelectionRepository>()
val selectedGroupHolder = viewModelContext.activity.get<SelectedGroupHolder>()
val visibleRoomHolder = viewModelContext.activity.get<VisibleRoomHolder>()
val roomSummaryComparator = viewModelContext.activity.get<RoomSummaryComparator>()
return RoomListViewModel(state, currentSession, selectedGroupHolder, visibleRoomHolder, roomSelectionRepository, roomSummaryComparator)
}
}


private val roomListFilter = BehaviorRelay.createDefault<Option<RoomListFilterName>>(Option.empty())

init {
observeRoomSummaries()
observeVisibleRoom()
}

fun accept(action: RoomListActions) {
when (action) {
is RoomListActions.SelectRoom -> handleSelectRoom(action)
is RoomListActions.FilterRooms -> handleFilterRooms(action)
}
}

// PRIVATE METHODS *****************************************************************************

private fun handleSelectRoom(action: RoomListActions.SelectRoom) = withState { state ->
if (state.selectedRoomId != action.roomSummary.roomId) {
roomSelectionRepository.saveLastSelectedRoom(action.roomSummary.roomId)
}
}

private fun handleFilterRooms(action: RoomListActions.FilterRooms) {
val optionalFilter = Option.fromNullable(action.roomName)
roomListFilter.accept(optionalFilter)
}

private fun observeVisibleRoom() {
visibleRoomHolder.visibleRoom()
.subscribeBy {
setState { copy(selectedRoomId = it) }
}
.disposeOnClear()
}

private fun observeRoomSummaries() {
Observable.combineLatest<List<RoomSummary>, Option<GroupSummary>, Option<RoomListFilterName>, RoomSummaries>(
session.rx().liveRoomSummaries().throttleLast(300, TimeUnit.MILLISECONDS),
selectedGroupHolder.selectedGroup(),
roomListFilter.throttleLast(300, TimeUnit.MILLISECONDS),
Function3 { rooms, selectedGroupOption, filterRoomOption ->
val filteredRooms = filterRooms(rooms, filterRoomOption)
val selectedGroup = selectedGroupOption.orNull()
val filteredDirectRooms = filteredRooms
.filter { it.isDirect }
.filter {
if (selectedGroup == null) {
true
} else {
it.otherMemberIds
.intersect(selectedGroup.userIds)
.isNotEmpty()
}
}

val filteredGroupRooms = filteredRooms
.filter { !it.isDirect }
.filter {
selectedGroup?.roomIds?.contains(it.roomId) ?: true
}
buildRoomSummaries(filteredDirectRooms + filteredGroupRooms)
}
)
.execute { async ->
copy(
asyncRooms = async
)
}
}

private fun filterRooms(rooms: List<RoomSummary>, filterRoomOption: Option<RoomListFilterName>): List<RoomSummary> {
val filterRoom = filterRoomOption.orNull()
return rooms.filter {
if (filterRoom.isNullOrBlank()) {
true
} else {
it.displayName.contains(other = filterRoom, ignoreCase = true)
}
}
}

private fun buildRoomSummaries(rooms: List<RoomSummary>): RoomSummaries {
val favourites = ArrayList<RoomSummary>()
val directChats = ArrayList<RoomSummary>()
val groupRooms = ArrayList<RoomSummary>()
val lowPriorities = ArrayList<RoomSummary>()
val serverNotices = ArrayList<RoomSummary>()

for (room in rooms) {
val tags = room.tags.map { it.name }
when {
tags.contains(RoomTag.ROOM_TAG_SERVER_NOTICE) -> serverNotices.add(room)
tags.contains(RoomTag.ROOM_TAG_FAVOURITE) -> favourites.add(room)
tags.contains(RoomTag.ROOM_TAG_LOW_PRIORITY) -> lowPriorities.add(room)
room.isDirect -> directChats.add(room)
else -> groupRooms.add(room)
}
}

return RoomSummaries(
favourites = favourites.sortedWith(roomSummaryComparator),
directRooms = directChats.sortedWith(roomSummaryComparator),
groupRooms = groupRooms.sortedWith(roomSummaryComparator),
lowPriorities = lowPriorities.sortedWith(roomSummaryComparator),
serverNotices = serverNotices.sortedWith(roomSummaryComparator)
)
}


}

View File

@ -1,39 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.list

import com.airbnb.mvrx.Async
import com.airbnb.mvrx.MvRxState
import com.airbnb.mvrx.Uninitialized
import im.vector.matrix.android.api.session.room.model.RoomSummary

data class RoomListViewState(
val asyncRooms: Async<RoomSummaries> = Uninitialized,
val selectedRoomId: String? = null
) : MvRxState

data class RoomSummaries(
val favourites: List<RoomSummary>,
val directRooms: List<RoomSummary>,
val groupRooms: List<RoomSummary>,
val lowPriorities: List<RoomSummary>,
val serverNotices: List<RoomSummary>
)

fun RoomSummaries?.isNullOrEmpty(): Boolean {
return this == null || (directRooms.isEmpty() && groupRooms.isEmpty() && favourites.isEmpty() && lowPriorities.isEmpty() && serverNotices.isEmpty())
}

View File

@ -1,70 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.list

import im.vector.matrix.android.api.session.room.model.RoomSummary

class RoomSummaryComparator
: Comparator<RoomSummary> {

override fun compare(leftRoomSummary: RoomSummary?, rightRoomSummary: RoomSummary?): Int {
val retValue: Int
var leftHighlightCount = 0
var rightHighlightCount = 0
var leftNotificationCount = 0
var rightNotificationCount = 0
var rightTimestamp = 0L
var leftTimestamp = 0L

if (null != leftRoomSummary) {
leftHighlightCount = leftRoomSummary.highlightCount
leftNotificationCount = leftRoomSummary.notificationCount
leftTimestamp = leftRoomSummary.lastMessage?.originServerTs ?: 0
}
if (null != rightRoomSummary) {
rightHighlightCount = rightRoomSummary.highlightCount
rightNotificationCount = rightRoomSummary.notificationCount
rightTimestamp = rightRoomSummary.lastMessage?.originServerTs ?: 0
}

if (leftRoomSummary?.lastMessage == null) {
retValue = 1
} else if (rightRoomSummary?.lastMessage == null) {
retValue = -1
} else if (rightHighlightCount > 0 && leftHighlightCount == 0) {
retValue = 1
} else if (rightHighlightCount == 0 && leftHighlightCount > 0) {
retValue = -1
} else if (rightNotificationCount > 0 && leftNotificationCount == 0) {
retValue = 1
} else if (rightNotificationCount == 0 && leftNotificationCount > 0) {
retValue = -1
} else {
val deltaTimestamp = rightTimestamp - leftTimestamp
if (deltaTimestamp > 0) {
retValue = 1
} else if (deltaTimestamp < 0) {
retValue = -1
} else {
retValue = 0
}
}
return retValue

}

}

View File

@ -1,124 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.list

import androidx.annotation.StringRes
import com.airbnb.epoxy.TypedEpoxyController
import im.vector.matrix.android.api.session.room.model.RoomSummary
import im.vector.riotredesign.R
import im.vector.riotredesign.core.resources.StringProvider

class RoomSummaryController(private val stringProvider: StringProvider
) : TypedEpoxyController<RoomListViewState>() {

private var isFavoriteRoomsExpanded = true
private var isDirectRoomsExpanded = false
private var isGroupRoomsExpanded = false
private var isLowPriorityRoomsExpanded = false
private var isServerNoticeRoomsExpanded = false

var callback: Callback? = null

override fun buildModels(viewState: RoomListViewState) {
val roomSummaries = viewState.asyncRooms()
val favourites = roomSummaries?.favourites ?: emptyList()
buildRoomCategory(viewState, favourites, R.string.room_list_favourites, isFavoriteRoomsExpanded) {
isFavoriteRoomsExpanded = !isFavoriteRoomsExpanded
}
if (isFavoriteRoomsExpanded) {
buildRoomModels(favourites, viewState.selectedRoomId)
}

val directRooms = roomSummaries?.directRooms ?: emptyList()
buildRoomCategory(viewState, directRooms, R.string.room_list_direct, isDirectRoomsExpanded) {
isDirectRoomsExpanded = !isDirectRoomsExpanded
}
if (isDirectRoomsExpanded) {
buildRoomModels(directRooms, viewState.selectedRoomId)
}

val groupRooms = roomSummaries?.groupRooms ?: emptyList()
buildRoomCategory(viewState, groupRooms, R.string.room_list_group, isGroupRoomsExpanded) {
isGroupRoomsExpanded = !isGroupRoomsExpanded
}
if (isGroupRoomsExpanded) {
buildRoomModels(groupRooms, viewState.selectedRoomId)
}

val lowPriorities = roomSummaries?.lowPriorities ?: emptyList()
buildRoomCategory(viewState, lowPriorities, R.string.room_list_low_priority, isLowPriorityRoomsExpanded) {
isLowPriorityRoomsExpanded = !isLowPriorityRoomsExpanded
}
if (isLowPriorityRoomsExpanded) {
buildRoomModels(lowPriorities, viewState.selectedRoomId)
}

val serverNotices = roomSummaries?.serverNotices ?: emptyList()
buildRoomCategory(viewState, serverNotices, R.string.room_list_system_alert, isServerNoticeRoomsExpanded) {
isServerNoticeRoomsExpanded = !isServerNoticeRoomsExpanded
}
if (isServerNoticeRoomsExpanded) {
buildRoomModels(serverNotices, viewState.selectedRoomId)
}

}

private fun buildRoomCategory(viewState: RoomListViewState, summaries: List<RoomSummary>, @StringRes titleRes: Int, isExpanded: Boolean, mutateExpandedState: () -> Unit) {
//TODO should add some business logic later
val unreadCount = if (summaries.isEmpty()) {
0
} else {
summaries.map { it.notificationCount }.reduce { acc, i -> acc + i }
}
val showHighlighted = summaries.any { it.highlightCount > 0 }
RoomCategoryItem(
title = stringProvider.getString(titleRes).toUpperCase(),
isExpanded = isExpanded,
unreadCount = unreadCount,
showHighlighted = showHighlighted,
listener = {
mutateExpandedState()
setData(viewState)
}
)
.id(titleRes)
.addTo(this)
}

private fun buildRoomModels(summaries: List<RoomSummary>, selectedRoomId: String?) {
summaries.forEach { roomSummary ->
val unreadCount = roomSummary.notificationCount
val showHighlighted = roomSummary.highlightCount > 0
val isSelected = roomSummary.roomId == selectedRoomId
RoomSummaryItem(
roomName = roomSummary.displayName,
avatarUrl = roomSummary.avatarUrl,
isSelected = isSelected,
showHighlighted = showHighlighted,
unreadCount = unreadCount,
listener = { callback?.onRoomSelected(roomSummary) }
)
.id(roomSummary.roomId)
.addTo(this)
}
}

interface Callback {
fun onRoomSelected(room: RoomSummary)
}

}

View File

@ -1,48 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.home.room.list

import android.widget.ImageView
import android.widget.TextView
import im.vector.riotredesign.R
import im.vector.riotredesign.core.epoxy.KotlinModel
import im.vector.riotredesign.core.platform.CheckableFrameLayout
import im.vector.riotredesign.features.home.AvatarRenderer


data class RoomSummaryItem(
val roomName: CharSequence,
val avatarUrl: String?,
val isSelected: Boolean,
val unreadCount: Int,
val showHighlighted: Boolean,
val listener: (() -> Unit)? = null
) : KotlinModel(R.layout.item_room) {

private val unreadCounterBadgeView by bind<UnreadCounterBadgeView>(R.id.roomUnreadCounterBadgeView)
private val titleView by bind<TextView>(R.id.roomNameView)
private val avatarImageView by bind<ImageView>(R.id.roomAvatarImageView)
private val rootView by bind<CheckableFrameLayout>(R.id.itemRoomLayout)

override fun bind() {
unreadCounterBadgeView.render(unreadCount, showHighlighted)
rootView.isChecked = isSelected
rootView.setOnClickListener { listener?.invoke() }
titleView.text = roomName
AvatarRenderer.render(avatarUrl, roomName.toString(), avatarImageView)
}
}

View File

@ -1,101 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package im.vector.riotredesign.features.media

import android.media.ExifInterface
import android.widget.ImageView
import im.vector.matrix.android.api.Matrix
import im.vector.matrix.android.api.session.content.ContentUrlResolver
import im.vector.riotredesign.core.glide.GlideApp

object MediaContentRenderer {

data class Data(
val url: String?,
val height: Int?,
val maxHeight: Int,
val width: Int?,
val maxWidth: Int,
val orientation: Int?,
val rotation: Int?
)

enum class Mode {
FULL_SIZE,
THUMBNAIL
}

fun render(data: Data, mode: Mode, imageView: ImageView) {
val (width, height) = processSize(data, mode)
imageView.layoutParams.height = height
imageView.layoutParams.width = width

val contentUrlResolver = Matrix.getInstance().currentSession.contentUrlResolver()
val resolvedUrl = when (mode) {
Mode.FULL_SIZE -> contentUrlResolver.resolveFullSize(data.url)
Mode.THUMBNAIL -> contentUrlResolver.resolveThumbnail(data.url, width, height, ContentUrlResolver.ThumbnailMethod.SCALE)
}
?: return

GlideApp
.with(imageView)
.load(resolvedUrl)
.thumbnail(0.3f)
.into(imageView)
}

private fun processSize(data: Data, mode: Mode): Pair<Int, Int> {
val maxImageWidth = data.maxWidth
val maxImageHeight = data.maxHeight
val rotationAngle = data.rotation ?: 0
val orientation = data.orientation ?: ExifInterface.ORIENTATION_NORMAL
var width = data.width ?: maxImageWidth
var height = data.height ?: maxImageHeight
var finalHeight = -1
var finalWidth = -1

// if the image size is known
// compute the expected height
if (width > 0 && height > 0) {
// swap width and height if the image is side oriented
if (rotationAngle == 90 || rotationAngle == 270) {
val tmp = width
width = height
height = tmp
} else if (orientation == ExifInterface.ORIENTATION_ROTATE_90 || orientation == ExifInterface.ORIENTATION_ROTATE_270) {
val tmp = width
width = height
height = tmp
}
if (mode == Mode.FULL_SIZE) {
finalHeight = height
finalWidth = width
} else {
finalHeight = Math.min(maxImageWidth * height / width, maxImageHeight)
finalWidth = finalHeight * width / height
}
}
// ensure that some values are properly initialized
if (finalHeight < 0) {
finalHeight = maxImageHeight
}
if (finalWidth < 0) {
finalWidth = maxImageWidth
}
return Pair(finalWidth, finalHeight)
}
}

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/black" android:state_checked="true" />
<item android:color="@color/bluey_grey_two" />

</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,34 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 B

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item>
<shape>
<solid android:color="@android:color/white" />
</shape>
</item>

<item android:gravity="top">
<shape android:shape="rectangle">
<size android:height="80dp" />
<solid android:color="?colorPrimary" />
</shape>
</item>
</layer-list>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:state_selected="true">
<shape android:shape="oval">
<solid android:color="@android:color/transparent" />
<stroke android:width="3dp" android:color="@color/pale_teal" />
</shape>

</item>
<item android:drawable="@android:color/transparent" />

</selector>

View File

@ -1,170 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,96 +0,0 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="24dp">

<ImageView
android:id="@+id/logoImageView"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:src="@drawable/logo_login" />

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:hint="Username">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/loginField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>


<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:hint="Password">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/passwordField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPassword"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:hint="Homeserver url">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/homeServerField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textUri"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>


</LinearLayout>
</ScrollView>

<ProgressBar
android:id="@+id/progressBar"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_centerInParent="true"
android:layout_margin="8dp"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/authenticateButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<Button
android:id="@+id/authenticateButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="Authenticate"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>


<im.vector.riotredesign.core.platform.StateView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/stateView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/dark">

<com.airbnb.epoxy.EpoxyRecyclerView
android:id="@+id/epoxyRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />

</im.vector.riotredesign.core.platform.StateView>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/stateView"
android:layout_width="match_parent"
android:layout_height="match_parent">

<FrameLayout
android:id="@+id/groupListFragmentContainer"
android:layout_width="64dp"
android:layout_height="match_parent" />

<FrameLayout
android:id="@+id/roomListFragmentContainer"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/groupListFragmentContainer"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,125 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="0dp"
android:layout_height="?actionBarSize"
android:background="?attr/colorPrimary"
app:contentInsetStartWithNavigation="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:id="@+id/toolbarAvatarImageView"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />

<TextView
android:id="@+id/toolbarTitleView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/toolbarSubtitleView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/toolbarAvatarImageView"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" />

<TextView
android:id="@+id/toolbarSubtitleView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/toolbarAvatarImageView"
app:layout_constraintTop_toBottomOf="@+id/toolbarTitleView"
tools:text="@tools:sample/date/day_of_week" />


</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.appcompat.widget.Toolbar>

<com.airbnb.epoxy.EpoxyRecyclerView
android:id="@+id/recyclerView"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/composerDivider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" />

<View
android:id="@+id/composerDivider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/pale_grey"
app:layout_constraintBottom_toTopOf="@+id/composerLayout" />

<RelativeLayout
android:id="@+id/composerLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">

<ImageButton
android:id="@+id/sendButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentEnd="true"
android:background="?android:attr/selectableItemBackground"
android:src="@drawable/ic_send_white"
android:tint="?attr/colorAccent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true" />

<EditText
android:id="@+id/composerEditText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/sendButton"
android:background="@android:color/transparent"
android:gravity="center_vertical"
android:hint="Send a message"
android:minHeight="48dp"
android:nextFocusLeft="@id/composerEditText"
android:nextFocusUp="@id/composerEditText"
android:padding="16dp"
android:textSize="14sp" />

</RelativeLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>


<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/pale_grey">

<EditText
android:id="@+id/filterRoomView"
android:layout_width="0dp"
android:layout_height="32dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:background="@drawable/bg_search_edit_text"
android:drawableLeft="@drawable/ic_search_white"
android:drawablePadding="8dp"
android:drawableTint="#9fa9ba"
android:hint="Filter by name..."
android:lines="1"
android:paddingLeft="8dp"
app:layout_constraintBottom_toTopOf="@+id/stateView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<im.vector.riotredesign.core.platform.StateView
android:id="@+id/stateView"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="0dp"
android:layout_marginBottom="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/filterRoomView">

<com.airbnb.epoxy.EpoxyRecyclerView
android:id="@+id/epoxyRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />

</im.vector.riotredesign.core.platform.StateView>

</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>

<im.vector.riotredesign.core.platform.CheckableFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/itemGroupLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:clickable="true"
android:focusable="true"
android:padding="8dp">

<ImageView
android:id="@+id/groupAvatarImageView"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:duplicateParentState="true"
android:foreground="@drawable/fg_group_item"
tools:src="@tools:sample/avatars" />

</im.vector.riotredesign.core.platform.CheckableFrameLayout>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/progressBar"
android:layout_width="match_parent"
android:layout_height="80dp"
android:padding="16dp" />

View File

@ -1,67 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>

<im.vector.riotredesign.core.platform.CheckableFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/itemRoomLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_room_item"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:paddingLeft="8dp"
android:paddingRight="16dp">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:duplicateParentState="true"
android:minHeight="48dp">

<ImageView
android:id="@+id/roomAvatarImageView"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />

<TextView
android:id="@+id/roomNameView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:duplicateParentState="true"
android:textColor="@color/color_room_title"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/roomUnreadCounterBadgeView"
app:layout_constraintStart_toEndOf="@id/roomAvatarImageView"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" />

<im.vector.riotredesign.features.home.room.list.UnreadCounterBadgeView
android:id="@+id/roomUnreadCounterBadgeView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:minWidth="24dp"
android:minHeight="24dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:textColor="@android:color/white"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:background="@drawable/bg_unread_highlight"
tools:text="115" />

</androidx.constraintlayout.widget.ConstraintLayout>

</im.vector.riotredesign.core.platform.CheckableFrameLayout>

View File

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/roomCategoryRootView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:paddingTop="8dp"
android:paddingRight="8dp"
android:paddingBottom="8dp"
tools:background="@color/pale_grey">

<TextView
android:id="@+id/roomCategoryTitleView"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="8dp"
android:drawableLeft="@drawable/ic_expand_more_white"
android:drawableTint="@color/bluey_grey_two"
android:gravity="center_vertical"
android:text="DIRECT MESSAGES"
android:textColor="@color/bluey_grey_two"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/roomCategoryUnreadCounterBadgeView"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<im.vector.riotredesign.features.home.room.list.UnreadCounterBadgeView
android:id="@+id/roomCategoryUnreadCounterBadgeView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:minWidth="24dp"
android:minHeight="24dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:textColor="@android:color/white"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/roomCategoryAddButton"
app:layout_constraintTop_toTopOf="parent"
tools:background="@drawable/bg_unread_highlight"
tools:text="4" />

<ImageView
android:id="@+id/roomCategoryAddButton"
android:layout_width="40dp"
android:layout_height="40dp"
android:scaleType="centerInside"
android:src="@drawable/ic_add_circle_white"
android:tint="@color/bluey_grey_two"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />


</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,64 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp">


<ImageView
android:id="@+id/messageAvatarImageView"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />

<TextView
android:id="@+id/messageMemberNameView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="64dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textSize="15sp"
app:layout_constraintBottom_toTopOf="@+id/toolbarSubtitleView"
app:layout_constraintEnd_toStartOf="@+id/messageTimeView"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" />


<TextView
android:id="@+id/messageTimeView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:textColor="@color/brown_grey"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintTop_toTopOf="@id/messageMemberNameView"
tools:text="@tools:sample/date/hhmm" />

<ImageView
android:id="@+id/messageImageView"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="64dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/messageMemberNameView" />

</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp">

<ImageView
android:id="@+id/itemNoticeAvatarView"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="64dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/itemNoticeTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:textColor="@color/slate_grey"
android:textSize="14sp"
android:textStyle="italic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/itemNoticeAvatarView"
app:layout_constraintTop_toTopOf="parent"
tools:text="Mon item" />

</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp">


<ImageView
android:id="@+id/messageAvatarImageView"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />

<TextView
android:id="@+id/messageMemberNameView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="64dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textSize="15sp"
app:layout_constraintBottom_toTopOf="@+id/toolbarSubtitleView"
app:layout_constraintEnd_toStartOf="@+id/messageTimeView"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" />


<TextView
android:id="@+id/messageTimeView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:textColor="@color/brown_grey"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintTop_toTopOf="@id/messageMemberNameView"
tools:text="@tools:sample/date/hhmm" />

<TextView
android:id="@+id/messageTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="64dp"
android:layout_marginBottom="8dp"
android:textColor="@color/dark_grey"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/messageMemberNameView"
tools:text="Alright finished work, heading there in about 20 mins…Ping me when youre outside" />


</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="40dp"
android:padding="8dp"
tools:parentTag="android.widget.FrameLayout">

<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" />


<LinearLayout
android:id="@+id/errorView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">

<TextView
android:id="@+id/errorMessageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:textColor="@android:color/black"
android:textSize="16sp"
tools:text="Une erreur est survenue" />


<Button
android:id="@+id/errorRetryView"
android:layout_width="190dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:text="@string/global_retry"
android:textColor="@android:color/white" />

</LinearLayout>


<LinearLayout
android:id="@+id/emptyView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">

<TextView
android:id="@+id/emptyMessageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:textColor="@android:color/black"
android:textSize="16sp" />


<ImageView
android:id="@+id/emptyImageView"
android:layout_width="190dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="8dp" />

</LinearLayout>

</merge>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Base.V21.Theme.Riot" parent="Base.V1.Theme.Riot"></style>

<style name="Base.Theme.Riot" parent="Base.V21.Theme.Riot" />


</resources>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="pale_grey">#f2f5f8</color>
<color name="dark">#2e3649</color>
<color name="pale_teal">#7ac9a1</color>
<color name="black">#212121</color>
<color name="deep_sky_blue">#007aff</color>
<color name="rosy_pink">#f56679</color>
<color name="bluey_grey">#a5a5a6</color>
<color name="slate_grey">#5f6268</color>
<color name="sky_blue">#7bb2ea</color>
<color name="bluey_grey_two">#929eb4</color>
<color name="light_blue_grey">#4ac1c9d6</color>
<color name="dark_grey">#2e2f32</color>
<color name="light_grey_blue">#9fa9ba</color>
<color name="cool_grey">#a5aab2</color>
<color name="pale_grey_two">#ebedf8</color>
<color name="brown_grey">#a5a5a5</color>
<color name="grey_lynch">#61708B</color>
</resources>

View File

@ -1,15 +0,0 @@
<resources>
<string name="app_name">"Riot X"</string>

<string name="global_retry">"Retry"</string>
<string name="error_no_network">"No network connection"</string>
<string name="error_common">"An error occurred"</string>

<string name="room_list_empty">"Join a room to start using the app."</string>
<string name="room_list_favourites">"Favourites"</string>
<string name="room_list_direct">"People"</string>
<string name="room_list_group">"Rooms"</string>
<string name="room_list_low_priority">"Low priority"</string>
<string name="room_list_system_alert">"System Alerts"</string>

</resources>

View File

@ -1,4 +0,0 @@
<resources>


</resources>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Widget.Button" parent="Widget.AppCompat.Button">
<item name="android:minHeight">48dp</item>
<item name="android:background">?attr/colorAccent</item>
<item name="android:textColor">@android:color/white</item>
</style>


</resources>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Theme.Riot" parent="Base.Theme.Riot">

</style>

<style name="Theme.Riot.Splash">
<item name="android:windowBackground">@drawable/bg_splash</item>
</style>


</resources>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Base.V1.Theme.Riot" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/dark</item>
<item name="colorPrimaryDark">@color/dark</item>
<item name="colorAccent">@color/pale_teal</item>
<item name="buttonStyle">@style/Widget.Button</item>
</style>

<style name="Base.Theme.Riot" parent="Base.V1.Theme.Riot" />



</resources>

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>

Some files were not shown because too many files have changed in this diff Show More