1
0
mirror of https://github.com/vector-im/riotX-android synced 2025-10-06 00:02:48 +02:00

Compare commits

...

627 Commits

Author SHA1 Message Date
Benoit Marty
ce6d4c4a64 Merge branch 'release/1.0.15' 2021-02-03 17:08:27 +01:00
Benoit Marty
061f3c6919 Prepare release 1.0.15 2021-02-03 17:07:49 +01:00
Benoit Marty
9b13381938 Merge pull request #2762 from vector-im/feature/bma/track
Improvements
2021-02-03 17:02:25 +01:00
Benoit Marty
bc22647b48 Merge pull request #2753 from vector-im/feature/bca/sso_reauth
Feature/bca/sso reauth
2021-02-03 16:12:54 +01:00
Valere
73fccdd6de fix test compilation 2021-02-03 15:38:16 +01:00
Benoit Marty
ad9873c565 Some cleanup 2021-02-03 14:52:58 +01:00
Valere
e976100f1a Fix test compilation error 2021-02-03 14:48:43 +01:00
Valere
289a3ab21f remove dev id for now 2021-02-03 14:36:38 +01:00
Valere
286f00396d Removed unused var 2021-02-03 14:20:58 +01:00
Valere
2a12cf22f5 fix code quality, line too long 2021-02-03 09:39:26 +01:00
Valere
97daf57b0a cleaning 2021-02-03 09:32:51 +01:00
Valere
697b551b9b Cleaning / Code review 2021-02-02 23:10:14 +01:00
Valere
0211197c47 SSO UIA for add 3pid + refactoring move RegistrationFlow to api 2021-02-02 22:25:49 +01:00
Benoit Marty
6ac2717d8b Merge pull request #2760 from vector-im/feature/fga/fix_multiple_task
Fix multiple tasks
2021-02-02 17:55:19 +01:00
ganfra
49aed39711 Fix multiple tasks 2021-02-02 17:11:45 +01:00
Benoit Marty
a820443c56 Fix copyright 2021-02-02 13:05:39 +01:00
Benoit Marty
67aa239398 Merge pull request #2755 from vector-im/feature/bma/big_e2e_rooms_2
Data for Worker overload (#2721)
2021-02-02 13:04:33 +01:00
Valere
2a3962265b SSO UIA for deactivate account 2021-02-02 12:30:46 +01:00
Benoit Marty
e6fc605b08 Data for Worker overload (#2721) 2021-02-02 11:40:52 +01:00
Valere
8129cd0cd3 Cleaning + changelog 2021-02-02 09:32:04 +01:00
Valere
0bc203e0d5 Setup cross signing after initial sync if not yet done
Use grace period if available, if not fail silently
2021-02-02 09:02:10 +01:00
Valere
6c9b16088f Secure secrets passed to intent 2021-02-02 08:59:28 +01:00
Valere
76b425ee8a Cleaning 2021-02-01 16:39:14 +01:00
Valere
5b8215a356 Support SSO provider brand + UI fixes 2021-02-01 16:39:14 +01:00
Valere
9c7df25862 Relax rule for e2e by default 2021-02-01 16:39:14 +01:00
Valere
da16ec0af3 UIA fixes + better error support 2021-02-01 16:39:14 +01:00
Valere
1244d00b31 SSO UIA 2021-02-01 16:39:14 +01:00
Onuray Sahin
98054815a4 Merge pull request #2749 from vector-im/feature/ons/fix_replace_matrix_widget_id
Support $matrix_widget_id parameter.
2021-02-01 18:38:52 +03:00
Onuray Sahin
06be3e691d Support $matrix_widget_id parameter. 2021-02-01 18:13:26 +03:00
Benoit Marty
c794843bb2 Inject the context in the constructor 2021-01-26 17:16:55 +01:00
Benoit Marty
afa3149504 Use lifecycleScope rather than an Empty ViewModel 2021-01-25 23:09:14 +01:00
Benoit Marty
f2f4d325eb Bugfix: remove duplicate "More" section 2021-01-25 20:57:38 +01:00
Benoit Marty
fef0404ac7 Merge pull request #2706 from vector-im/feature/ons/fix_url_preview_on_edit
Update url preview when the event is edited.
2021-01-25 18:06:04 +01:00
Benoit Marty
d6a5b9fb48 fulfill assertion about eventId 2021-01-25 16:42:53 +01:00
Benoit Marty
57dba2f29a Merge branch 'develop' into feature/ons/fix_url_preview_on_edit 2021-01-25 16:05:26 +01:00
Benoit Marty
f64db7f5f3 Fix test compilation 2021-01-25 16:03:31 +01:00
Benoit Marty
128d3845b9 Small rework 2021-01-25 15:19:01 +01:00
Benoit Marty
602ea3327b URL preview: improve fix regarding message edition 2021-01-25 15:11:42 +01:00
Benoit Marty
e55178612c Merge pull request #2665 from vector-im/feature/bca/dendrite_sync_fix
Fix Dendrite sync response support
2021-01-25 14:23:13 +01:00
Benoit Marty
5a0d62db6f Cleanup (PR review)
Also add some doc and add missing `internal` keyword
2021-01-25 12:42:39 +01:00
Benoit Marty
ed62e6a390 Merge pull request #2715 from vector-im/gradlew-update-6.8.1
Update Gradle Wrapper from 6.8 to 6.8.1
2021-01-25 09:55:03 +01:00
Benoit Marty
25a6b0ddfb Merge pull request #2714 from vector-im/feature/bma/bulk_clean
Feature/bma/bulk clean
2021-01-25 09:54:46 +01:00
gradle-update-robot
89cf1f3237 Update Gradle Wrapper from 6.8 to 6.8.1.
Signed-off-by: gradle-update-robot <gradle-update-robot@regolo.cc>
2021-01-23 01:32:49 +00:00
Benoit Marty
b65fc4f46b rename val 2021-01-22 17:59:56 +01:00
Benoit Marty
401b5e2b7a Move private fun 2021-01-22 17:48:13 +01:00
Benoit Marty
a44d00a31c Create data class. 2021-01-22 17:44:24 +01:00
Benoit Marty
267ae457ee Use const 2021-01-22 17:38:17 +01:00
Benoit Marty
887da0a3d6 Improve code #2 2021-01-22 17:37:25 +01:00
Benoit Marty
07ffd3ded3 Improve code 2021-01-22 17:32:00 +01:00
Benoit Marty
25dbb3e9ea Fix bad copy/paste 2021-01-22 17:26:10 +01:00
Benoit Marty
68177a02e1 Merge pull request #2709 from AndrewFerr/develop
Identity: Recompute hashes after M_INVALID_PEPPER
2021-01-22 17:20:43 +01:00
Benoit Marty
0a96841336 Merge branch 'develop' into develop 2021-01-22 17:20:36 +01:00
Benoit Marty
4dcd7846b0 Merge pull request #2616 from vector-im/feature/ons/android_11_migration
Migrate to Android 11, API 30.
2021-01-22 17:17:04 +01:00
Benoit Marty
dc48cd4d16 Merge pull request #2712 from vector-im/feature/ons/fix_viewbinding_crashes
Fix viewbinding NPE crashes
2021-01-22 16:53:56 +01:00
Onuray Sahin
883a7cecf0 Fix viewbinding npe crashes. 2021-01-22 15:34:40 +03:00
Andrew Ferrazzutti
daf019b288 Identity: Recompute hashes after M_INVALID_PEPPER
When a new pepper is retrieved after an M_INVALID_PEPPER response,
recompute hashes with that pepper, and send those new hashes in the next
lookup attempt instead of reusing the original hashes.

Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net>
2021-01-21 21:52:19 -05:00
Onuray Sahin
5eeb545ae2 Update url preview when the event is edited. 2021-01-21 15:20:19 +03:00
Benoit Marty
618d1f5de6 Merge pull request #2701 from vector-im/feature/bma/fix_clear_cache
Fix clear cache issue: sometimes, after a clear cache, there is still a token, so the init sync service is not started.
2021-01-20 17:15:12 +01:00
Benoit Marty
277fc4bf61 Merge branch 'develop' into feature/bma/fix_clear_cache 2021-01-20 17:15:02 +01:00
Benoit Marty
c75eb050df Cleanup and fix test compilation 2021-01-20 16:32:41 +01:00
Benoit Marty
304b489470 Merge pull request #2699 from vector-im/feature/ons/fix_navigation_drawer_max_width
Drawer layout width limit for landscape and tablets
2021-01-20 15:37:46 +01:00
Benoit Marty
4709002429 Fix clear cache issue: sometimes, after a clear cache, there is still a token, so the init sync service is not started.
Migratiing to supend methods fixes the problem, I'm not sure why...
2021-01-20 15:19:48 +01:00
Onuray Sahin
f36bab0a7a Limit drawer layout with max width. 2021-01-19 15:33:35 +03:00
Benoit Marty
68f422e498 Merge pull request #2680 from vector-im/feature/dfa/dagger_update
Dagger: update to 2.31 and use new AssistedInject
2021-01-15 15:57:44 +01:00
ganfra
2c0b7ce0f4 Dagger: update to 2.31 and use new AssistedInject 2021-01-15 15:23:24 +01:00
Benoit Marty
72ee1ace48 Version++ 2021-01-15 11:14:59 +01:00
Benoit Marty
7c013de7b9 Merge branch 'release/1.0.14' 2021-01-15 11:13:49 +01:00
Benoit Marty
979ffcf227 Merge branch 'release/1.0.14' into develop 2021-01-15 11:13:47 +01:00
Benoit Marty
f0f0aafa1b Prepare release 1.0.14 2021-01-15 11:13:36 +01:00
Benoit Marty
c2d5ded335 Merge pull request #2673 from vector-im/feature/bma/fix_weblate
Fix issue coming from Weblate and ensure Hebrew is taken into account in the internal language screen setting
2021-01-14 17:09:26 +01:00
Benoit Marty
1a5291537d Correct support for Hebrew 2021-01-14 14:27:22 +01:00
Benoit Marty
d6ef3ea08e Fix lint issues 2021-01-14 14:08:08 +01:00
Benoit Marty
fac9a65f54 Merge pull request #2670 from RiotTranslateBot/weblate-element-android-element-app
Translations update from Weblate
2021-01-14 11:28:13 +01:00
Weblate
93fc64ff33 Merge branch 'origin/develop' into Weblate. 2021-01-14 09:57:30 +00:00
Flat Earth Israel Association
e097c92458 Translated using Weblate (Hebrew)
Currently translated at 54.2% (1114 of 2055 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-14 09:57:18 +00:00
Jeff Huang
e91dbfbf2c Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (7 of 7 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hant/
2021-01-14 09:57:14 +00:00
Jeff Huang
801f2860e2 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (2055 of 2055 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hant/
2021-01-14 09:57:14 +00:00
Benoit Marty
1ffc3a4f53 Merge pull request #2621 from vector-im/feature/bca/crypto_store_outbound
Persist outbound group session
2021-01-14 10:44:08 +01:00
Benoit Marty
844fe2c4cd Merge branch 'develop' into feature/bca/crypto_store_outbound 2021-01-14 10:43:38 +01:00
Benoit Marty
69efb45fb7 Merge pull request #2659 from vector-im/feature/bma/fix_init_sync
Fix issue with delay set to 0
2021-01-14 10:41:10 +01:00
Benoit Marty
1103d7c112 Merge pull request #2637 from vector-im/feature/bma/investigation
Fix switch theme issue
2021-01-14 10:39:13 +01:00
Benoit Marty
c88072e55f Merge branch 'develop' into feature/bma/investigation 2021-01-14 10:38:56 +01:00
Benoit Marty
e041d404f3 Merge pull request #2664 from vector-im/feature/ons/emoji_keyboard_settings
Option to hide emoji keyboard.
2021-01-14 10:17:33 +01:00
Benoit Marty
5b07af2c12 Merge pull request #2666 from RiotTranslateBot/weblate-element-android-element-app
Translations update from Weblate
2021-01-13 23:54:12 +01:00
Weblate
de73539d2b Merge branch 'origin/develop' into Weblate. 2021-01-13 15:00:03 +00:00
argaman
f7ed94c6e9 Translated using Weblate (Hebrew)
Currently translated at 52.1% (1052 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-13 14:59:56 +00:00
Valere
36b1a1471a Fix Dendrite sync response support 2021-01-13 14:23:45 +01:00
Onuray Sahin
1f1eeccc32 Option to hide emoji keyboard is added. 2021-01-13 13:28:46 +03:00
Benoit Marty
1d449c84fe Merge pull request #2661 from vector-im/feature/bma/fix_join
Fix request too large Uri error when joining a room
2021-01-13 09:29:04 +01:00
argaman
0750c7763c Translated using Weblate (Hebrew)
Currently translated at 52.1% (1052 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-12 21:37:23 +00:00
אבי טייב
dbaaa07dad Translated using Weblate (Hebrew)
Currently translated at 52.1% (1052 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-12 21:37:23 +00:00
Benoit Marty
7446b12827 Fix request too large Uri error when joining a room 2021-01-12 18:16:35 +01:00
Benoit Marty
d4c8f56c6e More renaming 2021-01-12 16:29:05 +01:00
Benoit Marty
2ea45185d4 Ensure the service is restarted with the correct intent 2021-01-12 16:26:52 +01:00
Benoit Marty
50ba131350 More renaming 2021-01-12 16:18:29 +01:00
Benoit Marty
b2df107f17 Remove unused params 2021-01-12 16:11:22 +01:00
Benoit Marty
2b60affd9a Remove useless param 2021-01-12 16:07:49 +01:00
Benoit Marty
e771b21ea3 Rename parameters for clarity 2021-01-12 16:07:49 +01:00
Benoit Marty
b20bbc1295 When network is back, do an immediate sync 2021-01-12 16:07:49 +01:00
Benoit Marty
609ceb7fa4 Avoid Magic numbers 2021-01-12 16:07:49 +01:00
Benoit Marty
aac3f379a7 Add a log 2021-01-12 16:07:49 +01:00
Benoit Marty
d46ae83dc4 Define constant for keys 2021-01-12 16:07:49 +01:00
Benoit Marty
561b89830a Avoid default value for param 2021-01-12 16:07:49 +01:00
Benoit Marty
b69d8ad71a Code cleanup, fix crash if appContext !is HasVectorInjector 2021-01-12 16:07:49 +01:00
Benoit Marty
ec0a04e893 timeout -> restart without delay 2021-01-12 16:07:49 +01:00
Benoit Marty
8307245120 Fix issue with delay set to 0 2021-01-12 16:07:49 +01:00
Benoit Marty
5431584b3c Merge pull request #2627 from vector-im/feature/bma/edit_power_level
Edit power level
2021-01-12 10:31:17 +01:00
Valere
426782a001 remember groupId in session cache 2021-01-12 09:48:02 +01:00
Valere
7eb9941f8c Code review 2021-01-12 09:14:30 +01:00
Benoit Marty
f585deb1d7 Merge pull request #2643 from EdGeraghty/patch-1
Update CHANGES.md
2021-01-11 19:08:21 +01:00
Benoit Marty
26c4c7e467 split long line 2021-01-11 17:10:08 +01:00
Benoit Marty
b2b1bebc32 Merge pull request #2645 from vector-im/gradlew-update-6.8
Update Gradle Wrapper from 6.7.1 to 6.8
2021-01-11 17:03:08 +01:00
gkkulik
793c0ababb Translated using Weblate (Silesian)
Currently translated at 3.1% (63 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/szl/
2021-01-11 09:36:30 +00:00
Ahrale
cf1628228a Translated using Weblate (Hebrew)
Currently translated at 50.4% (1018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-11 09:36:27 +00:00
Flat Earth Israel Association
7f433ac4a0 Translated using Weblate (Hebrew)
Currently translated at 50.4% (1018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-11 09:36:26 +00:00
אבי טייב
48f03c0953 Translated using Weblate (Hebrew)
Currently translated at 50.4% (1018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-11 09:36:03 +00:00
linsui
e75d25f00c Translated using Weblate (Chinese (Simplified))
Currently translated at 95.9% (1936 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/
2021-01-11 09:35:48 +00:00
Ihor Hordiichuk
e22e70c5ba Translated using Weblate (Ukrainian)
Currently translated at 61.5% (1242 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2021-01-11 09:35:46 +00:00
Andreas Kelemen
a8e4be9146 Translated using Weblate (Greek)
Currently translated at 24.2% (490 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/el/
2021-01-11 09:35:44 +00:00
Constantinos Miltiadis
a9ee94e3f0 Translated using Weblate (Greek)
Currently translated at 24.2% (490 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/el/
2021-01-11 09:35:44 +00:00
kojid
cdaddb15af Translated using Weblate (German)
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-01-11 09:35:43 +00:00
Ludwig Bald
a724f844f7 Translated using Weblate (German)
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-01-09 20:53:49 +00:00
kojid
2546061933 Translated using Weblate (German)
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-01-09 20:53:45 +00:00
gradle-update-robot
f4db593009 Update Gradle Wrapper from 6.7.1 to 6.8.
Signed-off-by: gradle-update-robot <gradle-update-robot@regolo.cc>
2021-01-09 01:14:35 +00:00
Ed Geraghty
ce92533525 Update CHANGES.md
No need to gender users :)
2021-01-09 00:39:24 +00:00
gkkulik
6d5e1b2285 Added translation using Weblate (Silesian) 2021-01-08 22:30:19 +00:00
gkkulik
6388d6b91b Added translation using Weblate (Silesian) 2021-01-08 22:25:16 +00:00
Andreas Kelemen
54e501127c Translated using Weblate (Greek)
Currently translated at 23.1% (468 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/el/
2021-01-08 21:21:50 +00:00
Constantinos Miltiadis
6bcd96d629 Translated using Weblate (Greek)
Currently translated at 23.1% (468 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/el/
2021-01-08 21:21:50 +00:00
Constantinos Miltiadis
996fe71de9 Translated using Weblate (Greek)
Currently translated at 22.8% (462 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/el/
2021-01-08 21:08:40 +00:00
Andreas Kelemen
08b38cd6ad Translated using Weblate (Greek)
Currently translated at 22.8% (462 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/el/
2021-01-08 21:08:39 +00:00
אבי טייב
d649cb4aa5 Translated using Weblate (Ukrainian)
Currently translated at 60.5% (1222 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2021-01-08 20:33:17 +00:00
John
61be2dd3df Translated using Weblate (Greek)
Currently translated at 21.7% (439 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/el/
2021-01-08 20:32:19 +00:00
Petros Koutsolampros
b6dda73cb1 Translated using Weblate (Greek)
Currently translated at 21.7% (439 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/el/
2021-01-08 20:32:19 +00:00
Constantinos Miltiadis
0c77f49ffd Translated using Weblate (Greek)
Currently translated at 21.7% (439 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/el/
2021-01-08 20:32:13 +00:00
Andreas Kelemen
76f4a1b4f1 Translated using Weblate (Greek)
Currently translated at 21.7% (439 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/el/
2021-01-08 20:32:11 +00:00
Benoit Marty
466f9bd532 Merge pull request #2629 from vector-im/feature/ons/fix_show_sending_image
Sent image not displayed when opened immediately after sending
2021-01-08 17:39:27 +01:00
Benoit Marty
992edb2ee2 Merge branch 'develop' into feature/ons/fix_show_sending_image 2021-01-08 17:38:59 +01:00
Benoit Marty
8de4b0bb20 Small formatting 2021-01-08 15:55:32 +01:00
Benoit Marty
e21c8792e6 Fix switch theme issue, and white field issue (#2599, #2528)
Remove some workarounds. I cannot reproduce the bug of signout which does not destroy the HomeActivityViewModel...
2021-01-08 15:55:32 +01:00
Benoit Marty
54f6440bcf super.onClear() called at the end 2021-01-08 15:54:51 +01:00
Flat Earth Israel Association
819f0c021e Translated using Weblate (Hebrew)
Currently translated at 18.1% (367 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-08 14:36:32 +00:00
אבי טייב
bc2f49fa31 Translated using Weblate (Hebrew)
Currently translated at 18.1% (367 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-08 14:36:32 +00:00
Ahrale
d3a3ba8079 Translated using Weblate (Hebrew)
Currently translated at 18.1% (367 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-08 14:36:26 +00:00
Benoit Marty
1540f13444 Merge pull request #2633 from vector-im/feature/fix_initial_sync_retry
Sync: fix initial sync retry
2021-01-08 14:50:22 +01:00
Flat Earth Israel Association
245d580825 Translated using Weblate (Hebrew)
Currently translated at 14.0% (283 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-08 13:50:08 +00:00
אבי טייב
2578423c91 Translated using Weblate (Hebrew)
Currently translated at 14.0% (283 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-08 13:50:08 +00:00
Flat Earth Israel Association
1762451bc0 Translated using Weblate (Hebrew)
Currently translated at 9.2% (187 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-08 13:31:53 +00:00
אבי טייב
38e4984a4a Translated using Weblate (Hebrew)
Currently translated at 9.2% (187 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-08 13:31:50 +00:00
אבי טייב
9d7c49306a Translated using Weblate (Hebrew)
Currently translated at 7.4% (150 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-08 13:23:59 +00:00
Flat Earth Israel Association
6b605b2e98 Translated using Weblate (Hebrew)
Currently translated at 7.4% (150 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-08 13:23:58 +00:00
Flat Earth Israel Association
cf0242f23a Translated using Weblate (Hebrew)
Currently translated at 6.4% (130 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-08 13:20:04 +00:00
אבי טייב
56e8325efe Translated using Weblate (Hebrew)
Currently translated at 6.4% (130 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/he/
2021-01-08 13:20:02 +00:00
ganfra
d91ed2985d Sync: fix initial sync is not retried correctly when there is some network error. [#2632] 2021-01-08 12:42:36 +01:00
Benoit Marty
5f9f69b4dc Simplify signatures 2021-01-08 12:27:40 +01:00
Benoit Marty
da33cbedda Introduce LocalFilesHelper to avoid using the Context directly 2021-01-08 12:23:02 +01:00
Benoit Marty
2d91865277 Merge pull request #2624 from vector-im/feature/bma/avoidEventBus2
Remove dependency to org.greenrobot.eventbus library
2021-01-08 10:04:38 +01:00
Flat Earth Israel Association
003f5fab1f Added translation using Weblate (Hebrew) 2021-01-07 19:44:32 +00:00
Benoit Marty
2a365d6776 Move interface to correct location 2021-01-07 18:28:05 +01:00
Onuray Sahin
55f5f90c45 Use ContentResolver and DocumentFile instead of legacy File.
Fixes #409.
2021-01-07 19:32:04 +03:00
Benoit Marty
bd3bdd6996 Merge pull request #2594 from vector-im/feature/ons/fix_room_topic_scroll
Disable scroll effect when click to a link in the topic.
2021-01-07 15:20:47 +01:00
Benoit Marty
0cf485d873 Merge pull request #2622 from vector-im/feature/bma/leave_private
Warn user when he is leaving a not public room (#1460)
2021-01-07 15:18:35 +01:00
Benoit Marty
75e06d43c5 Cover room settings screens by the sanity unit test 2021-01-07 12:29:34 +01:00
Valere
afa1cf7d6c Cleaning 2021-01-07 11:18:05 +01:00
Benoit Marty
a6f909b942 Add Javadoc 2021-01-07 11:04:11 +01:00
Benoit Marty
ae55ee82a7 Cleanup 2021-01-07 00:07:40 +01:00
Benoit Marty
037e53f385 Split permissions between useful ones and the others 2021-01-06 23:24:25 +01:00
Benoit Marty
a28dfdc48e Improve UI and UX when permission are not editable 2021-01-06 23:03:09 +01:00
Benoit Marty
81bdf506bc Fix Int type issue when sending PowerLevelsContent to the server 2021-01-06 22:53:51 +01:00
Benoit Marty
f253aa6b37 Remove unused field 2021-01-06 18:45:24 +01:00
Benoit Marty
0702eee179 Improve code 2021-01-06 18:38:06 +01:00
Benoit Marty
c4a019f0d3 Edit room permissions (#2471) 2021-01-06 17:42:28 +01:00
Onuray Sahin
e948e9d85a Lint fixes. 2021-01-06 16:28:45 +03:00
Benoit Marty
22c10f5ada Prefer immutable type 2021-01-06 12:24:47 +01:00
Onuray Sahin
869eb262f3 Lint fixes. 2021-01-06 12:49:11 +03:00
Benoit Marty
7249c7d25a Merge pull request #2625 from yquemener/patch-1
Typo in the set-up instructions for the test homeserver
2021-01-06 09:36:40 +01:00
Yves Quemener
6e8d93bc6f Fix in the test homeserver set-up instruction
I think I removed a typo. You probably don't want a new virtualenv every time you start a homeserver?
2021-01-06 11:22:25 +09:00
Benoit Marty
963c30a275 Remove dependency to org.greenrobot.eventbus library 2021-01-05 18:56:24 +01:00
Onuray Sahin
474ade01cf Merge branch 'develop' into feature/ons/fix_room_topic_scroll 2021-01-05 15:08:15 +03:00
Onuray Sahin
18d4b66c97 Fix copy topic on long click. 2021-01-05 15:06:50 +03:00
Onuray Sahin
fa311f4ce2 Fix bug reporter progress. 2021-01-05 14:44:02 +03:00
Benoit Marty
3a9b80127f Warn user when he is leaving a not public room (#1460) 2021-01-05 11:46:59 +01:00
Benoit Marty
78c1a0acf4 Merge pull request #2617 from vector-im/feature/bma/malformed
Tapping drawer having more than 1 room in notifications gives "malformed link" error (#2605)
2021-01-05 10:37:11 +01:00
Valere
4ee34126bd Persist outbound group session 2021-01-05 10:04:34 +01:00
Benoit Marty
4f59ec37ca Tapping drawer having more than 1 room in notifications gives "malformed link" error (#2605) 2021-01-04 18:18:34 +01:00
Benoit Marty
c34fea2932 Do not defien Element Stuff in the SDK 2021-01-04 18:16:12 +01:00
Benoit Marty
c11a50f7ff Malformed matrix.to link: display a dialog instead of a toast 2021-01-04 18:07:47 +01:00
Onuray Sahin
23623b8895 Migrate to Android 11, API 30. 2021-01-04 17:12:49 +03:00
Benoit Marty
b475f36b5a Merge pull request #2615 from vector-im/feature/bma/fix_attachmentViewer
Fix crash in AttachmentViewerActivity (after ViewBindings)
2021-01-04 15:06:57 +01:00
Benoit Marty
11367488e6 Fix crash in AttachmentViewerActivity (after ViewBindings)
And improve code a bit
2021-01-04 14:21:57 +01:00
Benoit Marty
a7d8e74468 Merge pull request #2604 from vector-im/feature/ons/fix_hide_member_events
Feature/ons/fix hide member events
2021-01-04 10:48:22 +01:00
Benoit Marty
a25b93197d Merge pull request #2601 from vector-im/feature/bma/sticker
Unspecced msgType field in m.sticker (#2580)
2021-01-04 10:17:08 +01:00
Danial Behzadi
83f2ff5d82 Translated using Weblate (Persian)
Currently translated at 87.7% (193 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/fa/
2021-01-03 12:35:41 +00:00
Danial Behzadi
868c056ddd Translated using Weblate (Persian)
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/
2021-01-03 12:35:41 +00:00
Ngô Ngọc Đức Huy
0106adf36c Translated using Weblate (Vietnamese)
Currently translated at 13.0% (263 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/vi/
2021-01-02 03:35:43 +00:00
Dat Ng
b6a93be611 Translated using Weblate (Vietnamese)
Currently translated at 13.0% (263 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/vi/
2021-01-02 03:35:43 +00:00
sr093906
61291f7337 Translated using Weblate (Chinese (Simplified))
Currently translated at 95.0% (1919 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/
2021-01-02 03:35:40 +00:00
Onuray Sahin
05013d2559 Fix changelog. 2020-12-30 12:17:25 +03:00
Onuray Sahin
3240cadb94 Fix membership event visibility condition. 2020-12-30 12:08:27 +03:00
LinAGKar
594ee61a99 Translated using Weblate (Swedish)
Currently translated at 100.0% (220 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/sv/
2020-12-29 22:35:44 +00:00
zeritti
c85b0124e3 Translated using Weblate (Czech)
Currently translated at 100.0% (220 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/cs/
2020-12-29 22:35:44 +00:00
LinAGKar
61bc19fc96 Translated using Weblate (Swedish)
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sv/
2020-12-29 22:35:43 +00:00
Benoit Marty
3ea3d0fc91 Unspecced msgType field in m.sticker (#2580) 2020-12-29 15:42:12 +01:00
Benoit Marty
f1f1613f00 Cleanup and format 2020-12-29 09:56:15 +01:00
Benoit Marty
68dd206140 Merge pull request #2592 from vector-im/feature/bma/fix_viwe_bindings
Fix crash after migration to view bindings
2020-12-29 09:49:49 +01:00
Benoit Marty
17e8581ef0 Merge pull request #2597 from Tigermouthbear/develop
Add System theme option and set as default
2020-12-29 09:47:58 +01:00
Benoit Marty
7ff45738e0 Merge pull request #2543 from vector-im/feature/ons/wait_members_before_sending_event
Make sure to load all members in the room before sending the event
2020-12-29 09:31:30 +01:00
Tigermouthbear
c9eacec449 Fix formatting in ThemeUtils 2020-12-29 00:22:12 -05:00
Tigermouthbear
3e78098c43 Add System theme option and set as default; closes #904, closes #2387 2020-12-28 23:32:06 -05:00
Onuray Sahin
cbdacc199a Disable scroll effect when click to a link in the topic. 2020-12-28 17:17:01 +03:00
Benoit Marty
cc01f25d8f Revert status to RoomMembersLoadStatusType.NONE) in case of failure 2020-12-28 14:52:49 +01:00
Benoit Marty
9f3176c49c Fix code quality 2020-12-28 14:41:23 +01:00
Benoit Marty
7ae2b34a9e Merge pull request #2568 from vector-im/feature/bma/sso_sdk
Let the SDK compute the URLs
2020-12-28 14:20:21 +01:00
Benoit Marty
d1bec21759 Fix crash after migration to view bindings
Also rename some layouts to follow convention
2020-12-28 12:23:06 +01:00
Benoit Marty
073e6227d6 Correct Copyright mention 2020-12-28 10:59:50 +01:00
Ngô Ngọc Đức Huy
761d8d89b0 Translated using Weblate (Vietnamese)
Currently translated at 10.8% (218 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/vi/
2020-12-27 22:35:44 +00:00
Marcelo Filho
f203fa5c58 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (220 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/pt_BR/
2020-12-27 22:35:39 +00:00
Marcelo Filho
9ccb22015a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2020-12-27 22:35:39 +00:00
Ngô Ngọc Đức Huy
6d1c53c7ed Translated using Weblate (Vietnamese)
Currently translated at 7.2% (147 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/vi/
2020-12-26 11:35:47 +00:00
Ngô Ngọc Đức Huy
855e7e02ce Translated using Weblate (Vietnamese)
Currently translated at 60.0% (3 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/vi/
2020-12-26 11:35:38 +00:00
Thomas Jensen
df3bb5b212 Translated using Weblate (Norwegian Bokmål)
Currently translated at 53.2% (1075 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/nb_NO/
2020-12-26 11:35:38 +00:00
Ngô Ngọc Đức Huy
5768e45809 Added translation using Weblate (Vietnamese) 2020-12-25 10:31:01 +00:00
Ngô Ngọc Đức Huy
83584fab44 Added translation using Weblate (Vietnamese) 2020-12-25 10:30:07 +00:00
Thomas Jensen
c234e12302 Translated using Weblate (Norwegian Bokmål)
Currently translated at 3.6% (8 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/nb/
2020-12-24 19:35:58 +00:00
Thomas Jensen
4645a8c633 Translated using Weblate (Norwegian Bokmål)
Currently translated at 80.0% (4 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/nb_NO/
2020-12-24 19:35:58 +00:00
LinAGKar
cfb54f7608 Translated using Weblate (Swedish)
Currently translated at 100.0% (5 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/sv/
2020-12-24 19:35:58 +00:00
Peter Vágner
7195ee9a69 Translated using Weblate (Slovak)
Currently translated at 80.0% (176 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/sk/
2020-12-24 19:35:58 +00:00
LinAGKar
ba6dffc0bf Translated using Weblate (Swedish)
Currently translated at 95.8% (1934 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sv/
2020-12-24 19:35:58 +00:00
eman luff
d3acf7e862 Translated using Weblate (Polish)
Currently translated at 98.5% (1988 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/
2020-12-24 19:35:57 +00:00
Thomas Jensen
5c6d710f2d Translated using Weblate (Norwegian Bokmål)
Currently translated at 52.5% (1061 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/nb_NO/
2020-12-24 19:35:50 +00:00
Thomas Jensen
fa22a4a747 Added translation using Weblate (Norwegian Bokmål) 2020-12-23 14:04:57 +00:00
reg4xp
94aa0a02fe Translated using Weblate (Persian)
Currently translated at 100.0% (5 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/fa/
2020-12-22 10:36:04 +00:00
Rachida S
ab23d9b715 Translated using Weblate (Kabyle)
Currently translated at 96.8% (1955 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/kab/
2020-12-22 10:36:04 +00:00
Ihor Hordiichuk
c5ce208d07 Translated using Weblate (Ukrainian)
Currently translated at 35.0% (77 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/uk/
2020-12-22 10:35:59 +00:00
aka. nils on element-translations
e7f7c0ba78 Translated using Weblate (Norwegian Nynorsk)
Currently translated at 28.1% (62 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/nn/
2020-12-22 10:35:59 +00:00
Ihor Hordiichuk
b082a009a7 Translated using Weblate (Ukrainian)
Currently translated at 48.4% (977 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2020-12-22 10:35:59 +00:00
eman luff
cdeb2663fe Translated using Weblate (Polish)
Currently translated at 92.6% (1869 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/
2020-12-22 10:35:57 +00:00
aka. nils on element-translations
a5e979b763 Translated using Weblate (Norwegian Nynorsk)
Currently translated at 43.3% (874 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/nn/
2020-12-22 10:35:39 +00:00
reg4xp
be0cadb3c7 Translated using Weblate (Persian)
Currently translated at 99.7% (2013 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/
2020-12-22 10:35:37 +00:00
Benoit Marty
6c4836e27e Move file to internal 2020-12-21 12:18:32 +01:00
Benoit Marty
36a553a886 Let the Matrix SDK compute the Fallback urls 2020-12-21 12:08:49 +01:00
Benoit Marty
13938f2ab3 Let the Matrix SDK compute the SSO url 2020-12-21 11:26:57 +01:00
Onuray Sahin
a755536a2f Merge branch 'develop' into feature/ons/wait_members_before_sending_event 2020-12-21 12:41:24 +03:00
Benoit Marty
4a5dbde8d3 Merge pull request #2558 from aqulu/fix/bottomsheet-viewbinding
Release VectorBaseBottomSheetDialogFragment bindings when view destroyed
2020-12-20 20:44:37 +01:00
Benoit Marty
5744939c05 Merge pull request #2561 from SpiritCroc/url_preview_visibility
Properly hide preview URLs for messages that don't support previews
2020-12-20 20:40:19 +01:00
reg4xp
8c68126ed9 Translated using Weblate (Persian)
Currently translated at 100.0% (5 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/fa/
2020-12-20 19:35:43 +00:00
notramo
3c37d4c1b0 Translated using Weblate (Hungarian)
Currently translated at 100.0% (5 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/hu/
2020-12-20 19:35:42 +00:00
The one with the braid
a9316b2f7e Translated using Weblate (German)
Currently translated at 100.0% (5 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/de/
2020-12-20 19:35:42 +00:00
Rachida S
3e420033c5 Translated using Weblate (Kabyle)
Currently translated at 91.6% (1849 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/kab/
2020-12-20 19:35:42 +00:00
Priit Jõerüüt
571f05bcfb Translated using Weblate (Estonian)
Currently translated at 100.0% (220 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/et/
2020-12-20 19:35:41 +00:00
strix aluco
4e73705378 Translated using Weblate (Ukrainian)
Currently translated at 47.7% (963 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2020-12-20 19:35:41 +00:00
Nikita Epifanov
611e1185c8 Translated using Weblate (Russian)
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ru/
2020-12-20 19:35:41 +00:00
Nils Haugen
b90d8e6238 Translated using Weblate (Norwegian Nynorsk)
Currently translated at 40.8% (824 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/nn/
2020-12-20 19:35:41 +00:00
notramo
ad3573226c Translated using Weblate (Hungarian)
Currently translated at 92.3% (1864 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/hu/
2020-12-20 19:35:40 +00:00
reg4xp
1cc0825b54 Translated using Weblate (Persian)
Currently translated at 99.2% (2002 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/
2020-12-20 19:35:38 +00:00
Priit Jõerüüt
87ac4ec5d4 Translated using Weblate (Estonian)
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/et/
2020-12-20 19:35:37 +00:00
The one with the braid
8344506b05 Translated using Weblate (German)
Currently translated at 97.0% (1958 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2020-12-20 19:35:36 +00:00
Benoit Marty
9da3eec64f Fix small formatting issue 2020-12-20 20:28:40 +01:00
Benoit Marty
621c6c8773 Merge pull request #2562 from SpiritCroc/notice_preview
Enable URL-previews for notices
2020-12-20 20:26:18 +01:00
SpiritCroc
d5e76c515e Enable URL-previews for notices
Desktop has those too.
2020-12-20 09:10:37 +01:00
SpiritCroc
9fcf7263b5 Properly hide preview URLs for messages that don't support previews
Notices and formatted messages don't have imageContentRenderer and
previewUrlRetriever set.
Accordingly, when recycling messages that previously had an URL preview,
we do not want to keep that preview, but actually hide it, instead of
returning early (without rendering any update).
2020-12-20 09:05:15 +01:00
aqulu
0059fdf174 Release VectorBaseBottomSheetDialogFragment bindings when view destroyed
Signed-off-by: aqulu <dev@aqu.lu>
2020-12-20 13:55:32 +09:00
Benoit Marty
3d291c04c9 const -> companion 2020-12-18 16:53:26 +01:00
Benoit Marty
ca4b91a98f Use the new RoomMembersLoadStatusType.LOADING value 2020-12-18 16:52:39 +01:00
Benoit Marty
b0ba62aa31 Use const 2020-12-18 16:12:01 +01:00
Benoit Marty
abf763f454 Convert to internal Kotlin class 2020-12-18 16:10:36 +01:00
Benoit Marty
15597eb041 Rename .java to .kt 2020-12-18 16:10:36 +01:00
Benoit Marty
00b16db7cc Simplification of code 2020-12-18 16:06:30 +01:00
Benoit Marty
ff8a208012 Change to immutable list 2020-12-18 16:04:46 +01:00
Benoit Marty
7732bd47ce Update Changelog after release 2020-12-18 16:01:39 +01:00
Onuray Sahin
42a5680374 Fix copyright. 2020-12-18 16:00:32 +01:00
Onuray Sahin
5d8f365520 Load room members seamlessly when timeline is starting. 2020-12-18 16:00:32 +01:00
Onuray Sahin
938cd32ddd Do not load room members if there is an ongoing request. 2020-12-18 16:00:32 +01:00
Onuray Sahin
80396fcd39 Changelog added. 2020-12-18 16:00:32 +01:00
Onuray Sahin
7b97981bb5 Make sure to load all members in the room before sending the event. 2020-12-18 16:00:32 +01:00
Onuray Sahin
b263273c87 Improve test with detailed CryptoError message. 2020-12-18 16:00:32 +01:00
Onuray Sahin
427dc784fe Support testing a room with many members. 2020-12-18 16:00:32 +01:00
Onuray Sahin
7e4725c091 Update CryptoTestData to handle more than 3 sessions. 2020-12-18 16:00:32 +01:00
Onuray Sahin
9b332f7a32 Test message decryption in a room with 3 members. 2020-12-18 16:00:32 +01:00
Benoit Marty
2b780a8b76 Merge pull request #2542 from vector-im/feature/bma/view_bindings
View bindings
2020-12-18 15:57:34 +01:00
Benoit Marty
0518e5f18d Version++ 2020-12-18 11:03:01 +01:00
Benoit Marty
0412b87ad1 Merge branch 'release/1.0.13' 2020-12-18 10:59:54 +01:00
Benoit Marty
2fe7caa580 Merge branch 'release/1.0.13' into develop 2020-12-18 10:59:53 +01:00
Benoit Marty
d53650c8ae Prepare release 1.0.13 2020-12-18 10:59:43 +01:00
Benoit Marty
930b8da3b3 Typo in comment 2020-12-18 09:53:59 +01:00
Benoit Marty
c48f153b0d Merge pull request #2550 from vector-im/feature/bma/unstable_prefix
MSC2858 unstable prefix
2020-12-17 19:09:12 +01:00
Benoit Marty
68cd06f1fb Improve redirect url, which can be visible to the user: "element://element" -> "element://connect" 2020-12-17 12:11:30 +01:00
Benoit Marty
c7afcf4ff2 Fix compilation issue 2020-12-17 12:10:55 +01:00
Travis Ralston
3491774e7b Add changelog 2020-12-17 12:09:53 +01:00
Travis Ralston
ea6fde3ed0 Make MSC2858 implementation match the unstable policy of the spec
See https://github.com/matrix-org/matrix-doc/pull/2858/files#r543567196
2020-12-17 12:09:34 +01:00
Benoit Marty
267a7a36ff Translated using Weblate (Slovenian)
Currently translated at 0.3% (7 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sl/
2020-12-17 06:35:49 +00:00
Jeff Huang
9a69bb9656 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (5 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hant/
2020-12-17 06:35:49 +00:00
random
28aef1067b Translated using Weblate (Italian)
Currently translated at 100.0% (5 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/it/
2020-12-17 06:35:49 +00:00
Ihor Hordiichuk
690a9eaa21 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (5 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/uk/
2020-12-17 06:35:48 +00:00
Marcelo Filho
24d76b1d32 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (5 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/pt_BR/
2020-12-17 06:35:48 +00:00
Tuomas Hietala
173458ed6c Translated using Weblate (Finnish)
Currently translated at 100.0% (5 of 5 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/fi/
2020-12-17 06:35:48 +00:00
Jeff Huang
cebef970d3 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (220 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/zh_Hant/
2020-12-17 06:35:48 +00:00
Besnik Bleta
4aa349ddd6 Translated using Weblate (Albanian)
Currently translated at 98.1% (216 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/sq/
2020-12-17 06:35:48 +00:00
Nikita Epifanov
a918d28ded Translated using Weblate (Russian)
Currently translated at 100.0% (220 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/ru/
2020-12-17 06:35:48 +00:00
Marcelo Filho
b1660c077e Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.1% (216 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/pt_BR/
2020-12-17 06:35:47 +00:00
Oskars G
38075b4e8d Translated using Weblate (Latvian)
Currently translated at 35.0% (77 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/lv/
2020-12-17 06:35:47 +00:00
random
174ecb10d9 Translated using Weblate (Italian)
Currently translated at 100.0% (220 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/it/
2020-12-17 06:35:47 +00:00
Priit Jõerüüt
5ef1fd62a7 Translated using Weblate (Estonian)
Currently translated at 100.0% (220 of 220 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/et/
2020-12-17 06:35:46 +00:00
Jeff Huang
d095784bfc Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hant/
2020-12-17 06:35:46 +00:00
Ihor Hordiichuk
1ac1d32b3a Translated using Weblate (Ukrainian)
Currently translated at 47.7% (963 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2020-12-17 06:35:44 +00:00
Besnik Bleta
518b207f63 Translated using Weblate (Albanian)
Currently translated at 99.6% (2010 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sq/
2020-12-17 06:35:44 +00:00
Nikita Epifanov
16ba5d2416 Translated using Weblate (Russian)
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ru/
2020-12-17 06:35:42 +00:00
Marcelo Filho
ac6e7652bd Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.1% (2000 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2020-12-17 06:35:40 +00:00
random
cc3e090855 Translated using Weblate (Italian)
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/it/
2020-12-17 06:35:39 +00:00
Priit Jõerüüt
30e4fdebd7 Translated using Weblate (Estonian)
Currently translated at 100.0% (2018 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/et/
2020-12-17 06:35:37 +00:00
Benoit Marty
27e5626fcf Test has been passed! 2020-12-16 16:07:18 +01:00
Benoit Marty
8878cb41ee Fix issue with not clickable item 2020-12-16 16:04:57 +01:00
Benoit Marty
10575698de Avoid blink effect 2020-12-16 15:51:30 +01:00
Benoit Marty
451750f08a Improve code (items still not clickable) 2020-12-16 15:48:39 +01:00
Benoit Marty
6f04f4109d It seems we need to use findViewById sometimes 2020-12-16 14:35:30 +01:00
Benoit Marty
929d711149 Split long lines and cleanup 2020-12-16 14:33:44 +01:00
Benoit Marty
b52f8b1dbf Fix crash 2020-12-16 14:31:14 +01:00
Benoit Marty
aa0a851b35 Restore waiting view management 2020-12-16 13:32:49 +01:00
Benoit Marty
4ddc8e706d Fix issue with coordinator Layout 2020-12-16 13:23:42 +01:00
Benoit Marty
da2a0abf45 Provide CoordinatorLayout when available 2020-12-16 12:39:22 +01:00
Benoit Marty
53a0e0ce10 Remove useless @Inject 2020-12-16 12:22:28 +01:00
Benoit Marty
7f02c0596e Fix strange crash 2020-12-16 12:21:25 +01:00
Benoit Marty
e081c3b249 Add TODO 2020-12-16 12:09:23 +01:00
Benoit Marty
8db4da5473 Fix crash 2020-12-16 11:45:06 +01:00
Benoit Marty
d389581d96 Better binding 2020-12-16 11:18:25 +01:00
Benoit Marty
018574a21e Rename some view ids 2020-12-16 11:10:49 +01:00
Benoit Marty
9e3eb993ee Fix some crashes 2020-12-16 10:36:33 +01:00
Benoit Marty
6c64fb2169 Fix some crashes 2020-12-16 10:16:33 +01:00
Benoit Marty
2e70808bbd Fix some crashes 2020-12-16 04:16:34 +01:00
Benoit Marty
18bf9856fe Migrate to ViewBindings (#1072) - WIP 2020-12-16 03:57:19 +01:00
Benoit Marty
f09ee5016a Migrate to ViewBindings (#1072) - WIP 2020-12-16 03:41:02 +01:00
Benoit Marty
4d3c4b5afc Migrate to ViewBindings (#1072) - WIP 2020-12-16 03:38:07 +01:00
Benoit Marty
7de2494af2 Migrate to ViewBindings (#1072) - WIP 2020-12-16 03:25:17 +01:00
Benoit Marty
409d7e50bb Migrate to ViewBindings (#1072) - WIP 2020-12-16 02:59:03 +01:00
Benoit Marty
c1222737d6 Migrate to ViewBindings (#1072) - WIP 2020-12-16 02:49:22 +01:00
Benoit Marty
d02da1b97e Migrate to ViewBindings (#1072) - WIP 2020-12-16 02:39:58 +01:00
Benoit Marty
a8c6b1cdf7 Migrate to ViewBindings (#1072) - WIP 2020-12-16 02:33:52 +01:00
Benoit Marty
dba65dcd22 Migrate to ViewBindings (#1072) - WIP 2020-12-16 02:05:38 +01:00
Benoit Marty
706736273c Migrate to ViewBindings (#1072) - WIP 2020-12-16 00:46:52 +01:00
Benoit Marty
838340bbc8 Remove dependency to Butterknife 2020-12-15 20:33:55 +01:00
Benoit Marty
75ec9ba3d9 Reduce dependency on Butterknife: remove usage of @BindView 2020-12-15 20:32:26 +01:00
Benoit Marty
876359539f Reduce dependency on Butterknife: remove usage of @OnClick and @OnTextChange 2020-12-15 18:52:36 +01:00
Benoit Marty
6cdb192955 Version++ 2020-12-15 14:18:35 +01:00
Benoit Marty
1946058c8e Merge branch 'release/1.0.12' 2020-12-15 14:16:17 +01:00
Benoit Marty
2927f1ff1c Merge branch 'release/1.0.12' into develop 2020-12-15 14:16:15 +01:00
Benoit Marty
e230cd8ee3 Prepare release 1.0.12 2020-12-15 14:16:08 +01:00
Benoit Marty
45225e883e Merge pull request #2539 from vector-im/feature/bma/cleanup
Small cleanup before the release
2020-12-15 14:11:31 +01:00
Benoit Marty
bb9a08d429 /confetti /snow commands: send emote if text is blank (iso Element Web) 2020-12-15 12:19:31 +01:00
Benoit Marty
6ddcd046d4 Import SAS strings 2020-12-15 12:19:31 +01:00
Benoit Marty
88a4dfd094 Ensure the message is understood as a debug indication (#2509) 2020-12-15 12:19:31 +01:00
Benoit Marty
7828e3f501 Merge pull request #2485 from vector-im/feature/ons/fix_hide_state_events
Fix UTD when hiding member state events.
2020-12-15 12:16:27 +01:00
Benoit Marty
b4b302c1f2 Merge pull request #2535 from vector-im/feature/bca/confetti
Chat Effects XMAS PR ❄️ 🎉
2020-12-15 11:41:29 +01:00
Benoit Marty
487ef870f9 Add /snow command 2020-12-15 10:56:05 +01:00
Benoit Marty
6957768567 PR Review 2020-12-15 10:21:12 +01:00
Valere
7da8b13cde Chat Effects 2020-12-15 09:39:16 +01:00
Benoit Marty
a027ef29e5 Merge pull request #2484 from vector-im/feature/bca/social_login
Social Login
2020-12-14 18:19:23 +01:00
Benoit Marty
211c158e23 Remove bad translation 2020-12-14 17:42:52 +01:00
Benoit Marty
338650cea7 Merge pull request #2537 from RiotTranslateBot/weblate-element-android-element-app
Translations update from Weblate
2020-12-14 17:37:51 +01:00
Benoit Marty
2d4eeb64c5 Translated using Weblate (French)
Currently translated at 98.2% (1982 of 2018 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/
2020-12-14 16:37:12 +00:00
Benoit Marty
4f98031c6d Merge pull request #2536 from RiotTranslateBot/weblate-element-android-element-app
Translations update from Weblate
2020-12-14 17:27:10 +01:00
Weblate
3813f6d659 Merge branch 'origin/develop' into Weblate. 2020-12-14 15:45:20 +00:00
Besnik Bleta
6687a74f5c Translated using Weblate (Albanian)
Currently translated at 98.0% (206 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/sq/
2020-12-14 15:35:36 +00:00
Ihor Hordiichuk
545e13c843 Translated using Weblate (Ukrainian)
Currently translated at 48.0% (955 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2020-12-14 15:35:35 +00:00
Besnik Bleta
995ec25990 Translated using Weblate (Albanian)
Currently translated at 99.4% (1975 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sq/
2020-12-14 15:35:35 +00:00
Benoit Marty
09040b7095 Clear history (#1933) 2020-12-14 16:22:22 +01:00
Benoit Marty
5a69b33600 Move style for social login to a dedicated file 2020-12-14 15:53:16 +01:00
Benoit Marty
c8c4e10822 Cleanup layout 2020-12-14 15:46:31 +01:00
Benoit Marty
2f616cb6c5 Add some constants 2020-12-14 15:41:33 +01:00
Benoit Marty
776d7699bc Do not modify the DB in debug mode, and add to history only if valid 2020-12-14 15:33:32 +01:00
Benoit Marty
f3578e2538 Cleanup 2020-12-14 15:17:07 +01:00
Benoit Marty
8022430f0d Remove useless override 2020-12-14 15:14:46 +01:00
Benoit Marty
eb72d0c6d3 Revert formatting change 2020-12-14 15:13:08 +01:00
Benoit Marty
ae29cbdc34 Better name 2020-12-14 15:11:02 +01:00
Benoit Marty
cf59c7db95 Cleanup 2020-12-14 15:09:10 +01:00
Benoit Marty
924fac84b2 Move HomeServerHistoryService binding to AuthModule 2020-12-14 15:08:09 +01:00
Benoit Marty
db0a958708 Fix crash in Realm migration 2020-12-14 14:53:29 +01:00
Benoit Marty
b31dfcfe4f IdentityProvider -> SsoIdentityProvider 2020-12-14 14:32:20 +01:00
Benoit Marty
bba2daf0fc Capital H for GitHub 2020-12-14 14:13:50 +01:00
Benoit Marty
23e05200b5 Social login: cleanup 2020-12-14 14:13:36 +01:00
Valere
0fd8641cf6 Fix copyright + lint 2020-12-14 14:05:57 +01:00
Valere
26c01d46a7 Code review + Completion layout res 2020-12-14 14:05:57 +01:00
Valere
42d1bf57f6 Refactor + fix sso in LoginFragment 2020-12-14 14:05:57 +01:00
Valere
351793d456 Fix / support sso_with_password flow when no providers 2020-12-14 14:05:57 +01:00
Valere
03428ea9f5 Social Login
And new custom homeserver completion (and remember history)
2020-12-14 14:05:57 +01:00
Onuray Sahin
b321838502 Merge branch 'develop' into feature/ons/fix_hide_state_events 2020-12-14 12:03:49 +03:00
Ihor Hordiichuk
b915c91c86 Translated using Weblate (Ukrainian)
Currently translated at 28.0% (59 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/uk/
2020-12-13 14:35:36 +00:00
strix aluco
f83b478008 Translated using Weblate (Ukrainian)
Currently translated at 48.0% (955 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2020-12-13 14:35:36 +00:00
Ihor Hordiichuk
2bdb425085 Translated using Weblate (Ukrainian)
Currently translated at 48.0% (955 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2020-12-13 14:35:36 +00:00
Nikita Epifanov
45a0586329 Translated using Weblate (Russian)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ru/
2020-12-13 14:35:33 +00:00
Ihor Hordiichuk
74283e7d50 Translated using Weblate (Ukrainian)
Currently translated at 45.7% (908 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2020-12-13 00:55:11 +00:00
AlexanderLevchenkoTechs
6f4c307854 Translated using Weblate (Ukrainian)
Currently translated at 45.2% (898 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2020-12-13 00:34:33 +00:00
Ihor Hordiichuk
69cd0e3ea2 Translated using Weblate (Ukrainian)
Currently translated at 45.2% (898 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2020-12-13 00:34:31 +00:00
AlexanderLevchenkoTechs
a5094f97d5 Translated using Weblate (Ukrainian)
Currently translated at 43.1% (857 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2020-12-11 22:07:47 +00:00
Benoit Marty
163c05d5cf Merge pull request #2526 from vector-im/feature/bca/fix_mxto
element:// support + basic peeking + fix join via server
2020-12-11 21:44:06 +01:00
Benoit Marty
903936368d Merge branch 'develop' into feature/bca/fix_mxto 2020-12-11 21:43:56 +01:00
Benoit Marty
3eba43f3fa Merge pull request #2500 from aqulu/feature/state_service_coroutines
Convert StateService to suspend functions
2020-12-11 18:04:25 +01:00
Valere
d8a1939c69 Fix number of enum 2020-12-11 17:50:59 +01:00
Benoit Marty
5b74eb3bca Merge branch 'develop' into feature/state_service_coroutines 2020-12-11 16:54:41 +01:00
Benoit Marty
071611b81c We are not supposed to fallback on alternative alias 2020-12-11 16:38:22 +01:00
Benoit Marty
5461fd4060 Some cleanup up 2020-12-11 16:35:04 +01:00
Benoit Marty
5203d15409 Merge pull request #2490 from vector-im/feature/bma/url_preview
Url preview
2020-12-11 15:39:58 +01:00
Benoit Marty
989f1c6268 Merge branch 'develop' into feature/bma/url_preview 2020-12-11 15:39:20 +01:00
Valere
544345bbf3 Update change log 2020-12-11 15:16:10 +01:00
Valere
bd9da8eaa6 element:// support + basic peeking + fix join via server 2020-12-11 15:06:39 +01:00
Benoit Marty
68a5ba9a01 Merge pull request #2524 from vector-im/feature/bma/fix_rtl
Fix rtl
2020-12-11 14:06:33 +01:00
Benoit Marty
ed9ae07e52 Merge pull request #2475 from vector-im/feature/bma/gif_from_keyboard_preview
Feature/bma/gif from keyboard preview
2020-12-11 14:05:13 +01:00
Benoit Marty
9b0c2e420d Reorder Views (no other change) 2020-12-11 13:18:22 +01:00
Onuray Sahin
60aaa2a39c Code review fixes. 2020-12-11 15:08:32 +03:00
Benoit Marty
8d30658fa5 Bigger touch area for the other buttons 2020-12-11 12:46:44 +01:00
Benoit Marty
32fd3be732 Better alignment of button and animation, bigger touch area for send button 2020-12-11 12:41:35 +01:00
Benoit Marty
705b6176f1 Fix Layout issue (visible only on RTL) (#2523) 2020-12-11 12:17:23 +01:00
Benoit Marty
d996c77c03 Fix typo 2020-12-11 12:09:08 +01:00
Benoit Marty
49cad8feec Rename files. 2020-12-11 11:49:46 +01:00
Benoit Marty
ca75eae0aa Create MimeTypes object 2020-12-11 11:24:42 +01:00
Benoit Marty
21271b6510 Do not compress GIFs (#1616, #1254) 2020-12-11 11:22:36 +01:00
Benoit Marty
439029467a Attachment preview also for Gif files 2020-12-11 11:22:36 +01:00
Benoit Marty
eb30b9fae9 Show preview when sending attachment from the keyboard (#2440)
It's actually a revert of a3b205b310
2020-12-11 11:22:36 +01:00
Benoit Marty
38843f74ab No need for WRITE_EXTERNAL permission to send attachment to the app (anymore?) 2020-12-11 11:21:49 +01:00
Benoit Marty
91c86c1a45 Merge branch 'develop' into feature/bma/url_preview 2020-12-11 09:47:57 +01:00
Benoit Marty
5541c2e190 Merge pull request #2512 from vector-im/feature/bma/fix_span
Improve management of files
2020-12-11 09:46:44 +01:00
Benoit Marty
f2ba236130 Merge branch 'develop' into feature/bma/fix_span 2020-12-11 09:46:36 +01:00
Jadran Prodan
4cb7754b77 Translated using Weblate (Slovenian)
Currently translated at 0.3% (7 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sl/
2020-12-11 07:35:34 +00:00
Nikita Epifanov
3473a7ef5e Translated using Weblate (Russian)
Currently translated at 100.0% (210 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/ru/
2020-12-11 07:35:33 +00:00
Nikita Epifanov
c9535509e8 Translated using Weblate (Russian)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ru/
2020-12-11 07:35:33 +00:00
Hivaa
3d578c147c Translated using Weblate (Persian)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/
2020-12-11 07:35:33 +00:00
Benoit Marty
43ac66feb3 Merge pull request #2514 from vector-im/feature/ons/emoji_keyboard
Emoji Keyboard
2020-12-10 17:13:43 +01:00
Benoit Marty
5e2f091ec1 Remove useless parameter id 2020-12-10 13:36:00 +01:00
Onuray Sahin
752bde413d Fix copyright. 2020-12-10 13:47:23 +03:00
Jadran Prodan
e6949c85fb Added translation using Weblate (Slovenian) 2020-12-10 10:28:31 +00:00
Onuray Sahin
c1cb23d728 Fix ripple effect of the send button. 2020-12-10 13:12:19 +03:00
Onuray Sahin
4007982db6 Changelog added. 2020-12-10 12:59:09 +03:00
Onuray Sahin
a9f5ed3869 Add emoji license. 2020-12-10 12:56:09 +03:00
Onuray Sahin
08964d8548 Fix emoji keyboard orientation bug. 2020-12-10 12:51:15 +03:00
Mitja Sorsa
5186ee6e43 Translated using Weblate (Finnish)
Currently translated at 100.0% (4 of 4 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/fi/
2020-12-09 16:15:50 +00:00
Mitja Sorsa
c2fc9fe0ee Translated using Weblate (Finnish)
Currently translated at 73.8% (155 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/fi/
2020-12-09 16:15:49 +00:00
Uumas
280d3f22a7 Translated using Weblate (Finnish)
Currently translated at 80.2% (1593 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fi/
2020-12-09 16:15:48 +00:00
Mitja Sorsa
a19ca8a820 Translated using Weblate (Finnish)
Currently translated at 80.2% (1593 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fi/
2020-12-09 16:15:48 +00:00
@a2sc:matrix.org
7ba1116349 Translated using Weblate (German)
Currently translated at 98.1% (1949 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2020-12-09 16:15:47 +00:00
Onuray Sahin
e8862b3aaa Add emoji keyboard, remove profile picture from composer. 2020-12-09 18:48:14 +03:00
Onuray Sahin
a96cc19eb6 Update composer layout by adding emoji icon. 2020-12-09 18:47:34 +03:00
Onuray Sahin
3d975b7fba Update composer icons. 2020-12-09 18:46:33 +03:00
Onuray Sahin
d54571d0a6 Emoji library added with Google style. 2020-12-09 18:45:33 +03:00
Benoit Marty
75071cf1d9 Cleanup 2020-12-09 13:50:14 +01:00
Benoit Marty
4bd538e448 Changelog and update comment 2020-12-09 12:49:25 +01:00
Benoit Marty
0956baecf9 Delete unencrypted files each time the app is started 2020-12-09 12:27:37 +01:00
Benoit Marty
e4968c4119 Doc and internal 2020-12-09 12:27:03 +01:00
Benoit Marty
283e10dfef Use filename if available 2020-12-09 12:26:49 +01:00
Benoit Marty
1c43f92e49 DefaultFileService: store just sent file 2020-12-09 12:26:27 +01:00
Benoit Marty
ca7796114c DefaultFileService: better management of the files and the filenames 2020-12-09 10:50:21 +01:00
aqulu
ed822becc6 Fix try-catch behavior of sendStateEvent actions
Signed-off-by: aqulu <dev@aqu.lu>
2020-12-09 08:39:00 +09:00
Benoit Marty
7057b2970b Improve FileService API: add facility methods to deal with MessageWithAttachment object 2020-12-08 19:31:29 +01:00
Benoit Marty
62791e4b36 Encrypted files: store decrypted file in a dedicated folder 2020-12-08 18:35:17 +01:00
Benoit Marty
237cb63fc2 Small formatting 2020-12-08 18:04:42 +01:00
Benoit Marty
42ab7f1b4f Add space between image and text
And remove useless `apply` block
2020-12-08 17:42:42 +01:00
Benoit Marty
8e11ba21ed Glide: No Disk cache for encrypted images 2020-12-08 17:37:24 +01:00
Benoit Marty
24a9ddaa5e FileService: remove useless FileService.DownloadMode 2020-12-08 17:25:37 +01:00
random
6190fb3511 Translated using Weblate (Italian)
Currently translated at 100.0% (210 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/it/
2020-12-08 15:50:10 +00:00
Kaede
2d9043fbed Translated using Weblate (Japanese)
Currently translated at 50.1% (996 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ja/
2020-12-08 15:50:10 +00:00
random
682dff9c1c Translated using Weblate (Italian)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/it/
2020-12-08 15:50:09 +00:00
Jeanne Lavoie
9339b7e31d Translated using Weblate (French)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/
2020-12-08 15:50:09 +00:00
OLIVIER Thomas
7667ef686d Translated using Weblate (French)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/
2020-12-08 15:50:07 +00:00
Uumas
4d4fe687ac Translated using Weblate (Finnish)
Currently translated at 79.9% (1587 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fi/
2020-12-08 15:50:07 +00:00
Benoit Marty
7152dead1d Rename method 2020-12-08 16:47:29 +01:00
aqulu
40b9f03132 Remove explicit coroutine context changes
Signed-off-by: aqulu <dev@aqu.lu>
2020-12-08 22:25:28 +09:00
aqulu
19d421df84 Remove coroutine context change for sendStateEvent
Signed-off-by: aqulu <dev@aqu.lu>
2020-12-08 22:25:28 +09:00
aqulu
c889deaab1 Remove unused imports
Signed-off-by: aqulu <dev@aqu.lu>
2020-12-08 22:25:28 +09:00
aqulu
416f57b1d7 Fix failing test compilation
Signed-off-by: aqulu <dev@aqu.lu>
2020-12-08 22:25:19 +09:00
Benoit Marty
dda2685bd8 Upgrade Realm dependency to 10.1.2 2020-12-08 13:45:30 +01:00
Benoit Marty
b43f3b3b6a Log some details about the request which has failed 2020-12-08 13:44:42 +01:00
Benoit Marty
a0c8a8e97c Log HTTP requests and responses in production (level BASIC, i.e. without any private data) 2020-12-08 13:44:42 +01:00
Benoit Marty
28bfea6af0 This code is for debug build (see the path), so no need to check again 2020-12-08 13:44:42 +01:00
Benoit Marty
f3bc39a0c5 Cleanup 2020-12-08 13:44:42 +01:00
aqulu
c7efd1feb9 Convert StateService to suspend functions
Signed-off-by: aqulu <dev@aqu.lu>
2020-12-08 19:21:10 +09:00
Benoit Marty
c31d368d0d Merge pull request #2468 from vector-im/feature/bma/fix_cancel
Fix cancellation of event sending not always working
2020-12-07 12:41:48 +01:00
Benoit Marty
5237eb0638 Merge branch 'develop' into feature/bma/fix_cancel 2020-12-07 12:41:37 +01:00
Benoit Marty
7869d731d4 Fix the rotate screen issue 2020-12-07 10:38:34 +01:00
Benoit Marty
c603ec0b38 Format files 2020-12-07 09:55:11 +01:00
random
555bf1f0ae Translated using Weblate (Italian)
Currently translated at 100.0% (4 of 4 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/it/
2020-12-06 14:50:09 +00:00
zeritti
8bdf384563 Translated using Weblate (Czech)
Currently translated at 100.0% (210 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/cs/
2020-12-06 14:50:08 +00:00
random
19524eaa82 Translated using Weblate (Italian)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/it/
2020-12-06 14:50:08 +00:00
Hivaa
9bbae825e2 Translated using Weblate (Persian)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/
2020-12-06 14:50:05 +00:00
@a2sc:matrix.org
3e9cb987a1 Translated using Weblate (German)
Currently translated at 90.4% (190 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/de/
2020-12-04 17:50:05 +00:00
Nikita Epifanov
dacb9cd86c Translated using Weblate (Russian)
Currently translated at 99.8% (1983 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ru/
2020-12-04 17:50:05 +00:00
Hivaa
b9d7333998 Translated using Weblate (Persian)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/
2020-12-04 17:50:04 +00:00
@a2sc:matrix.org
e14b507b27 Translated using Weblate (German)
Currently translated at 97.3% (1933 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2020-12-04 17:50:04 +00:00
Benoit Marty
431ac5aa2d Fix layout issue 2020-12-04 15:23:59 +01:00
Benoit Marty
78fe7e5c16 No need to create a Set to remove an item from it 2020-12-04 14:56:26 +01:00
Benoit Marty
c2c9e37a36 PreviewUrl: fix layout issue and add more tests 2020-12-04 14:36:11 +01:00
Benoit Marty
5d3682cd44 More cleanup 2020-12-04 14:19:36 +01:00
Benoit Marty
2a19726e49 Cleanup and changelog 2020-12-04 14:19:24 +01:00
Benoit Marty
c08c652080 PreviewUrl: handle close (in memory) 2020-12-04 12:41:26 +01:00
Benoit Marty
9089c54990 Ripple effect 2020-12-04 11:53:37 +01:00
Benoit Marty
679d9bae1c Fix bad image rendering 2020-12-04 11:45:05 +01:00
Benoit Marty
19315fc65e PreviewUrl: handle click 2020-12-04 11:08:06 +01:00
Benoit Marty
770041eceb PreviewUrl: setting and e2e room 2020-12-04 09:48:48 +01:00
Benoit Marty
1161dcb299 PreviewUrl: protocol is mandatory (exclude rstp://) 2020-12-04 08:31:14 +01:00
Benoit Marty
fa7b0a24a7 PreviewUrl: Application part - bugfix 2020-12-04 08:01:00 +01:00
Benoit Marty
48354c7793 PreviewUrl: Application part - WIP 2020-12-04 07:46:09 +01:00
Benoit Marty
fcd9fe7d5a PreviewUrl: layout for a single PreviewUrl 2020-12-03 19:32:49 +01:00
Benoit Marty
a36d5684b8 Create extension for androidx.collection.LruCache 2020-12-03 19:09:33 +01:00
Benoit Marty
be20f9b455 PreviewUrl: extract url from Content 2020-12-03 19:09:33 +01:00
Benoit Marty
dd150c6d7e Remove unnecessary non-null assertion 2020-12-03 19:09:33 +01:00
Benoit Marty
bd5ac514ef PreviewUrl: create the task and the service 2020-12-03 19:09:33 +01:00
LinAGKar
bd926fa74b Translated using Weblate (Swedish)
Currently translated at 100.0% (4 of 4 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/sv/
2020-12-03 14:50:05 +00:00
Hivaa
167144b504 Translated using Weblate (Persian)
Currently translated at 91.9% (193 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/fa/
2020-12-03 14:50:05 +00:00
LinAGKar
5faaabf2f4 Translated using Weblate (Swedish)
Currently translated at 97.3% (1933 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sv/
2020-12-03 14:50:05 +00:00
Keij0
1933fc948c Translated using Weblate (Polish)
Currently translated at 76.8% (1526 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/
2020-12-03 14:50:04 +00:00
quidje
83df430d17 Translated using Weblate (Dutch)
Currently translated at 55.6% (1106 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/nl/
2020-12-03 14:50:04 +00:00
Hivaa
ec60d7d0b6 Translated using Weblate (Persian)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/
2020-12-03 14:50:04 +00:00
Benoit Marty
f9ccb0e8de Translated using Weblate (Spanish)
Currently translated at 97.2% (1932 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/es/
2020-12-03 14:50:04 +00:00
Benoit Marty
1109d9f88a PreviewUrl create DB object and handle migration 2020-12-03 14:45:20 +01:00
Onuray Sahin
32b7cc64fb Changelog added.
Fixes #2486
2020-12-03 16:19:37 +03:00
Onuray Sahin
a6724b5f75 EventTypeFilter implementation to allow hiding member events. 2020-12-03 16:10:50 +03:00
Benoit Marty
8a35bfcc31 Rework: rename files using the interface name and not the implementation name 2020-12-03 13:57:47 +01:00
Benoit Marty
0c037184f8 Create a MediaService to handle UrlPreview request - WIP 2020-12-03 13:46:25 +01:00
Benoit Marty
3e563a37a2 Rework: Make RawCacheStrategy class more generic, to use it for other SDK API 2020-12-03 13:43:04 +01:00
Hivaa
e5cbf9e3a3 Translated using Weblate (Persian)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/
2020-12-03 11:10:27 +00:00
Benoit Marty
cafe86e675 Rework: create a MediaModule 2020-12-03 09:56:26 +01:00
Benoit Marty
a911492a9e Merge pull request #2481 from vector-im/feature/bma/upgrade
Upgrade of some library + cleanup
2020-12-03 09:50:43 +01:00
Benoit Marty
d889598b20 Fix DefaultLocale lint issue 2020-12-02 17:04:54 +01:00
Benoit Marty
c4577f28b2 Remove unnecessary dependency (we have -ktx dependency) 2020-12-02 16:43:52 +01:00
Benoit Marty
f5af15454e Create a generic class for ViewModel 2020-12-02 15:47:21 +01:00
Benoit Marty
ee96d5c68f Remove useless Factories 2020-12-02 15:41:31 +01:00
Benoit Marty
6c56b5f45b Fix warnings after library upgrade 2020-12-02 14:39:33 +01:00
Benoit Marty
1058bfecf4 Kotlinification 2020-12-02 13:54:59 +01:00
Benoit Marty
f0afd5ceea Update deprecated code 2020-12-02 13:49:07 +01:00
Benoit Marty
9881c9f61c Fix compilation issue after library upgrade 2020-12-02 13:34:34 +01:00
Benoit Marty
89a7ec6d4b Use fragment-ktx and preference-ktx dependencies (fix lint issue KtxExtensionAvailable) 2020-12-02 12:46:15 +01:00
Benoit Marty
c426364618 Remove unused dependencies 2020-12-02 12:45:31 +01:00
Benoit Marty
cc5264a587 Try to clarify the code 2020-12-02 12:38:07 +01:00
Benoit Marty
42bc4d2445 Upgrade some dependencies and Kotlin version 2020-12-02 12:09:56 +01:00
Benoit Marty
2cc5d46cd3 Merge pull request #2474 from vector-im/feature/bma/remove_status_theme
Remove Status theme
2020-12-02 11:43:23 +01:00
Benoit Marty
3feb67ad32 Merge pull request #2470 from vector-im/feature/ons/fix_text_input_cursor
Move cursor to the end to fix the jumping cursor bug.
2020-12-02 11:23:53 +01:00
Benoit Marty
aa6c7afbbd Remove Status theme and handle migration or current status theme to light theme (#2424) 2020-12-01 16:20:11 +01:00
Benoit Marty
c6ba296028 Create an extension to apply the fix at several places 2020-12-01 14:50:13 +01:00
Benoit Marty
51b86e21f6 Merge pull request #2458 from vector-im/feature/bma/room_history_join_rule
Room setting: improve room history and add join rule
2020-12-01 14:18:52 +01:00
Jeff Huang
04914be442 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (4 of 4 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hant/
2020-12-01 12:50:16 +00:00
strix aluco
3133935063 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (4 of 4 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/uk/
2020-12-01 12:50:15 +00:00
Jeff Huang
088608011b Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (210 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/zh_Hant/
2020-12-01 12:50:15 +00:00
Nikita Epifanov
6d0f9baba4 Translated using Weblate (Russian)
Currently translated at 92.8% (195 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/ru/
2020-12-01 12:50:15 +00:00
Jeff Huang
3b21400bb8 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hant/
2020-12-01 12:50:15 +00:00
sr093906
1c3a279b8a Translated using Weblate (Chinese (Simplified))
Currently translated at 96.7% (1921 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/
2020-12-01 12:50:12 +00:00
HolgerHuo
6236b01189 Translated using Weblate (Chinese (Simplified))
Currently translated at 96.7% (1921 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/
2020-12-01 12:50:12 +00:00
Nikita Epifanov
e42906f08a Translated using Weblate (Russian)
Currently translated at 99.3% (1973 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ru/
2020-12-01 12:50:11 +00:00
Kaede
b53ba2b98e Translated using Weblate (Japanese)
Currently translated at 49.8% (991 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ja/
2020-12-01 12:50:09 +00:00
Danial Behzadi
7bd8d54d5c Translated using Weblate (Persian)
Currently translated at 99.4% (1976 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/
2020-12-01 12:50:07 +00:00
Benoit Marty
c785ea63e7 Update Change after release 2020-11-30 17:53:31 +01:00
Benoit Marty
b78f1dbb93 Hide the icon area if there is no icon to display 2020-11-30 17:52:16 +01:00
Benoit Marty
056b9df65e Add title to the new two bottom sheets 2020-11-30 17:52:16 +01:00
Benoit Marty
589c301606 Fix bad copyright 2020-11-30 17:52:16 +01:00
Benoit Marty
476f721f5e Cleanup 2020-11-30 17:52:16 +01:00
Benoit Marty
a813610c04 Room setting: update join rules and guest access (#2442) 2020-11-30 17:52:16 +01:00
Benoit Marty
41dd67f1c1 Renaming 2020-11-30 17:47:54 +01:00
Benoit Marty
63b068f426 Reorder iso Element Web 2020-11-30 17:46:14 +01:00
Benoit Marty
637c54073a Room history visibility: Use correct wording for the setting. 2020-11-30 17:46:14 +01:00
Benoit Marty
4171311095 Room history visibility: from ugly dialog to nice bottom sheet.
Including a reusable bottom sheet pattern, for future join rules setting bottom sheet
2020-11-30 17:46:14 +01:00
Benoit Marty
bb5d5ffc92 Improve room history visibility setting UX (#1579)
And observe correctly the state event
2020-11-30 17:43:28 +01:00
Benoit Marty
d07a95204b Better name 2020-11-30 17:41:55 +01:00
Onuray Sahin
2736247d09 Move cursor to the end to fix the jumping cursor bug.
Fixes #2469
2020-11-30 18:12:26 +03:00
Benoit Marty
93ffb116b7 Merge pull request #2439 from vector-im/feature/bma/alias
Add room alias management
2020-11-30 14:59:21 +01:00
Benoit Marty
396dd5e36e Merge pull request #2463 from vector-im/feature/ons/change_pin
Change PIN
2020-11-30 13:45:09 +01:00
Benoit Marty
096abd7ebf Fix IllegalStateException: focus search returned a view that wasn't able to take focus!
And no multiline input for room alias
2020-11-30 13:33:41 +01:00
Onuray Sahin
694397efc1 Create a new pin mode for changing pin code. 2020-11-30 13:51:40 +03:00
Onuray Sahin
ffe9a03d3e Merge branch 'develop' into feature/ons/change_pin
* develop:
  Format source
  Fix / double bottomsheet effect
  Version**
  Ensure the Activity is destroyed, it seems that the intent flags are not enough now. - finish all
  Ensure the Activity is destroyed, it seems that the intent flags are not enough now.
  Remove redundant returns
  Prepare version 1.0.11
  Fix issue when there is no display name
  Cleanup
  Fix issue with too big icons
  Use style instead of duplicating the whole layout file
  Try other asset strategy as lint not happy
  Convert TermsService to suspend functions
  Convert UploadsService to suspend functions
  Convert IntegrationManagerService to suspend functions
  update change log
  Home empty screen design update
2020-11-30 13:14:13 +03:00
Benoit Marty
b2556cb293 Update change after release 2020-11-30 11:00:58 +01:00
Benoit Marty
c029564590 Rename method and class for more clarity 2020-11-30 10:59:07 +01:00
Benoit Marty
0cfea40b24 Use when statement and modify the case to simplify the code 2020-11-30 10:59:07 +01:00
Benoit Marty
9c53f0f881 Clarify aliasLocalPart 2020-11-30 10:59:07 +01:00
Benoit Marty
50ddd3cf31 Small cleanup, handle case of no local alias, handle unpublish of canonical alias 2020-11-30 10:59:07 +01:00
Benoit Marty
6c7eb6ea8c Small wording change 2020-11-30 10:59:07 +01:00
Benoit Marty
412fc78c9a Cleanup 2020-11-30 10:59:07 +01:00
Benoit Marty
0da0857970 Cleanup 2020-11-30 10:59:07 +01:00
Benoit Marty
90e0006cae Room directory visibility management 2020-11-30 10:59:07 +01:00
Benoit Marty
a570528f6c More fixes 2020-11-30 10:59:07 +01:00
Benoit Marty
2d4cbde72c Render canonical alias 2020-11-30 10:59:07 +01:00
Benoit Marty
f5ae95d7f1 Close form only if necessary 2020-11-30 10:59:07 +01:00
Benoit Marty
c5e6e004dd Room alias detail 2020-11-30 10:59:07 +01:00
Benoit Marty
d9c209aa87 Cleanup 2020-11-30 10:59:07 +01:00
Benoit Marty
8f80f375f0 Prepare alias bottom sheet 2020-11-30 10:59:07 +01:00
Benoit Marty
2cf2233643 Naming convention 2020-11-30 10:59:07 +01:00
Benoit Marty
36564f0c75 copy/paste error 2020-11-30 10:59:07 +01:00
Benoit Marty
8dbb984ead Sort the aliases 2020-11-30 10:59:07 +01:00
Benoit Marty
74ffbd4679 Ensure the forms are displayable 2020-11-30 10:59:07 +01:00
Benoit Marty
82b23d9a13 Ensure we push only clean m.room.canonical_alias event 2020-11-30 10:59:07 +01:00
Benoit Marty
0a9b234272 Renaming 2020-11-30 10:59:07 +01:00
Benoit Marty
3a06ef3959 Improve form UX + local echo in case of success 2020-11-30 10:59:07 +01:00
Benoit Marty
ed4676bb6c Cleanup and avoid duplicate 2020-11-30 10:59:07 +01:00
Benoit Marty
893ebd9690 Fix UI error 2020-11-30 10:59:07 +01:00
Benoit Marty
3c069f8b79 Add published aliases 2020-11-30 10:59:07 +01:00
Benoit Marty
93580c902f Prepare to update canonical alias state 2020-11-30 10:59:07 +01:00
Benoit Marty
e1abd5a051 Fix layout issue 2020-11-30 10:59:07 +01:00
Benoit Marty
27fc5f265f Add/Remove local alias (#2428) 2020-11-30 10:59:07 +01:00
Benoit Marty
5b618ba1f3 Create RoomDirectoryAPI, and handle deletion of alias 2020-11-30 10:59:07 +01:00
Benoit Marty
a6f56ace24 Create a dedicated screen to manage room alias (#2428) - WIP 2020-11-30 10:59:07 +01:00
Benoit Marty
0d93105bcd Rended m.room.canonical_alias event in the timeline, considering alt_aliases (#2428) 2020-11-30 10:59:07 +01:00
Benoit Marty
7c2fea8623 Typo 2020-11-30 10:59:07 +01:00
Benoit Marty
e2a89c22da Do not show m.room.aliases event in the timeline (#2428) 2020-11-30 10:59:07 +01:00
Benoit Marty
03715e0939 Do not use m.room.aliases event to compute a room name (#2428) 2020-11-30 10:59:07 +01:00
Benoit Marty
4d9b9cb959 Deprecated event m.room.aliases 2020-11-30 10:59:07 +01:00
Benoit Marty
d759636d95 Merge pull request #2465 from vector-im/feature/bca/fix_verifypassphrase_bottomsheet
Fix / double bottomsheet effect
2020-11-30 10:58:15 +01:00
Benoit Marty
c8a8e0f2da Format source 2020-11-30 10:54:22 +01:00
Benoit Marty
b004dfbdf2 Merge pull request #2457 from Dominaezzz/suspend_functions_2
Convert IntegrationManagerService to suspend functions
2020-11-30 10:49:46 +01:00
Benoit Marty
40ea91cce4 Merge pull request #2459 from Dominaezzz/suspend_functions_3
Convert UploadsService to suspend functions
2020-11-30 10:48:44 +01:00
Benoit Marty
abcb02d4aa Merge pull request #2460 from Dominaezzz/suspend_functions
Convert TermsService to suspend functions
2020-11-30 10:47:55 +01:00
Benoit Marty
cd983de058 Fix cancellation of sending event (#2438) 2020-11-30 10:08:31 +01:00
Benoit Marty
f6cc05634f Send task: small rework and cleanup 2020-11-30 10:08:05 +01:00
Marcelo Filho
f14b390849 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (4 of 4 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/pt_BR/
2020-11-28 17:50:18 +00:00
Besnik Bleta
431f5d76ce Translated using Weblate (Albanian)
Currently translated at 95.2% (200 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/sq/
2020-11-28 17:50:18 +00:00
Marcelo Filho
dd50399a21 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (210 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/pt_BR/
2020-11-28 17:50:18 +00:00
sblondon
eb17463b68 Translated using Weblate (French)
Currently translated at 100.0% (210 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/fr/
2020-11-28 17:50:17 +00:00
Priit Jõerüüt
88e05ffd05 Translated using Weblate (Estonian)
Currently translated at 100.0% (210 of 210 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.element.io/projects/element-android/element-sdk/et/
2020-11-28 17:50:17 +00:00
Besnik Bleta
a5079f5243 Translated using Weblate (Albanian)
Currently translated at 99.3% (1973 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sq/
2020-11-28 17:50:17 +00:00
krikra01
422c681e55 Translated using Weblate (Russian)
Currently translated at 97.1% (1930 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ru/
2020-11-28 17:50:14 +00:00
Marcelo Filho
9531a38486 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2020-11-28 17:50:13 +00:00
sblondon
493cd2a0e3 Translated using Weblate (French)
Currently translated at 98.8% (1963 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/
2020-11-28 17:50:10 +00:00
Priit Jõerüüt
f7f7e808f2 Translated using Weblate (Estonian)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/et/
2020-11-28 17:50:08 +00:00
zeritti
217c88f342 Translated using Weblate (Czech)
Currently translated at 100.0% (1986 of 1986 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/cs/
2020-11-28 17:50:05 +00:00
Valere
cf70916764 Fix / double bottomsheet effect 2020-11-28 00:41:29 +01:00
Benoit Marty
b84d7f0834 Version** 2020-11-27 20:42:02 +01:00
Benoit Marty
11deaa049e Merge branch 'release/1.0.11' into develop 2020-11-27 20:40:01 +01:00
Onuray Sahin
245aa6e9e7 Create a new pin when tap on change pin item. 2020-11-27 17:17:24 +03:00
Dominic Fischer
33a5cc1488 Remove redundant returns
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2020-11-27 13:18:07 +00:00
Onuray Sahin
89e7e28bfa Add settings item to change pin. 2020-11-27 15:22:31 +03:00
Onuray Sahin
221eddd995 Add changelog. 2020-11-27 15:02:08 +03:00
Dominic Fischer
27050b911b Convert TermsService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2020-11-26 21:53:22 +00:00
Dominic Fischer
a3a2c0a9a8 Convert UploadsService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2020-11-26 21:51:58 +00:00
Dominic Fischer
92ceb0e8fb Convert IntegrationManagerService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2020-11-26 21:17:58 +00:00
946 changed files with 24444 additions and 8922 deletions

View File

@@ -24,6 +24,8 @@
<w>pbkdf</w>
<w>pids</w>
<w>pkcs</w>
<w>previewable</w>
<w>previewables</w>
<w>riotx</w>
<w>signin</w>
<w>signout</w>
@@ -31,6 +33,7 @@
<w>ssss</w>
<w>sygnal</w>
<w>threepid</w>
<w>unpublish</w>
<w>unwedging</w>
</words>
</dictionary>

View File

@@ -1,3 +1,114 @@
Changes in Element 1.0.15 (2020-02-03)
===================================================
Features ✨:
- Social Login support
Improvements 🙌:
- SSO support for cross signing (#1062)
- Deactivate account when logged in with SSO (#1264)
- SSO UIA doesn't work (#2754)
Bugfix 🐛:
- Fix clear cache issue: sometimes, after a clear cache, there is still a token, so the init sync service is not started.
- Sidebar too large in horizontal orientation or tablets (#475)
- UrlPreview should be updated when the url is edited and changed (#2678)
- When receiving a new pepper from identity server, use it on the next hash lookup (#2708)
- Crashes reported by PlayStore (new in 1.0.14) (#2707)
- Widgets: Support $matrix_widget_id parameter (#2748)
- Data for Worker overload (#2721)
- Fix multiple tasks
SDK API changes ⚠️:
- Increase targetSdkVersion to 30 (#2600)
Build 🧱:
- Compile with Android SDK 30 (Android 11)
Other changes:
- Update Dagger to 2.31 version so we can use the embedded AssistedInject feature
Changes in Element 1.0.14 (2020-01-15)
===================================================
Features ✨:
- Enable url previews for notices (#2562)
- Edit room permissions (#2471)
Improvements 🙌:
- Add System theme option and set as default (#904, #2387)
- Store megolm outbound session to improve send time of first message after app launch.
- Warn user when they are leaving a not public room (#1460)
- Option to disable emoji keyboard (#2563)
Bugfix 🐛:
- Unspecced msgType field in m.sticker (#2580)
- Wait for all room members to be known before sending a message to a e2e room (#2518)
- Url previews sometimes attached to wrong message (#2561)
- Room Topic not displayed correctly after visiting a link (#2551)
- Hiding membership events works the exact opposite (#2603)
- Tapping drawer having more than 1 room in notifications gives "malformed link" error (#2605)
- Sent image not displayed when opened immediately after sending (#409)
- Initial sync is not retried correctly when there is some network error. (#2632)
- Fix switch theme issue, and white field issue (#2599, #2528)
- Fix request too large Uri error when joining a room
Translations 🗣:
- New language supported: Hebrew
Build 🧱:
- Remove dependency to org.greenrobot.eventbus library
Other changes:
- Migrate to ViewBindings (#1072)
Changes in Element 1.0.13 (2020-12-18)
===================================================
Bugfix 🐛:
- Fix MSC2858 implementation details (#2540)
Changes in Element 1.0.12 (2020-12-15)
===================================================
Features ✨:
- Add room aliases management, and room directory visibility management in a dedicated screen (#1579, #2428)
- Room setting: update join rules and guest access (#2442)
- Url preview (#481)
- Store encrypted file in cache and cleanup decrypted file at each app start (#2512)
- Emoji Keyboard (#2520)
- Social login (#2452)
- Support for chat effects in timeline (confetti, snow) (#2535)
Improvements 🙌:
- Add Setting Item to Change PIN (#2462)
- Improve room history visibility setting UX (#1579)
- Matrix.to deeplink custom scheme support
- Homeserver history (#1933)
Bugfix 🐛:
- Fix cancellation of sending event (#2438)
- Double bottomsheet effect after verify with passphrase
- EditText cursor jumps to the start while typing fast (#2469)
- UTD for events before invitation if member state events are hidden (#2486)
- No known servers error is given when joining rooms on new Gitter bridge (#2516)
- Show preview when sending attachment from the keyboard (#2440)
- Do not compress GIFs (#1616, #1254)
SDK API changes ⚠️:
- StateService now exposes suspendable function instead of using MatrixCallback.
- RawCacheStrategy has been moved and renamed to CacheStrategy
- FileService: remove useless FileService.DownloadMode
Build 🧱:
- Upgrade some dependencies and Kotlin version
- Use fragment-ktx and preference-ktx dependencies (fix lint issue KtxExtensionAvailable)
- Upgrade Realm dependency to 10.1.2
Other changes:
- Remove "Status.im" theme #2424
- Log HTTP requests and responses in production (level BASIC, i.e. without any private data)
Changes in Element 1.0.11 (2020-11-27)
===================================================

View File

@@ -16,7 +16,6 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
buildscript {
repositories {
@@ -33,11 +32,11 @@ buildscript {
}
android {
compileSdkVersion 29
compileSdkVersion 30
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 30
versionCode 1
versionName "1.0"
}
@@ -55,6 +54,10 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
}
}
dependencies {
@@ -66,7 +69,6 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "androidx.fragment:fragment:1.3.0-beta01"
implementation "androidx.recyclerview:recyclerview:1.1.0"
implementation 'com.google.android.material:material:1.2.1'

View File

@@ -17,19 +17,17 @@
package im.vector.lib.attachmentviewer
import android.view.View
import android.widget.ImageView
import android.widget.ProgressBar
import im.vector.lib.attachmentviewer.databinding.ItemAnimatedImageAttachmentBinding
class AnimatedImageViewHolder constructor(itemView: View) :
BaseViewHolder(itemView) {
val touchImageView: ImageView = itemView.findViewById(R.id.imageView)
val imageLoaderProgress: ProgressBar = itemView.findViewById(R.id.imageLoaderProgress)
val views = ItemAnimatedImageAttachmentBinding.bind(itemView)
internal val target = DefaultImageLoaderTarget(this, this.touchImageView)
internal val target = DefaultImageLoaderTarget(this, views.imageView)
override fun onRecycled() {
super.onRecycled()
touchImageView.setImageDrawable(null)
views.imageView.setImageDrawable(null)
}
}

View File

@@ -18,58 +18,70 @@
package im.vector.lib.attachmentviewer
import android.graphics.Color
import android.os.Build
import android.os.Bundle
import android.view.GestureDetector
import android.view.MotionEvent
import android.view.ScaleGestureDetector
import android.view.View
import android.view.ViewGroup
import android.view.WindowInsets
import android.view.WindowInsetsController
import android.view.WindowManager
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.core.view.GestureDetectorCompat
import androidx.core.view.ViewCompat
import androidx.core.view.isVisible
import androidx.core.view.updatePadding
import androidx.transition.TransitionManager
import androidx.viewpager2.widget.ViewPager2
import kotlinx.android.synthetic.main.activity_attachment_viewer.*
import im.vector.lib.attachmentviewer.databinding.ActivityAttachmentViewerBinding
import java.lang.ref.WeakReference
import kotlin.math.abs
abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventListener {
lateinit var pager2: ViewPager2
lateinit var imageTransitionView: ImageView
lateinit var transitionImageContainer: ViewGroup
protected val pager2: ViewPager2
get() = views.attachmentPager
protected val imageTransitionView: ImageView
get() = views.transitionImageView
protected val transitionImageContainer: ViewGroup
get() = views.transitionImageContainer
var topInset = 0
var bottomInset = 0
var systemUiVisibility = true
private var topInset = 0
private var bottomInset = 0
private var systemUiVisibility = true
private var overlayView: View? = null
set(value) {
if (value == overlayView) return
overlayView?.let { rootContainer.removeView(it) }
rootContainer.addView(value)
overlayView?.let { views.rootContainer.removeView(it) }
views.rootContainer.addView(value)
value?.updatePadding(top = topInset, bottom = bottomInset)
field = value
}
private lateinit var views: ActivityAttachmentViewerBinding
private lateinit var swipeDismissHandler: SwipeToDismissHandler
private lateinit var directionDetector: SwipeDirectionDetector
private lateinit var scaleDetector: ScaleGestureDetector
private lateinit var gestureDetector: GestureDetectorCompat
var currentPosition = 0
private set
private var swipeDirection: SwipeDirection? = null
private fun isScaled() = attachmentsAdapter.isScaled(currentPosition)
private val attachmentsAdapter = AttachmentsAdapter()
private var wasScaled: Boolean = false
private var isSwipeToDismissAllowed: Boolean = true
private lateinit var attachmentsAdapter: AttachmentsAdapter
private var isOverlayWasClicked = false
// private val shouldDismissToBottom: Boolean
@@ -86,26 +98,16 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// This is important for the dispatchTouchEvent, if not we must correct
// the touch coordinates
window.decorView.systemUiVisibility = (
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
or View.SYSTEM_UI_FLAG_IMMERSIVE)
window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
setDecorViewFullScreen()
setContentView(R.layout.activity_attachment_viewer)
attachmentPager.orientation = ViewPager2.ORIENTATION_HORIZONTAL
attachmentsAdapter = AttachmentsAdapter()
attachmentPager.adapter = attachmentsAdapter
imageTransitionView = transitionImageView
transitionImageContainer = findViewById(R.id.transitionImageContainer)
pager2 = attachmentPager
views = ActivityAttachmentViewerBinding.inflate(layoutInflater)
setContentView(views.root)
views.attachmentPager.orientation = ViewPager2.ORIENTATION_HORIZONTAL
views.attachmentPager.adapter = attachmentsAdapter
directionDetector = createSwipeDirectionDetector()
gestureDetector = createGestureDetector()
attachmentPager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
views.attachmentPager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
override fun onPageScrollStateChanged(state: Int) {
isImagePagerIdle = state == ViewPager2.SCROLL_STATE_IDLE
}
@@ -116,12 +118,12 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
})
swipeDismissHandler = createSwipeToDismissHandler()
rootContainer.setOnTouchListener(swipeDismissHandler)
rootContainer.viewTreeObserver.addOnGlobalLayoutListener { swipeDismissHandler.translationLimit = dismissContainer.height / 4 }
views.rootContainer.setOnTouchListener(swipeDismissHandler)
views.rootContainer.viewTreeObserver.addOnGlobalLayoutListener { swipeDismissHandler.translationLimit = views.dismissContainer.height / 4 }
scaleDetector = createScaleGestureDetector()
ViewCompat.setOnApplyWindowInsetsListener(rootContainer) { _, insets ->
ViewCompat.setOnApplyWindowInsetsListener(views.rootContainer) { _, insets ->
overlayView?.updatePadding(top = insets.systemWindowInsetTop, bottom = insets.systemWindowInsetBottom)
topInset = insets.systemWindowInsetTop
bottomInset = insets.systemWindowInsetBottom
@@ -129,6 +131,29 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
}
}
@Suppress("DEPRECATION")
private fun setDecorViewFullScreen() {
// This is important for the dispatchTouchEvent, if not we must correct
// the touch coordinates
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
// New API instead of SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
window.setDecorFitsSystemWindows(false)
// New API instead of SYSTEM_UI_FLAG_IMMERSIVE
window.decorView.windowInsetsController?.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_BARS_BY_SWIPE
// New API instead of FLAG_TRANSLUCENT_STATUS
window.statusBarColor = ContextCompat.getColor(this, R.color.half_transparent_status_bar)
// new API instead of FLAG_TRANSLUCENT_NAVIGATION
window.navigationBarColor = ContextCompat.getColor(this, R.color.half_transparent_status_bar)
} else {
window.decorView.systemUiVisibility = (
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
or View.SYSTEM_UI_FLAG_IMMERSIVE)
window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
}
}
fun onSelectedPositionChanged(position: Int) {
attachmentsAdapter.recyclerView?.findViewHolderForAdapterPosition(currentPosition)?.let {
(it as? BaseViewHolder)?.onSelected(false)
@@ -170,7 +195,7 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
if (swipeDirection == null && (scaleDetector.isInProgress || ev.pointerCount > 1 || wasScaled)) {
wasScaled = true
// Log.v("ATTACHEMENTS", "dispatch to pager")
return attachmentPager.dispatchTouchEvent(ev)
return views.attachmentPager.dispatchTouchEvent(ev)
}
// Log.v("ATTACHEMENTS", "is current item scaled ${isScaled()}")
@@ -196,16 +221,16 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
private fun handleEventActionDown(event: MotionEvent) {
swipeDirection = null
wasScaled = false
attachmentPager.dispatchTouchEvent(event)
views.attachmentPager.dispatchTouchEvent(event)
swipeDismissHandler.onTouch(rootContainer, event)
swipeDismissHandler.onTouch(views.rootContainer, event)
isOverlayWasClicked = dispatchOverlayTouch(event)
}
private fun handleEventActionUp(event: MotionEvent) {
// wasDoubleTapped = false
swipeDismissHandler.onTouch(rootContainer, event)
attachmentPager.dispatchTouchEvent(event)
swipeDismissHandler.onTouch(views.rootContainer, event)
views.attachmentPager.dispatchTouchEvent(event)
isOverlayWasClicked = dispatchOverlayTouch(event)
}
@@ -220,12 +245,12 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
private fun toggleOverlayViewVisibility() {
if (systemUiVisibility) {
// we hide
TransitionManager.beginDelayedTransition(rootContainer)
TransitionManager.beginDelayedTransition(views.rootContainer)
hideSystemUI()
overlayView?.isVisible = false
} else {
// we show
TransitionManager.beginDelayedTransition(rootContainer)
TransitionManager.beginDelayedTransition(views.rootContainer)
showSystemUI()
overlayView?.isVisible = true
}
@@ -238,11 +263,11 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
return when (swipeDirection) {
SwipeDirection.Up, SwipeDirection.Down -> {
if (isSwipeToDismissAllowed && !wasScaled && isImagePagerIdle) {
swipeDismissHandler.onTouch(rootContainer, event)
swipeDismissHandler.onTouch(views.rootContainer, event)
} else true
}
SwipeDirection.Left, SwipeDirection.Right -> {
attachmentPager.dispatchTouchEvent(event)
views.attachmentPager.dispatchTouchEvent(event)
}
else -> true
}
@@ -250,8 +275,8 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
private fun handleSwipeViewMove(translationY: Float, translationLimit: Int) {
val alpha = calculateTranslationAlpha(translationY, translationLimit)
backgroundView.alpha = alpha
dismissContainer.alpha = alpha
views.backgroundView.alpha = alpha
views.dismissContainer.alpha = alpha
overlayView?.alpha = alpha
}
@@ -265,7 +290,7 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
private fun createSwipeToDismissHandler()
: SwipeToDismissHandler = SwipeToDismissHandler(
swipeView = dismissContainer,
swipeView = views.dismissContainer,
shouldAnimateDismiss = { shouldAnimateDismiss() },
onDismiss = { animateClose() },
onSwipeViewMove = ::handleSwipeViewMove)
@@ -308,28 +333,48 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
?.handleCommand(commands)
}
@Suppress("DEPRECATION")
private fun hideSystemUI() {
systemUiVisibility = false
// Enables regular immersive mode.
// For "lean back" mode, remove SYSTEM_UI_FLAG_IMMERSIVE.
// Or for "sticky immersive," replace it with SYSTEM_UI_FLAG_IMMERSIVE_STICKY
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE
// Set the content to appear under the system bars so that the
// content doesn't resize when the system bars hide and show.
or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// Hide the nav bar and status bar
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_FULLSCREEN)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
// New API instead of SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
window.setDecorFitsSystemWindows(false)
// new API instead of SYSTEM_UI_FLAG_HIDE_NAVIGATION
window.decorView.windowInsetsController?.hide(WindowInsets.Type.navigationBars())
// New API instead of SYSTEM_UI_FLAG_IMMERSIVE
window.decorView.windowInsetsController?.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_BARS_BY_SWIPE
// New API instead of FLAG_TRANSLUCENT_STATUS
window.statusBarColor = ContextCompat.getColor(this, R.color.half_transparent_status_bar)
// New API instead of FLAG_TRANSLUCENT_NAVIGATION
window.navigationBarColor = ContextCompat.getColor(this, R.color.half_transparent_status_bar)
} else {
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE
// Set the content to appear under the system bars so that the
// content doesn't resize when the system bars hide and show.
or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// Hide the nav bar and status bar
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_FULLSCREEN)
}
}
// Shows the system bars by removing all the flags
// except for the ones that make the content appear under the system bars.
@Suppress("DEPRECATION")
private fun showSystemUI() {
systemUiVisibility = true
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
// New API instead of SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
window.setDecorFitsSystemWindows(false)
} else {
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
}
}
}

View File

@@ -98,7 +98,7 @@ class AttachmentsAdapter : RecyclerView.Adapter<BaseViewHolder>() {
fun isScaled(position: Int): Boolean {
val holder = recyclerView?.findViewHolderForAdapterPosition(position)
if (holder is ZoomableImageViewHolder) {
return holder.touchImageView.attacher.scale > 1f
return holder.views.touchImageView.attacher.scale > 1f
}
return false
}

View File

@@ -44,29 +44,29 @@ internal class DefaultImageLoaderTarget(val holder: AnimatedImageViewHolder, pri
override fun onResourceLoading(uid: String, placeholder: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = true
holder.views.imageLoaderProgress.isVisible = true
}
override fun onLoadFailed(uid: String, errorDrawable: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = false
holder.touchImageView.setImageDrawable(errorDrawable)
holder.views.imageLoaderProgress.isVisible = false
holder.views.imageView.setImageDrawable(errorDrawable)
}
override fun onResourceCleared(uid: String, placeholder: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.touchImageView.setImageDrawable(placeholder)
holder.views.imageView.setImageDrawable(placeholder)
}
override fun onResourceReady(uid: String, resource: Drawable) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = false
holder.views.imageLoaderProgress.isVisible = false
// Glide mess up the view size :/
holder.touchImageView.updateLayoutParams {
holder.views.imageView.updateLayoutParams {
width = LinearLayout.LayoutParams.MATCH_PARENT
height = LinearLayout.LayoutParams.MATCH_PARENT
}
holder.touchImageView.setImageDrawable(resource)
holder.views.imageView.setImageDrawable(resource)
if (resource is Animatable) {
resource.start()
}
@@ -77,30 +77,30 @@ internal class DefaultImageLoaderTarget(val holder: AnimatedImageViewHolder, pri
override fun onResourceLoading(uid: String, placeholder: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = true
holder.touchImageView.setImageDrawable(placeholder)
holder.views.imageLoaderProgress.isVisible = true
holder.views.touchImageView.setImageDrawable(placeholder)
}
override fun onLoadFailed(uid: String, errorDrawable: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = false
holder.touchImageView.setImageDrawable(errorDrawable)
holder.views.imageLoaderProgress.isVisible = false
holder.views.touchImageView.setImageDrawable(errorDrawable)
}
override fun onResourceCleared(uid: String, placeholder: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.touchImageView.setImageDrawable(placeholder)
holder.views.touchImageView.setImageDrawable(placeholder)
}
override fun onResourceReady(uid: String, resource: Drawable) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = false
holder.views.imageLoaderProgress.isVisible = false
// Glide mess up the view size :/
holder.touchImageView.updateLayoutParams {
holder.views.touchImageView.updateLayoutParams {
width = LinearLayout.LayoutParams.MATCH_PARENT
height = LinearLayout.LayoutParams.MATCH_PARENT
}
holder.touchImageView.setImageDrawable(resource)
holder.views.touchImageView.setImageDrawable(resource)
}
}
}

View File

@@ -49,19 +49,19 @@ internal class DefaultVideoLoaderTarget(val holder: VideoViewHolder, private val
override fun onThumbnailResourceCleared(uid: String, placeholder: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.thumbnailImage.setImageDrawable(placeholder)
holder.views.videoThumbnailImage.setImageDrawable(placeholder)
}
override fun onThumbnailResourceReady(uid: String, resource: Drawable) {
if (holder.boundResourceUid != uid) return
holder.thumbnailImage.setImageDrawable(resource)
holder.views.videoThumbnailImage.setImageDrawable(resource)
}
override fun onVideoFileLoading(uid: String) {
if (holder.boundResourceUid != uid) return
holder.thumbnailImage.isVisible = true
holder.loaderProgressBar.isVisible = true
holder.videoView.isVisible = false
holder.views.videoThumbnailImage.isVisible = true
holder.views.videoLoaderProgress.isVisible = true
holder.views.videoView.isVisible = false
}
override fun onVideoFileLoadFailed(uid: String) {
@@ -82,8 +82,8 @@ internal class DefaultVideoLoaderTarget(val holder: VideoViewHolder, private val
}
private fun arrangeForVideoReady() {
holder.thumbnailImage.isVisible = false
holder.loaderProgressBar.isVisible = false
holder.videoView.isVisible = true
holder.views.videoThumbnailImage.isVisible = false
holder.views.videoLoaderProgress.isVisible = false
holder.views.videoView.isVisible = true
}
}

View File

@@ -18,11 +18,8 @@ package im.vector.lib.attachmentviewer
import android.util.Log
import android.view.View
import android.widget.ImageView
import android.widget.ProgressBar
import android.widget.TextView
import android.widget.VideoView
import androidx.core.view.isVisible
import im.vector.lib.attachmentviewer.databinding.ItemVideoAttachmentBinding
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
@@ -44,13 +41,9 @@ class VideoViewHolder constructor(itemView: View) :
var eventListener: WeakReference<AttachmentEventListener>? = null
val thumbnailImage: ImageView = itemView.findViewById(R.id.videoThumbnailImage)
val videoView: VideoView = itemView.findViewById(R.id.videoView)
val loaderProgressBar: ProgressBar = itemView.findViewById(R.id.videoLoaderProgress)
val videoControlIcon: ImageView = itemView.findViewById(R.id.videoControlIcon)
val errorTextView: TextView = itemView.findViewById(R.id.videoMediaViewerErrorView)
val views = ItemVideoAttachmentBinding.bind(itemView)
internal val target = DefaultVideoLoaderTarget(this, thumbnailImage)
internal val target = DefaultVideoLoaderTarget(this, views.videoThumbnailImage)
override fun onRecycled() {
super.onRecycled()
@@ -77,12 +70,12 @@ class VideoViewHolder constructor(itemView: View) :
}
override fun entersBackground() {
if (videoView.isPlaying) {
progress = videoView.currentPosition
if (views.videoView.isPlaying) {
progress = views.videoView.currentPosition
progressDisposable?.dispose()
progressDisposable = null
videoView.stopPlayback()
videoView.pause()
views.videoView.stopPlayback()
views.videoView.pause()
}
}
@@ -92,9 +85,9 @@ class VideoViewHolder constructor(itemView: View) :
override fun onSelected(selected: Boolean) {
if (!selected) {
if (videoView.isPlaying) {
progress = videoView.currentPosition
videoView.stopPlayback()
if (views.videoView.isPlaying) {
progress = views.videoView.currentPosition
views.videoView.stopPlayback()
} else {
progress = 0
}
@@ -109,34 +102,34 @@ class VideoViewHolder constructor(itemView: View) :
}
private fun startPlaying() {
thumbnailImage.isVisible = false
loaderProgressBar.isVisible = false
videoView.isVisible = true
views.videoThumbnailImage.isVisible = false
views.videoLoaderProgress.isVisible = false
views.videoView.isVisible = true
videoView.setOnPreparedListener {
views.videoView.setOnPreparedListener {
progressDisposable?.dispose()
progressDisposable = Observable.interval(100, TimeUnit.MILLISECONDS)
.timeInterval()
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
val duration = videoView.duration
val progress = videoView.currentPosition
val isPlaying = videoView.isPlaying
val duration = views.videoView.duration
val progress = views.videoView.currentPosition
val isPlaying = views.videoView.isPlaying
// Log.v("FOO", "isPlaying $isPlaying $progress/$duration")
eventListener?.get()?.onEvent(AttachmentEvents.VideoEvent(isPlaying, progress, duration))
}
}
try {
videoView.setVideoPath(mVideoPath)
views.videoView.setVideoPath(mVideoPath)
} catch (failure: Throwable) {
// Couldn't open
Log.v(VideoViewHolder::class.java.name, "Failed to start video")
}
if (!wasPaused) {
videoView.start()
views.videoView.start()
if (progress > 0) {
videoView.seekTo(progress)
views.videoView.seekTo(progress)
}
}
}
@@ -146,17 +139,17 @@ class VideoViewHolder constructor(itemView: View) :
when (commands) {
AttachmentCommands.StartVideo -> {
wasPaused = false
videoView.start()
views.videoView.start()
}
AttachmentCommands.PauseVideo -> {
wasPaused = true
videoView.pause()
views.videoView.pause()
}
is AttachmentCommands.SeekTo -> {
val duration = videoView.duration
val duration = views.videoView.duration
if (duration > 0) {
val seekDuration = duration * (commands.percentProgress / 100f)
videoView.seekTo(seekDuration.toInt())
views.videoView.seekTo(seekDuration.toInt())
}
}
}

View File

@@ -17,31 +17,29 @@
package im.vector.lib.attachmentviewer
import android.view.View
import android.widget.ProgressBar
import com.github.chrisbanes.photoview.PhotoView
import im.vector.lib.attachmentviewer.databinding.ItemImageAttachmentBinding
class ZoomableImageViewHolder constructor(itemView: View) :
BaseViewHolder(itemView) {
val touchImageView: PhotoView = itemView.findViewById(R.id.touchImageView)
val imageLoaderProgress: ProgressBar = itemView.findViewById(R.id.imageLoaderProgress)
val views = ItemImageAttachmentBinding.bind(itemView)
init {
touchImageView.setAllowParentInterceptOnEdge(false)
touchImageView.setOnScaleChangeListener { scaleFactor, _, _ ->
views.touchImageView.setAllowParentInterceptOnEdge(false)
views.touchImageView.setOnScaleChangeListener { scaleFactor, _, _ ->
// Log.v("ATTACHEMENTS", "scaleFactor $scaleFactor")
// It's a bit annoying but when you pitch down the scaling
// is not exactly one :/
touchImageView.setAllowParentInterceptOnEdge(scaleFactor <= 1.0008f)
views.touchImageView.setAllowParentInterceptOnEdge(scaleFactor <= 1.0008f)
}
touchImageView.setScale(1.0f, true)
touchImageView.setAllowParentInterceptOnEdge(true)
views.touchImageView.setScale(1.0f, true)
views.touchImageView.setAllowParentInterceptOnEdge(true)
}
internal val target = DefaultImageLoaderTarget.ZoomableImageTarget(this, touchImageView)
internal val target = DefaultImageLoaderTarget.ZoomableImageTarget(this, views.touchImageView)
override fun onRecycled() {
super.onRecycled()
touchImageView.setImageDrawable(null)
views.touchImageView.setImageDrawable(null)
}
}

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<color name="half_transparent_status_bar">#80000000</color>
</resources>

View File

@@ -2,8 +2,8 @@
buildscript {
// Ref: https://kotlinlang.org/releases.html
ext.kotlin_version = '1.4.10'
ext.kotlin_coroutines_version = "1.3.9"
ext.kotlin_version = '1.4.20'
ext.kotlin_coroutines_version = "1.4.1"
repositories {
google()
jcenter()
@@ -12,7 +12,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.google.gms:google-services:4.3.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1'
@@ -43,6 +43,10 @@ allprojects {
includeGroupByRegex 'com\\.github\\.chrisbanes'
// PFLockScreen-Android
includeGroupByRegex 'com\\.github\\.vector-im'
//Chat effects
includeGroupByRegex 'com\\.github\\.jetradarmobile'
includeGroupByRegex 'nl\\.dionsegijn'
}
}
maven {

View File

@@ -165,7 +165,7 @@ In this case, the user can click on "Sign in with SSO" and the native web browse
> https://homeserver.with.sso/_matrix/client/r0/login/sso/redirect?redirectUrl=element%3A%2F%element
The parameter `redirectUrl` is set to `element://element`.
The parameter `redirectUrl` is set to `element://connect`.
ChromeCustomTabs are an intermediate way to display a WebPage, between a WebView and using the external browser. More info can be found [here](https://developer.chrome.com/multidevice/android/customtabs)
@@ -175,7 +175,7 @@ During the process, user may be asked to validate an email by clicking on a link
Once the process is finished, the web page will call the `redirectUrl` with an extra parameter `loginToken`
> element://element?loginToken=MDAxOWxvY2F0aW9uIG1vemlsbGEub3JnCjAwMTNpZGVudGlmaWVy
> element://connect?loginToken=MDAxOWxvY2F0aW9uIG1vemlsbGEub3JnCjAwMTNpZGVudGlmaWVy
This navigation is intercepted by Element by the `LoginActivity`, which will then ask the homeserver to convert this `loginToken` to an access token

View File

@@ -27,7 +27,6 @@ $ source env/bin/activate
Every time you want to launch these test homeservers, type:
```shell script
$ virtualenv -p python3 env
$ source env/bin/activate
(env) $ demo/start.sh --no-rate-limit
```

View File

@@ -1 +1,2 @@
// TODO
Diese neue Version enthält hauptsächlich Fehlerkorrekturen und Verbesserungen. Nachrichten verschicken geht jetzt viel schneller.
Vollständige Versionshinweise: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Diese neue Version enthält hauptsächlich Verbesserungen der Benutzer*innenoberfläche und der Handhabung. Du kannst jetzt ganz schnell Freund*innen einladen und DMs erstellen, indem du schlicht einen QR-Code scannst.
Vollständige Versionshinweise: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -0,0 +1,2 @@
Main changes in this version: URL Preview, new Emoji keyboard, new room settings capabilities, and snow for Christmas!
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.0.12

View File

@@ -0,0 +1,2 @@
Main changes in this version: URL Preview, new Emoji keyboard, new room settings capabilities, and snow for Christmas!
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.0.13

View File

@@ -0,0 +1,2 @@
Main changes in this version: Edit room permissions, automatic light/dark theme, and a bunch of bug fixes.
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.0.14

View File

@@ -0,0 +1,2 @@
Main changes in this version: Social Login support.
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.0.15

View File

@@ -0,0 +1,2 @@
Selles uues versioonis leidub põhiliselt veaparandusi ja pisikohendusi. Sõnumite saatmine on nüüd märkatavalt kiirem.
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Uues versioonis leidub põhiliselt kasutajaliidese ning kasutajakogemuse parandusi. Nüüd saad sõpradele kutseid saata ning otsevestlusi alustada QR-koodi lugemise abil.
Kõik muudatused: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -1 +1,2 @@
// برای انجام
این نگارش جدید به طور عمده شامل رفع اشکال‌ها و بهبودها است. ارسال پیام اکنون بسیار سریعتر است.
گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
این نگارش جدید به طور عمده شامل رابط کاربری و بهبود تجربه کاربر است. اکنون می‌توانید با پویش کدهای QR دوستانتان را دعوت کرده و بسیار سریع پیام مستقیم ایجاد کنید.
گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -1 +1 @@
گپ و تماس نامتمرکز امن. داده‌هایتان را از شرکت‌ها امن نگه دارید.
گپ و تماس نامتمرکز امن. داده‌هایتان را از اشخاص سوم امن نگه دارید.

View File

@@ -1 +1 @@
المنت (ریوت سابق)
Element (پیشتر Riot.im)

View File

@@ -0,0 +1,2 @@
Tämä versio sisältää virheenkorjauksia ja muita parannuksia. Viestien lähettäminen on nyt paljon nopeampaa.
Täysi muutosloki: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Tämä versio sisältää pääosin käyttöliittymä- ja käyttökokemusparannuksia. Voit nyt kutsua kavereita ja luoda yksityisviestejä nopeasti QR-koodeja lukemalla.
Täysi muutosloki: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -0,0 +1,30 @@
Element on uudenlainen viestinsovellus, joka:
1. Antaa sinun päättää yksityisyydestäsi
2. Antaa sinun kommunikoida kenen tahansa kanssa Matrix-verkossa ja jopa sen ulkopuolella siltaamalla sovelluksiin, kuten Slack
3. Suojaa sinua mainonnalta, tietojen keräämiseltä ja suljetuilta alustoilta
4. Suojaa sinut päästä päähän -salauksella sekä ristiin varmentamisella muiden todentamiseksi
Element eroaa täysin muista viestintäsovelluksista, koska se on hajautettu ja avointa lähdekoodia.
Element antaa sinun isännöidä itse - tai valita palveluntarjoajan - jotta sinulla on yksityisyys ja voit hallita tietojasi sekä keskustelujasi. Se antaa sinulle pääsyn avoimeen verkkoon, joten et jää juttelemaan vain toisten Elementin käyttäjien kanssa. Se on myös hyvin turvallinen.
Element pystyy tekemään kaiken tämän, koska se toimii Matrixilla - avoimella, hajautetun viestinnän standardilla.
Element antaa sinulle päätösvallan antamalla sinun valita, kuka isännöi keskustelujasi. Element-sovelluksessa voit valita isännän eri tavoin:
1. Hanki ilmainen tili Matrix-kehittäjien ylläpitämällä matrix.org-palvelimella tai valitse tuhansista vapaaehtoisten ylläpitämistä julkisista palvelimista.
2. Isännöi tiliäsi itse ylläpitämällä palvelinta omalla laitteellasi
3. Luo tili sinua varten tehdyllä palvelimella tilaamalla Element Matrix Services -palvelu
<b>Miksi valita Element?</b>
<b>OMAT TIEDOT</b>: Sinä päätät, missä tietosi ja viestisi säilytetään. Sinä määräät, ei jokin jättiyhtiö, joka tutkii tietojasi tai antaa niitä kolmansille osapuolille.
<b>AVOINTA VIESTINTÄÄ JA YHTEISTYÖTÄ</b>: Voit keskustella kaikkien muiden Matrix-verkon käyttäjien kanssa, riippumatta siitä käyttävätkö he Elementiä tai muuta Matrix-sovellusta, ja vaikka he käyttäisivät eri viestijärjestelmiä, kuten Slack, IRC tai XMPP.
<b>ERITTÄIN TURVALLINEN</b>: Vahva päästä päähän -salaus (vain keskustelussa olevat voivat purkaa viestien salauksen), ja ristiin varmentaminen keskustelun osallistujien laitteiden tarkistamiseksi.
<b>KATTAVAA VIESTINTÄÄ</b>: Viestit, ääni- ja videopuhelut, tiedostojen jakaminen, näytön jakaminen ja koko joukko integraatioita, botteja ja sovelmia. Rakenna huoneita ja yhteisöjä, pidä yhteyttä ja hoida asiasi.
<b>MISSÄ TAHANSA OLETKIN</b>: Pidä yhteyttä missä tahansa, täysin synkronoidun viestihistorian kautta kaikilla laitteillasi ja verkossa osoitteessa https://app.element.io.

View File

@@ -0,0 +1,2 @@
Cette nouvelle version contient principalement des corrections de bogues et des améliorations. Envoyer un message est maintenant plus rapide.
Liste complète des changements : https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Ez az új verzió főképp hibajavításokat, és teljesítménybeli fejlesztéseket tartalmaz. Most már sokkal gyorsabb az üzenetek elküldése.
A változtatások teljes listája itt található: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Ez az új verzió főleg a felhasználói felülettel és a felhasználói élménnyel kapcsolatos javításokat tartalmaz. Mostantól már sokkal gyorsabban hívhatsz meg új ismerősöket a QR kód beolvasás által.
A változtatások teljes listája itt található: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -17,7 +17,7 @@ Az Element a te kezedbe adja az irányítást azáltal, hogy eldöntheted, ki t
2. A saját számítógépeden is futtathatsz szervert
3. Előfizethetsz egy saját szerverre az Element Matrix Szolgáltatások platformon
<b>Miért válaszd az Element-et?</b>
<b>Miért az Element-et választani?</b>
<b>ADATAID MEGVÉDÉSE</b>: Eldöntheted, hol tárold az adataid és üzeneteid. A te tulajdonodban van, nem valami megacégnél, ami bányássza az adataid, vagy továbbadja másoknak.

View File

@@ -1 +1,2 @@
// DA FARE
Questa nuova versione contiene soprattutto correzioni di errori e miglioramenti. L'invio di messaggi ora è molto più veloce.
Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Questa nuova versione contiene principalmente miglioramenti di interfaccia ed esperienza utente. Ora puoi invitare amici e iniziare messaggi diretti rapidamente tramite codici QR.
Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -0,0 +1,2 @@
Denne nye versjonen inneholder hovedsakelig feilrettinger og forbedringer. Å sende en melding er nå mye raskere.
Full endringslogg: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Denne nye versjonen inneholder hovedsakelig forbedringer av brukergrensesnittet og brukeropplevelsen. Nå kan du invitere venner og opprette DM veldig raskt ved å skanne QR-koder.
Full endringslogg: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -0,0 +1 @@
Sikker desentralisert chat & VoIP. Beskytt dataene dine fra tredjeparter.

View File

@@ -0,0 +1 @@
Element (tidligere Riot.im)

View File

@@ -1 +1,2 @@
// A FAZER
Esta nova versão contém principalmente correções de erros e melhorias. Enviar mensagens agora é muito mais rápido.
Registro de todas as alterações: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Esta nova versão contém principalmente melhorias na interface do usuário e na experiência do usuário. Agora você pode convidar amigos e criar conversas rapidamente, digitalizando códigos QR.
Registro completo de alterações: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -0,0 +1,2 @@
Эта новая версия в основном содержит исправления ошибок и улучшения. Отправка сообщения стала намного быстрее.
Полный список изменений: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Эта новая версия в основном содержит улучшения пользовательского интерфейса и взаимодействия с пользователем. Теперь вы можете приглашать друзей и очень быстро создавать чаты, сканируя QR-коды.
Полный список изменений: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -0,0 +1,2 @@
Táto verzia obsahuje predovšetkým opravy chýb. Odosielanie správ je odteraz omnoho rýchlejšie.
Kompletný zoznam zmien: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Táto verzia obsahuje najmä vylepšenia používateľského rozhrania. Pozývať priateľov alebo vytvárať priame konverzácie môžete veľmi rýchlo naskenovaním QR kódov.
Kompletný zoznam zmien: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -1 +1,2 @@
// ATT GÖRA
Den här nya versionen innehåller mest buggfixar och förbättringar. Det går nu mycket snabbare att skicka meddelanden.
Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Den här nya versionen innehåller mest förbättringar för användargränssnittet och användarupplevelsen. Du kan nu bjuda in vänner och skapa direktmeddelanden väldigt snabbt genom att skanna QR-koder.
Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -0,0 +1,2 @@
Ця версія містить переважно виправлення помилок та деякі покращення. Відправлення повідомлень стало тепер ще швидшим.
Повний перелік змін: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Ця нова версія містить переважно поліпшення інтерфейсу та зручності користування. Тепер ви можете запросити друзів і створити прямі повідомлення дуже швидко, скануючи QR-коди.
Повний перелік змін: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -7,7 +7,7 @@ Element — це застосунок для спілкування та спі
Element ґрунтовно відрізняється від інших застосунків для спілкування та співпраці тому що він є децентралізованим та відкритоджерельним.
Element дозволяє вам розміщувати сервер в себе або обирати будь-якого з надавачів послуг, таким чином забезпечуючи вам конфіденційність і можливість володіти власними даними й бесідами та контролювати їх. Він надає вам доступ до відкритої мережі, тож ви не є обмеженими спілкуванням виключно з користувачами Element. І він є дуже надійним та безпечним.
Element дозволяє вам розміщувати сервер в себе або обирати будь-якого з надавачів послуг, таким чином забезпечуючи вам конфіденційність і можливість володіти власними даними й бесідами та контролювати їх. Він надає вам доступ до відкритої мережі, тож ви не є обмеженими спілкуванням виключно з користувачами Element. І він є дуже надійним та безпечним.
Element здатен забезпечити усе це завдяки тому, що він заснований на протоколі Matrix — стандарті для відкритого та децентралізованого спілкування.

View File

@@ -0,0 +1,2 @@
Phiên bản mới này chủ yếu bao gồm sửa lỗi và một số cải thiện. Gửi tin nhắn trở nên nhanh chóng hơn trước.
Danh sách đầy đủ các thay đổi: https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
Phiên bản mới này chủ yếu bao gồm các cải thiện về giao diện và trải nghiệm người dùng. Bây giờ bạn có thể mời bạn bè và bắt đầu nói chuyện nhanh chóng bằng cách quét mã QR.
Danh sách đầy đủ các thay đổi: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -0,0 +1 @@
Ứng dụng chat và gọi phân tán bảo mật. Bảo vệ dữ liệu của bạn khỏi bên thứ ba.

View File

@@ -0,0 +1 @@
Element (trước là Riot.im)

View File

@@ -1 +1,2 @@
// 待辦事項
這個新版本主要包含錯誤修復與改善。傳送訊息更快了。
完整的變更紀錄請見https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
這個新版本主要包含使用者介面與使用者體驗改善。現在您可以邀請朋友,並透過掃描 QR code 來快速建立直接訊息了。
完整變更紀錄https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -0,0 +1,2 @@
此版本中的主要變更URL 預覽、新的表情符號鍵盤、新的聊天室設定功能以及聖誕節降雪!
完整變更紀錄https://github.com/vector-im/element-android/releases/tag/v1.0.12

View File

@@ -0,0 +1,2 @@
此版本中的主要變更URL 預覽、新的表情符號鍵盤、新的聊天室設定功能以及聖誕節降雪!
完整變更紀錄https://github.com/vector-im/element-android/releases/tag/v1.0.12

View File

@@ -18,7 +18,7 @@ org.gradle.jvmargs=-Xmx2048m
org.gradle.vfs.watch=true
vector.debugPrivateData=false
vector.httpLogLevel=NONE
vector.httpLogLevel=BASIC
# Note: to debug, you can put and uncomment the following lines in the file ~/.gradle/gradle.properties to override the value above
#vector.debugPrivateData=true

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=22449f5231796abd892c98b2a07c9ceebe4688d192cd2d6763f8e3bf8acbedeb
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
distributionSha256Sum=3db89524a3981819ff28c3f979236c1274a726e146ced0c8a2020417f9bc0782
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -3,11 +3,11 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 29
compileSdkVersion 30
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 30
versionCode 1
versionName "1.0"
@@ -36,9 +36,10 @@ android {
dependencies {
implementation project(":matrix-sdk-android")
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "androidx.fragment:fragment:1.3.0-beta01"
implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-rx2:$kotlin_coroutines_version"
// Paging
implementation "androidx.paging:paging-runtime-ktx:2.1.2"

View File

@@ -21,34 +21,36 @@ import org.matrix.android.sdk.api.util.Cancelable
import io.reactivex.Completable
import io.reactivex.Single
fun <T> singleBuilder(builder: (callback: MatrixCallback<T>) -> Cancelable): Single<T> = Single.create {
val callback: MatrixCallback<T> = object : MatrixCallback<T> {
fun <T> singleBuilder(builder: (MatrixCallback<T>) -> Cancelable): Single<T> = Single.create { emitter ->
val callback = object : MatrixCallback<T> {
override fun onSuccess(data: T) {
it.onSuccess(data)
// Add `!!` to fix the warning:
// "Type mismatch: type parameter with nullable bounds is used T is used where T was expected. This warning will become an error soon"
emitter.onSuccess(data!!)
}
override fun onFailure(failure: Throwable) {
it.tryOnError(failure)
emitter.tryOnError(failure)
}
}
val cancelable = builder(callback)
it.setCancellable {
emitter.setCancellable {
cancelable.cancel()
}
}
fun <T> completableBuilder(builder: (callback: MatrixCallback<T>) -> Cancelable): Completable = Completable.create {
val callback: MatrixCallback<T> = object : MatrixCallback<T> {
fun <T> completableBuilder(builder: (MatrixCallback<T>) -> Cancelable): Completable = Completable.create { emitter ->
val callback = object : MatrixCallback<T> {
override fun onSuccess(data: T) {
it.onComplete()
emitter.onComplete()
}
override fun onFailure(failure: Throwable) {
it.tryOnError(failure)
emitter.tryOnError(failure)
}
}
val cancelable = builder(callback)
it.setCancellable {
emitter.setCancellable {
cancelable.cancel()
}
}

View File

@@ -17,14 +17,20 @@
package org.matrix.android.sdk.rx
import android.net.Uri
import io.reactivex.Completable
import io.reactivex.Observable
import io.reactivex.Single
import kotlinx.coroutines.rx2.rxCompletable
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.identity.ThreePid
import org.matrix.android.sdk.api.session.room.Room
import org.matrix.android.sdk.api.session.room.members.RoomMemberQueryParams
import org.matrix.android.sdk.api.session.room.model.EventAnnotationsSummary
import org.matrix.android.sdk.api.session.room.model.GuestAccess
import org.matrix.android.sdk.api.session.room.model.ReadReceipt
import org.matrix.android.sdk.api.session.room.model.RoomHistoryVisibility
import org.matrix.android.sdk.api.session.room.model.RoomJoinRules
import org.matrix.android.sdk.api.session.room.model.RoomMemberSummary
import org.matrix.android.sdk.api.session.room.model.RoomSummary
import org.matrix.android.sdk.api.session.room.notification.RoomNotificationState
@@ -32,9 +38,6 @@ import org.matrix.android.sdk.api.session.room.send.UserDraft
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
import org.matrix.android.sdk.api.util.Optional
import org.matrix.android.sdk.api.util.toOptional
import io.reactivex.Completable
import io.reactivex.Observable
import io.reactivex.Single
class RxRoom(private val room: Room) {
@@ -119,32 +122,28 @@ class RxRoom(private val room: Room) {
room.invite3pid(threePid, it)
}
fun updateTopic(topic: String): Completable = completableBuilder<Unit> {
room.updateTopic(topic, it)
fun updateTopic(topic: String): Completable = rxCompletable {
room.updateTopic(topic)
}
fun updateName(name: String): Completable = completableBuilder<Unit> {
room.updateName(name, it)
fun updateName(name: String): Completable = rxCompletable {
room.updateName(name)
}
fun addRoomAlias(alias: String): Completable = completableBuilder<Unit> {
room.addRoomAlias(alias, it)
fun updateHistoryReadability(readability: RoomHistoryVisibility): Completable = rxCompletable {
room.updateHistoryReadability(readability)
}
fun updateCanonicalAlias(alias: String): Completable = completableBuilder<Unit> {
room.updateCanonicalAlias(alias, it)
fun updateJoinRule(joinRules: RoomJoinRules?, guestAccess: GuestAccess?): Completable = rxCompletable {
room.updateJoinRule(joinRules, guestAccess)
}
fun updateHistoryReadability(readability: RoomHistoryVisibility): Completable = completableBuilder<Unit> {
room.updateHistoryReadability(readability, it)
fun updateAvatar(avatarUri: Uri, fileName: String): Completable = rxCompletable {
room.updateAvatar(avatarUri, fileName)
}
fun updateAvatar(avatarUri: Uri, fileName: String): Completable = completableBuilder<Unit> {
room.updateAvatar(avatarUri, fileName, it)
}
fun deleteAvatar(): Completable = completableBuilder<Unit> {
room.deleteAvatar(it)
fun deleteAvatar(): Completable = rxCompletable {
room.deleteAvatar()
}
}

View File

@@ -47,6 +47,7 @@ import org.matrix.android.sdk.api.util.toOptional
import org.matrix.android.sdk.internal.crypto.model.CryptoDeviceInfo
import org.matrix.android.sdk.internal.crypto.model.rest.DeviceInfo
import org.matrix.android.sdk.internal.crypto.store.PrivateKeysInfo
import org.matrix.android.sdk.internal.session.room.alias.RoomAliasDescription
class RxSession(private val session: Session) {
@@ -139,7 +140,7 @@ class RxSession(private val session: Session) {
}
fun getRoomIdByAlias(roomAlias: String,
searchOnServer: Boolean): Single<Optional<String>> = singleBuilder {
searchOnServer: Boolean): Single<Optional<RoomAliasDescription>> = singleBuilder {
session.getRoomIdByAlias(roomAlias, searchOnServer, it)
}

View File

@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-parcelize'
apply plugin: 'realm-android'
buildscript {
@@ -9,21 +9,17 @@ buildscript {
jcenter()
}
dependencies {
classpath "io.realm:realm-gradle-plugin:10.0.0"
classpath "io.realm:realm-gradle-plugin:10.1.2"
}
}
androidExtensions {
experimental = true
}
android {
compileSdkVersion 29
compileSdkVersion 30
testOptions.unitTests.includeAndroidResources = true
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 30
versionCode 1
versionName "0.0.1"
// Multidex is useful for tests
@@ -63,7 +59,7 @@ android {
release {
buildConfigField "boolean", "LOG_PRIVATE_DATA", "false"
buildConfigField "okhttp3.logging.HttpLoggingInterceptor.Level", "OKHTTP_LOGGING_LEVEL", "okhttp3.logging.HttpLoggingInterceptor.Level.NONE"
buildConfigField "okhttp3.logging.HttpLoggingInterceptor.Level", "OKHTTP_LOGGING_LEVEL", "okhttp3.logging.HttpLoggingInterceptor.Level.BASIC"
}
}
@@ -116,7 +112,7 @@ dependencies {
def lifecycle_version = '2.2.0'
def arch_version = '2.1.0'
def markwon_version = '3.1.0'
def daggerVersion = '2.29.1'
def daggerVersion = '2.31'
def work_version = '2.4.0'
def retrofit_version = '2.6.2'
@@ -125,7 +121,6 @@ dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
implementation "androidx.appcompat:appcompat:1.2.0"
implementation "androidx.fragment:fragment:1.3.0-beta01"
implementation "androidx.core:core-ktx:1.3.2"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
@@ -146,7 +141,7 @@ dependencies {
implementation "ru.noties.markwon:core:$markwon_version"
// Image
implementation 'androidx.exifinterface:exifinterface:1.3.0'
implementation 'androidx.exifinterface:exifinterface:1.3.1'
// Database
implementation 'com.github.Zhuinden:realm-monarchy:0.7.1'
@@ -165,16 +160,11 @@ dependencies {
// DI
implementation "com.google.dagger:dagger:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
compileOnly 'com.squareup.inject:assisted-inject-annotations-dagger2:0.5.0'
kapt 'com.squareup.inject:assisted-inject-processor-dagger2:0.5.0'
// Logging
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.1'
// Bus
implementation 'org.greenrobot:eventbus:3.1.1'
// Phone number https://github.com/google/libphonenumber
implementation 'com.googlecode.libphonenumber:libphonenumber:8.10.23'

View File

@@ -20,14 +20,8 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile
### EVENT BUS ###
# BMA: Not sure I can delete this one without side effect
-keepattributes *Annotation*
-keepclassmembers class * {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
### MOSHI ###

View File

@@ -16,8 +16,18 @@
package org.matrix.android.sdk.account
import org.junit.Assert.assertTrue
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.junit.runners.MethodSorters
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.auth.UIABaseAuth
import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor
import org.matrix.android.sdk.api.auth.UserPasswordAuth
import org.matrix.android.sdk.api.auth.data.LoginFlowResult
import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse
import org.matrix.android.sdk.api.auth.registration.RegistrationResult
import org.matrix.android.sdk.api.failure.Failure
import org.matrix.android.sdk.api.failure.MatrixError
@@ -25,12 +35,8 @@ import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.SessionTestParams
import org.matrix.android.sdk.common.TestConstants
import org.matrix.android.sdk.common.TestMatrixCallback
import org.junit.Assert.assertTrue
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.junit.runners.MethodSorters
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
@RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
@@ -44,7 +50,18 @@ class DeactivateAccountTest : InstrumentedTest {
// Deactivate the account
commonTestHelper.runBlockingTest {
session.deactivateAccount(TestConstants.PASSWORD, false)
session.deactivateAccount(
object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(
UserPasswordAuth(
user = session.myUserId,
password = TestConstants.PASSWORD,
session = flowResponse.session
)
)
}
}, false)
}
// Try to login on the previous account, it will fail (M_USER_DEACTIVATED)

View File

@@ -25,6 +25,7 @@ import androidx.work.WorkManager
import com.zhuinden.monarchy.Monarchy
import org.matrix.android.sdk.BuildConfig
import org.matrix.android.sdk.api.auth.AuthenticationService
import org.matrix.android.sdk.api.auth.HomeServerHistoryService
import org.matrix.android.sdk.api.legacy.LegacySessionImporter
import org.matrix.android.sdk.api.raw.RawService
import org.matrix.android.sdk.common.DaggerTestMatrixComponent
@@ -49,6 +50,7 @@ class Matrix private constructor(context: Context, matrixConfiguration: MatrixCo
@Inject internal lateinit var backgroundDetectionObserver: BackgroundDetectionObserver
@Inject internal lateinit var olmManager: OlmManager
@Inject internal lateinit var sessionManager: SessionManager
@Inject internal lateinit var homeServerHistoryService: HomeServerHistoryService
private val uiHandler = Handler(Looper.getMainLooper())
@@ -71,6 +73,8 @@ class Matrix private constructor(context: Context, matrixConfiguration: MatrixCo
fun rawService() = rawService
fun homeServerHistoryService() = homeServerHistoryService
fun legacySessionImporter(): LegacySessionImporter {
return legacySessionImporter
}

View File

@@ -86,7 +86,7 @@ class CommonTestHelper(context: Context) {
*
* @param session the session to sync
*/
fun syncSession(session: Session) {
fun syncSession(session: Session, timeout: Long = TestConstants.timeOutMillis) {
val lock = CountDownLatch(1)
val job = GlobalScope.launch(Dispatchers.Main) {
@@ -109,7 +109,7 @@ class CommonTestHelper(context: Context) {
}
GlobalScope.launch(Dispatchers.Main) { syncLiveData.observeForever(syncObserver) }
await(lock)
await(lock, timeout)
}
/**
@@ -119,7 +119,7 @@ class CommonTestHelper(context: Context) {
* @param message the message to send
* @param nbOfMessages the number of time the message will be sent
*/
fun sendTextMessage(room: Room, message: String, nbOfMessages: Int): List<TimelineEvent> {
fun sendTextMessage(room: Room, message: String, nbOfMessages: Int, timeout: Long = TestConstants.timeOutMillis): List<TimelineEvent> {
val timeline = room.createTimeline(null, TimelineSettings(10))
val sentEvents = ArrayList<TimelineEvent>(nbOfMessages)
val latch = CountDownLatch(1)
@@ -151,7 +151,7 @@ class CommonTestHelper(context: Context) {
room.sendTextMessage(message + " #" + (i + 1))
}
// Wait 3 second more per message
await(latch, timeout = TestConstants.timeOutMillis + 3_000L * nbOfMessages)
await(latch, timeout = timeout + 3_000L * nbOfMessages)
timeline.dispose()
// Check that all events has been created
@@ -215,14 +215,14 @@ class CommonTestHelper(context: Context) {
.getLoginFlow(hs, it)
}
doSync<RegistrationResult> {
doSync<RegistrationResult>(timeout = 60_000) {
matrix.authenticationService
.getRegistrationWizard()
.createAccount(userName, password, null, it)
}
// Perform dummy step
val registrationResult = doSync<RegistrationResult> {
val registrationResult = doSync<RegistrationResult>(timeout = 60_000) {
matrix.authenticationService
.getRegistrationWizard()
.dummy(it)
@@ -231,7 +231,7 @@ class CommonTestHelper(context: Context) {
assertTrue(registrationResult is RegistrationResult.Success)
val session = (registrationResult as RegistrationResult.Success).session
if (sessionTestParams.withInitialSync) {
syncSession(session)
syncSession(session, 60_000)
}
return session
@@ -378,7 +378,9 @@ class CommonTestHelper(context: Context) {
fun Iterable<Session>.signOutAndClose() = forEach { signOutAndClose(it) }
fun signOutAndClose(session: Session) {
doSync<Unit>(60_000) { session.signOut(true, it) }
runBlockingTest(timeout = 60_000) {
session.signOut(true)
}
// no need signout will close
// session.close()
}

View File

@@ -18,14 +18,21 @@ package org.matrix.android.sdk.common
import org.matrix.android.sdk.api.session.Session
data class CryptoTestData(val firstSession: Session,
val roomId: String,
val secondSession: Session? = null,
val thirdSession: Session? = null) {
data class CryptoTestData(val roomId: String,
val sessions: List<Session>) {
val firstSession: Session
get() = sessions.first()
val secondSession: Session?
get() = sessions.getOrNull(1)
val thirdSession: Session?
get() = sessions.getOrNull(2)
fun cleanUp(testHelper: CommonTestHelper) {
testHelper.signOutAndClose(firstSession)
secondSession?.let { testHelper.signOutAndClose(it) }
thirdSession?.let { testHelper.signOutAndClose(it) }
sessions.forEach {
testHelper.signOutAndClose(it)
}
}
}

View File

@@ -19,6 +19,18 @@ package org.matrix.android.sdk.common
import android.os.SystemClock
import android.util.Log
import androidx.lifecycle.Observer
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.matrix.android.sdk.api.auth.UIABaseAuth
import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor
import org.matrix.android.sdk.api.auth.UserPasswordAuth
import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.crypto.verification.IncomingSasVerificationTransaction
import org.matrix.android.sdk.api.session.crypto.verification.OutgoingSasVerificationTransaction
@@ -36,17 +48,10 @@ import org.matrix.android.sdk.internal.crypto.MXCRYPTO_ALGORITHM_MEGOLM
import org.matrix.android.sdk.internal.crypto.MXCRYPTO_ALGORITHM_MEGOLM_BACKUP
import org.matrix.android.sdk.internal.crypto.keysbackup.model.MegolmBackupAuthData
import org.matrix.android.sdk.internal.crypto.keysbackup.model.MegolmBackupCreationInfo
import org.matrix.android.sdk.internal.crypto.model.rest.UserPasswordAuth
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import java.util.UUID
import java.util.concurrent.CountDownLatch
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
@@ -73,7 +78,7 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
}
}
return CryptoTestData(aliceSession, roomId)
return CryptoTestData(roomId, listOf(aliceSession))
}
/**
@@ -139,7 +144,7 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
// assertNotNull(roomFromBobPOV.powerLevels)
// assertTrue(roomFromBobPOV.powerLevels.maySendMessage(bobSession.myUserId))
return CryptoTestData(aliceSession, aliceRoomId, bobSession)
return CryptoTestData(aliceRoomId, listOf(aliceSession, bobSession))
}
/**
@@ -157,7 +162,7 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
// wait the initial sync
SystemClock.sleep(1000)
return CryptoTestData(aliceSession, aliceRoomId, cryptoTestData.secondSession, samSession)
return CryptoTestData(aliceRoomId, listOf(aliceSession, cryptoTestData.secondSession!!, samSession))
}
/**
@@ -304,10 +309,18 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
fun initializeCrossSigning(session: Session) {
mTestHelper.doSync<Unit> {
session.cryptoService().crossSigningService()
.initializeCrossSigning(UserPasswordAuth(
user = session.myUserId,
password = TestConstants.PASSWORD
), it)
.initializeCrossSigning(
object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(
UserPasswordAuth(
user = session.myUserId,
password = TestConstants.PASSWORD,
session = flowResponse.session
)
)
}
}, it)
}
}
@@ -381,4 +394,30 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
}
}
}
fun doE2ETestWithManyMembers(numberOfMembers: Int): CryptoTestData {
val aliceSession = mTestHelper.createAccount(TestConstants.USER_ALICE, defaultSessionParams)
aliceSession.cryptoService().setWarnOnUnknownDevices(false)
val roomId = mTestHelper.doSync<String> {
aliceSession.createRoom(CreateRoomParams().apply { name = "MyRoom" }, it)
}
val room = aliceSession.getRoom(roomId)!!
mTestHelper.runBlockingTest {
room.enableEncryption()
}
val sessions = mutableListOf(aliceSession)
for (index in 1 until numberOfMembers) {
val session = mTestHelper.createAccount("User_$index", defaultSessionParams)
mTestHelper.doSync<Unit>(timeout = 600_000) { room.invite(session.myUserId, null, it) }
println("TEST -> " + session.myUserId + " invited")
mTestHelper.doSync<Unit> { session.joinRoom(room.roomId, null, emptyList(), it) }
println("TEST -> " + session.myUserId + " joined")
sessions.add(session)
}
return CryptoTestData(roomId, sessions)
}
}

View File

@@ -17,7 +17,18 @@
package org.matrix.android.sdk.internal.crypto
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.amshove.kluent.shouldBe
import org.junit.Assert
import org.junit.Before
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.auth.UIABaseAuth
import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor
import org.matrix.android.sdk.api.auth.UserPasswordAuth
import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse
import org.matrix.android.sdk.api.extensions.tryOrNull
import org.matrix.android.sdk.api.session.crypto.MXCryptoError
import org.matrix.android.sdk.api.session.events.model.EventType
@@ -30,19 +41,13 @@ import org.matrix.android.sdk.common.CryptoTestHelper
import org.matrix.android.sdk.common.TestConstants
import org.matrix.android.sdk.internal.crypto.model.OlmSessionWrapper
import org.matrix.android.sdk.internal.crypto.model.event.EncryptedEventContent
import org.matrix.android.sdk.internal.crypto.model.rest.UserPasswordAuth
import org.matrix.android.sdk.internal.crypto.store.db.deserializeFromRealm
import org.matrix.android.sdk.internal.crypto.store.db.serializeForRealm
import org.amshove.kluent.shouldBe
import org.junit.Assert
import org.junit.Before
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.matrix.olm.OlmSession
import timber.log.Timber
import java.util.concurrent.CountDownLatch
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
/**
* Ref:
@@ -202,10 +207,18 @@ class UnwedgingTest : InstrumentedTest {
// It's a trick to force key request on fail to decrypt
mTestHelper.doSync<Unit> {
bobSession.cryptoService().crossSigningService()
.initializeCrossSigning(UserPasswordAuth(
user = bobSession.myUserId,
password = TestConstants.PASSWORD
), it)
.initializeCrossSigning(
object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(
UserPasswordAuth(
user = bobSession.myUserId,
password = TestConstants.PASSWORD,
session = flowResponse.session
)
)
}
}, it)
}
// Wait until we received back the key

View File

@@ -17,14 +17,6 @@
package org.matrix.android.sdk.internal.crypto.crosssigning
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.CryptoTestHelper
import org.matrix.android.sdk.common.SessionTestParams
import org.matrix.android.sdk.common.TestConstants
import org.matrix.android.sdk.internal.crypto.model.CryptoDeviceInfo
import org.matrix.android.sdk.internal.crypto.model.MXUsersDevicesMap
import org.matrix.android.sdk.internal.crypto.model.rest.UserPasswordAuth
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
@@ -35,6 +27,19 @@ import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.auth.UIABaseAuth
import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor
import org.matrix.android.sdk.api.auth.UserPasswordAuth
import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse
import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.CryptoTestHelper
import org.matrix.android.sdk.common.SessionTestParams
import org.matrix.android.sdk.common.TestConstants
import org.matrix.android.sdk.internal.crypto.model.CryptoDeviceInfo
import org.matrix.android.sdk.internal.crypto.model.MXUsersDevicesMap
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@@ -49,10 +54,17 @@ class XSigningTest : InstrumentedTest {
mTestHelper.doSync<Unit> {
aliceSession.cryptoService().crossSigningService()
.initializeCrossSigning(UserPasswordAuth(
user = aliceSession.myUserId,
password = TestConstants.PASSWORD
), it)
.initializeCrossSigning(object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(
UserPasswordAuth(
user = aliceSession.myUserId,
password = TestConstants.PASSWORD,
session = flowResponse.session
)
)
}
}, it)
}
val myCrossSigningKeys = aliceSession.cryptoService().crossSigningService().getMyCrossSigningKeys()
@@ -86,8 +98,18 @@ class XSigningTest : InstrumentedTest {
password = TestConstants.PASSWORD
)
mTestHelper.doSync<Unit> { aliceSession.cryptoService().crossSigningService().initializeCrossSigning(aliceAuthParams, it) }
mTestHelper.doSync<Unit> { bobSession.cryptoService().crossSigningService().initializeCrossSigning(bobAuthParams, it) }
mTestHelper.doSync<Unit> {
aliceSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(aliceAuthParams)
}
}, it)
}
mTestHelper.doSync<Unit> { bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(bobAuthParams)
}
}, it) }
// Check that alice can see bob keys
mTestHelper.doSync<MXUsersDevicesMap<CryptoDeviceInfo>> { aliceSession.cryptoService().downloadKeys(listOf(bobSession.myUserId), true, it) }
@@ -122,8 +144,16 @@ class XSigningTest : InstrumentedTest {
password = TestConstants.PASSWORD
)
mTestHelper.doSync<Unit> { aliceSession.cryptoService().crossSigningService().initializeCrossSigning(aliceAuthParams, it) }
mTestHelper.doSync<Unit> { bobSession.cryptoService().crossSigningService().initializeCrossSigning(bobAuthParams, it) }
mTestHelper.doSync<Unit> { aliceSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(aliceAuthParams)
}
}, it) }
mTestHelper.doSync<Unit> { bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(bobAuthParams)
}
}, it) }
// Check that alice can see bob keys
val bobUserId = bobSession.myUserId

View File

@@ -17,13 +17,13 @@
package org.matrix.android.sdk.internal.crypto.encryption
import androidx.test.ext.junit.runners.AndroidJUnit4
import kotlinx.coroutines.runBlocking
import org.amshove.kluent.shouldBe
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.NoOpMatrixCallback
import org.matrix.android.sdk.api.session.events.model.EventType
import org.matrix.android.sdk.api.session.events.model.toContent
import org.matrix.android.sdk.api.session.room.Room
@@ -57,13 +57,14 @@ class EncryptionTest : InstrumentedTest {
@Test
fun test_EncryptionStateEvent() {
performTest(roomShouldBeEncrypted = true) { room ->
// Send an encryption Event as a State Event
room.sendStateEvent(
eventType = EventType.STATE_ROOM_ENCRYPTION,
stateKey = null,
body = EncryptionEventContent(algorithm = MXCRYPTO_ALGORITHM_MEGOLM).toContent(),
callback = NoOpMatrixCallback()
)
runBlocking {
// Send an encryption Event as a State Event
room.sendStateEvent(
eventType = EventType.STATE_ROOM_ENCRYPTION,
stateKey = null,
body = EncryptionEventContent(algorithm = MXCRYPTO_ALGORITHM_MEGOLM).toContent()
)
}
}
}

View File

@@ -18,7 +18,21 @@ package org.matrix.android.sdk.internal.crypto.gossiping
import android.util.Log
import androidx.test.ext.junit.runners.AndroidJUnit4
import junit.framework.TestCase.assertEquals
import junit.framework.TestCase.assertNotNull
import junit.framework.TestCase.assertTrue
import junit.framework.TestCase.fail
import org.junit.Assert
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.auth.UIABaseAuth
import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor
import org.matrix.android.sdk.api.auth.UserPasswordAuth
import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse
import org.matrix.android.sdk.api.extensions.tryOrNull
import org.matrix.android.sdk.api.session.crypto.verification.IncomingSasVerificationTransaction
import org.matrix.android.sdk.api.session.crypto.verification.SasVerificationTransaction
import org.matrix.android.sdk.api.session.crypto.verification.VerificationMethod
@@ -28,6 +42,7 @@ import org.matrix.android.sdk.api.session.crypto.verification.VerificationTxStat
import org.matrix.android.sdk.api.session.events.model.toModel
import org.matrix.android.sdk.api.session.room.model.RoomDirectoryVisibility
import org.matrix.android.sdk.api.session.room.model.create.CreateRoomParams
import org.matrix.android.sdk.api.session.room.model.message.MessageContent
import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.CryptoTestHelper
import org.matrix.android.sdk.common.SessionTestParams
@@ -40,17 +55,9 @@ import org.matrix.android.sdk.internal.crypto.keysbackup.model.rest.KeysVersion
import org.matrix.android.sdk.internal.crypto.model.CryptoDeviceInfo
import org.matrix.android.sdk.internal.crypto.model.MXUsersDevicesMap
import org.matrix.android.sdk.internal.crypto.model.event.EncryptedEventContent
import org.matrix.android.sdk.internal.crypto.model.rest.UserPasswordAuth
import junit.framework.TestCase.assertEquals
import junit.framework.TestCase.assertNotNull
import junit.framework.TestCase.assertTrue
import junit.framework.TestCase.fail
import org.junit.Assert
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import java.util.concurrent.CountDownLatch
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
@@ -198,10 +205,17 @@ class KeyShareTests : InstrumentedTest {
mTestHelper.doSync<Unit> {
aliceSession1.cryptoService().crossSigningService()
.initializeCrossSigning(UserPasswordAuth(
user = aliceSession1.myUserId,
password = TestConstants.PASSWORD
), it)
.initializeCrossSigning(
object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(
UserPasswordAuth(
user = aliceSession1.myUserId,
password = TestConstants.PASSWORD
)
)
}
}, it)
}
// Also bootstrap keybackup on first session
@@ -296,4 +310,93 @@ class KeyShareTests : InstrumentedTest {
mTestHelper.signOutAndClose(aliceSession1)
mTestHelper.signOutAndClose(aliceSession2)
}
@Test
fun test_ImproperKeyShareBug() {
val aliceSession = mTestHelper.createAccount(TestConstants.USER_ALICE, SessionTestParams(true))
mTestHelper.doSync<Unit> {
aliceSession.cryptoService().crossSigningService()
.initializeCrossSigning(
object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(
UserPasswordAuth(
user = aliceSession.myUserId,
password = TestConstants.PASSWORD,
session = flowResponse.session
)
)
}
}, it)
}
// Create an encrypted room and send a couple of messages
val roomId = mTestHelper.doSync<String> {
aliceSession.createRoom(
CreateRoomParams().apply {
visibility = RoomDirectoryVisibility.PRIVATE
enableEncryption()
},
it
)
}
val roomAlicePov = aliceSession.getRoom(roomId)
assertNotNull(roomAlicePov)
Thread.sleep(1_000)
assertTrue(roomAlicePov?.isEncrypted() == true)
val secondEventId = mTestHelper.sendTextMessage(roomAlicePov!!, "Message", 3)[1].eventId
// Create bob session
val bobSession = mTestHelper.createAccount(TestConstants.USER_BOB, SessionTestParams(true))
mTestHelper.doSync<Unit> {
bobSession.cryptoService().crossSigningService()
.initializeCrossSigning(
object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(
UserPasswordAuth(
user = bobSession.myUserId,
password = TestConstants.PASSWORD,
session = flowResponse.session
)
)
}
}, it)
}
// Let alice invite bob
mTestHelper.doSync<Unit> {
roomAlicePov.invite(bobSession.myUserId, null, it)
}
mTestHelper.doSync<Unit> {
bobSession.joinRoom(roomAlicePov.roomId, null, emptyList(), it)
}
// we want to discard alice outbound session
aliceSession.cryptoService().discardOutboundSession(roomAlicePov.roomId)
// and now resend a new message to reset index to 0
mTestHelper.sendTextMessage(roomAlicePov, "After", 1)
val roomRoomBobPov = aliceSession.getRoom(roomId)
val beforeJoin = roomRoomBobPov!!.getTimeLineEvent(secondEventId)
var dRes = tryOrNull { bobSession.cryptoService().decryptEvent(beforeJoin!!.root, "") }
assert(dRes == null)
// Try to re-ask the keys
bobSession.cryptoService().reRequestRoomKeyForEvent(beforeJoin!!.root)
Thread.sleep(3_000)
// With the bug the first session would have improperly reshare that key :/
dRes = tryOrNull { bobSession.cryptoService().decryptEvent(beforeJoin.root, "") }
Log.d("#TEST", "KS: sgould not decrypt that ${beforeJoin.root.getClearContent().toModel<MessageContent>()?.body}")
assert(dRes?.clearEvent == null)
}
}

View File

@@ -264,7 +264,7 @@ class KeysBackupTest : InstrumentedTest {
assertNotNull(decryption)
// - Check decryptKeyBackupData() returns stg
val sessionData = keysBackup
.decryptKeyBackupData(keyBackupData!!,
.decryptKeyBackupData(keyBackupData,
session.olmInboundGroupSession!!.sessionIdentifier(),
cryptoTestData.roomId,
decryption!!)

View File

@@ -111,7 +111,7 @@ class KeysBackupTestHelper(
Assert.assertTrue(keysBackup.isEnabled)
stateObserver.stopAndCheckStates(null)
return PrepareKeysBackupDataResult(megolmBackupCreationInfo, keysVersion.version!!)
return PrepareKeysBackupDataResult(megolmBackupCreationInfo, keysVersion.version)
}
/**

View File

@@ -17,20 +17,25 @@
package org.matrix.android.sdk.internal.crypto.verification.qrcode
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.session.crypto.verification.VerificationMethod
import org.matrix.android.sdk.api.session.crypto.verification.VerificationService
import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.CryptoTestHelper
import org.matrix.android.sdk.common.TestConstants
import org.matrix.android.sdk.internal.crypto.model.rest.UserPasswordAuth
import org.matrix.android.sdk.api.session.crypto.verification.PendingVerificationRequest
import org.amshove.kluent.shouldBe
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.auth.UIABaseAuth
import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor
import org.matrix.android.sdk.api.auth.UserPasswordAuth
import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse
import org.matrix.android.sdk.api.session.crypto.verification.PendingVerificationRequest
import org.matrix.android.sdk.api.session.crypto.verification.VerificationMethod
import org.matrix.android.sdk.api.session.crypto.verification.VerificationService
import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.CryptoTestHelper
import org.matrix.android.sdk.common.TestConstants
import java.util.concurrent.CountDownLatch
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
@@ -157,18 +162,34 @@ class VerificationTest : InstrumentedTest {
mTestHelper.doSync<Unit> { callback ->
aliceSession.cryptoService().crossSigningService()
.initializeCrossSigning(UserPasswordAuth(
user = aliceSession.myUserId,
password = TestConstants.PASSWORD
), callback)
.initializeCrossSigning(
object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(
UserPasswordAuth(
user = aliceSession.myUserId,
password = TestConstants.PASSWORD,
session = flowResponse.session
)
)
}
}, callback)
}
mTestHelper.doSync<Unit> { callback ->
bobSession.cryptoService().crossSigningService()
.initializeCrossSigning(UserPasswordAuth(
user = bobSession.myUserId,
password = TestConstants.PASSWORD
), callback)
.initializeCrossSigning(
object : UserInteractiveAuthInterceptor {
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
promise.resume(
UserPasswordAuth(
user = bobSession.myUserId,
password = TestConstants.PASSWORD,
session = flowResponse.session
)
)
}
}, callback)
}
val aliceVerificationService = aliceSession.cryptoService().verificationService()

View File

@@ -0,0 +1,133 @@
/*
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* 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 org.matrix.android.sdk.internal.session.media
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.amshove.kluent.shouldBeEqualTo
import org.junit.Test
import org.junit.runner.RunWith
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.events.model.EventType
import org.matrix.android.sdk.api.session.events.model.toContent
import org.matrix.android.sdk.api.session.room.model.message.MessageTextContent
import org.matrix.android.sdk.api.session.room.model.message.MessageType
import org.matrix.android.sdk.api.session.room.sender.SenderInfo
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
@RunWith(AndroidJUnit4::class)
internal class UrlsExtractorTest : InstrumentedTest {
private val urlsExtractor = UrlsExtractor()
@Test
fun wrongEventTypeTest() {
createEvent(body = "https://matrix.org")
.copy(type = EventType.STATE_ROOM_GUEST_ACCESS)
.toFakeTimelineEvent()
.let { urlsExtractor.extract(it) }
.size shouldBeEqualTo 0
}
@Test
fun oneUrlTest() {
createEvent(body = "https://matrix.org")
.toFakeTimelineEvent()
.let { urlsExtractor.extract(it) }
.let { result ->
result.size shouldBeEqualTo 1
result[0] shouldBeEqualTo "https://matrix.org"
}
}
@Test
fun withoutProtocolTest() {
createEvent(body = "www.matrix.org")
.toFakeTimelineEvent()
.let { urlsExtractor.extract(it) }
.size shouldBeEqualTo 0
}
@Test
fun oneUrlWithParamTest() {
createEvent(body = "https://matrix.org?foo=bar")
.toFakeTimelineEvent()
.let { urlsExtractor.extract(it) }
.let { result ->
result.size shouldBeEqualTo 1
result[0] shouldBeEqualTo "https://matrix.org?foo=bar"
}
}
@Test
fun oneUrlWithParamsTest() {
createEvent(body = "https://matrix.org?foo=bar&bar=foo")
.toFakeTimelineEvent()
.let { urlsExtractor.extract(it) }
.let { result ->
result.size shouldBeEqualTo 1
result[0] shouldBeEqualTo "https://matrix.org?foo=bar&bar=foo"
}
}
@Test
fun oneUrlInlinedTest() {
createEvent(body = "Hello https://matrix.org, how are you?")
.toFakeTimelineEvent()
.let { urlsExtractor.extract(it) }
.let { result ->
result.size shouldBeEqualTo 1
result[0] shouldBeEqualTo "https://matrix.org"
}
}
@Test
fun twoUrlsTest() {
createEvent(body = "https://matrix.org https://example.org")
.toFakeTimelineEvent()
.let { urlsExtractor.extract(it) }
.let { result ->
result.size shouldBeEqualTo 2
result[0] shouldBeEqualTo "https://matrix.org"
result[1] shouldBeEqualTo "https://example.org"
}
}
private fun createEvent(body: String): Event = Event(
eventId = "!fake",
type = EventType.MESSAGE,
content = MessageTextContent(
msgType = MessageType.MSGTYPE_TEXT,
body = body
).toContent()
)
private fun Event.toFakeTimelineEvent(): TimelineEvent {
return TimelineEvent(
root = this,
localId = 0L,
eventId = eventId!!,
displayIndex = 0,
senderInfo = SenderInfo(
userId = "",
displayName = null,
isUniqueDisplayName = true,
avatarUrl = null
)
)
}
}

View File

@@ -66,8 +66,8 @@ class TimelineForwardPaginationTest : InstrumentedTest {
numberOfMessagesToSend)
// Alice clear the cache
commonTestHelper.doSync<Unit> {
aliceSession.clearCache(it)
commonTestHelper.runBlockingTest {
aliceSession.clearCache()
}
// And restarts the sync

View File

@@ -0,0 +1,92 @@
/*
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* 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 org.matrix.android.sdk.session.room.timeline
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.junit.runners.MethodSorters
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.extensions.orFalse
import org.matrix.android.sdk.api.session.events.model.toModel
import org.matrix.android.sdk.api.session.room.model.message.MessageContent
import org.matrix.android.sdk.api.session.room.timeline.TimelineSettings
import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.CryptoTestHelper
import java.util.concurrent.CountDownLatch
import kotlin.test.fail
@RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
class TimelineWithManyMembersTest : InstrumentedTest {
companion object {
private const val NUMBER_OF_MEMBERS = 6
}
private val commonTestHelper = CommonTestHelper(context())
private val cryptoTestHelper = CryptoTestHelper(commonTestHelper)
/**
* Ensures when someone sends a message to a crowded room, everyone can decrypt the message.
*/
@Test
fun everyone_should_decrypt_message_in_a_crowded_room() {
val cryptoTestData = cryptoTestHelper.doE2ETestWithManyMembers(NUMBER_OF_MEMBERS)
val sessionForFirstMember = cryptoTestData.firstSession
val roomForFirstMember = sessionForFirstMember.getRoom(cryptoTestData.roomId)!!
val firstMessage = "First messages from Alice"
commonTestHelper.sendTextMessage(
roomForFirstMember,
firstMessage,
1,
600_000
)
for (index in 1 until cryptoTestData.sessions.size) {
val session = cryptoTestData.sessions[index]
val roomForCurrentMember = session.getRoom(cryptoTestData.roomId)!!
val timelineForCurrentMember = roomForCurrentMember.createTimeline(null, TimelineSettings(30))
timelineForCurrentMember.start()
session.startSync(true)
run {
val lock = CountDownLatch(1)
val eventsListener = commonTestHelper.createEventListener(lock) { snapshot ->
snapshot
.find { it.isEncrypted() }
?.let {
val body = it.root.getClearContent()?.toModel<MessageContent>()?.body
if (body?.startsWith(firstMessage).orFalse()) {
println("User " + session.myUserId + " decrypted as " + body)
return@createEventListener true
} else {
fail("User " + session.myUserId + " decrypted as " + body + " CryptoError: " + it.root.mCryptoError)
}
} ?: return@createEventListener false
}
timelineForCurrentMember.addListener(eventsListener)
commonTestHelper.await(lock, 600_000)
}
session.stopSync()
}
}
}

View File

@@ -17,7 +17,6 @@
package org.matrix.android.sdk.internal.network.interceptors
import androidx.annotation.NonNull
import org.matrix.android.sdk.BuildConfig
import okhttp3.logging.HttpLoggingInterceptor
import org.json.JSONArray
import org.json.JSONException
@@ -38,31 +37,28 @@ class FormattedJsonHttpLogger : HttpLoggingInterceptor.Logger {
*/
@Synchronized
override fun log(@NonNull message: String) {
// In RELEASE there is no log, but for sure, test again BuildConfig.DEBUG
if (BuildConfig.DEBUG) {
Timber.v(message)
Timber.v(message)
if (message.startsWith("{")) {
// JSON Detected
try {
val o = JSONObject(message)
logJson(o.toString(INDENT_SPACE))
} catch (e: JSONException) {
// Finally this is not a JSON string...
Timber.e(e)
}
} else if (message.startsWith("[")) {
// JSON Array detected
try {
val o = JSONArray(message)
logJson(o.toString(INDENT_SPACE))
} catch (e: JSONException) {
// Finally not JSON...
Timber.e(e)
}
if (message.startsWith("{")) {
// JSON Detected
try {
val o = JSONObject(message)
logJson(o.toString(INDENT_SPACE))
} catch (e: JSONException) {
// Finally this is not a JSON string...
Timber.e(e)
}
} else if (message.startsWith("[")) {
// JSON Array detected
try {
val o = JSONArray(message)
logJson(o.toString(INDENT_SPACE))
} catch (e: JSONException) {
// Finally not JSON...
Timber.e(e)
}
// Else not a json string to log
}
// Else not a json string to log
}
private fun logJson(formattedJson: String) {

View File

@@ -23,6 +23,7 @@ import androidx.work.WorkManager
import com.zhuinden.monarchy.Monarchy
import org.matrix.android.sdk.BuildConfig
import org.matrix.android.sdk.api.auth.AuthenticationService
import org.matrix.android.sdk.api.auth.HomeServerHistoryService
import org.matrix.android.sdk.api.legacy.LegacySessionImporter
import org.matrix.android.sdk.api.raw.RawService
import org.matrix.android.sdk.internal.SessionManager
@@ -47,6 +48,7 @@ class Matrix private constructor(context: Context, matrixConfiguration: MatrixCo
@Inject internal lateinit var backgroundDetectionObserver: BackgroundDetectionObserver
@Inject internal lateinit var olmManager: OlmManager
@Inject internal lateinit var sessionManager: SessionManager
@Inject internal lateinit var homeServerHistoryService: HomeServerHistoryService
init {
Monarchy.init(context)
@@ -65,6 +67,8 @@ class Matrix private constructor(context: Context, matrixConfiguration: MatrixCo
fun rawService() = rawService
fun homeServerHistoryService() = homeServerHistoryService
fun legacySessionImporter(): LegacySessionImporter {
return legacySessionImporter
}

View File

@@ -41,6 +41,16 @@ interface AuthenticationService {
*/
fun getLoginFlowOfSession(sessionId: String, callback: MatrixCallback<LoginFlowResult>): Cancelable
/**
* Get a SSO url
*/
fun getSsoUrl(redirectUrl: String, deviceId: String?, providerId: String?): String?
/**
* Get the sign in or sign up fallback URL
*/
fun getFallbackUrl(forSignIn: Boolean, deviceId: String?): String?
/**
* Return a LoginWizard, to login to the homeserver. The login flow has to be retrieved first.
*/

View File

@@ -14,18 +14,16 @@
* limitations under the License.
*/
package org.matrix.android.sdk.internal.eventbus
package org.matrix.android.sdk.api.auth
import org.greenrobot.eventbus.Logger
import timber.log.Timber
import java.util.logging.Level
/**
* A simple service to remember homeservers you already connected to.
*/
interface HomeServerHistoryService {
class EventBusTimberLogger : Logger {
override fun log(level: Level, msg: String) {
Timber.d(msg)
}
fun getKnownServersUrls(): List<String>
override fun log(level: Level, msg: String, th: Throwable) {
Timber.e(th, msg)
}
fun addHomeServerToHistory(url: String)
fun clearHistory()
}

View File

@@ -0,0 +1,69 @@
/*
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* 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 org.matrix.android.sdk.api.auth
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import org.matrix.android.sdk.api.auth.data.LoginFlowTypes
/**
* This class provides the authentication data by using user and password
*/
@JsonClass(generateAdapter = true)
data class TokenBasedAuth(
/**
* This is a session identifier that the client must pass back to the homeserver,
* if one is provided, in subsequent attempts to authenticate in the same API call.
*/
@Json(name = "session")
override val session: String? = null,
/**
* A client may receive a login token via some external service, such as email or SMS.
* Note that a login token is separate from an access token, the latter providing general authentication to various API endpoints.
*/
@Json(name = "token")
val token: String? = null,
/**
* The txn_id should be a random string generated by the client for the request.
* The same txn_id should be used if retrying the request.
* The txn_id may be used by the server to disallow other devices from using the token,
* thus providing "single use" tokens while still allowing the device to retry the request.
* This would be done by tying the token to the txn_id server side, as well as potentially invalidating
* the token completely once the device has successfully logged in
* (e.g. when we receive a request from the newly provisioned access_token).
*/
@Json(name = "txn_id")
val transactionId: String? = null,
// registration information
@Json(name = "type")
val type: String? = LoginFlowTypes.TOKEN
) : UIABaseAuth {
override fun hasAuthInfo() = token != null
override fun copyWithSession(session: String) = this.copy(session = session)
override fun asMap(): Map<String, *> = mapOf(
"session" to session,
"token" to token,
"transactionId" to transactionId,
"type" to type
)
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* 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 org.matrix.android.sdk.api.auth
interface UIABaseAuth {
/**
* This is a session identifier that the client must pass back to the homeserver,
* if one is provided, in subsequent attempts to authenticate in the same API call.
*/
val session: String?
fun hasAuthInfo(): Boolean
fun copyWithSession(session: String): UIABaseAuth
fun asMap() : Map<String, *>
}

View File

@@ -0,0 +1,47 @@
/*
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* 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 org.matrix.android.sdk.api.auth
import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse
import kotlin.coroutines.Continuation
/**
* Some API endpoints require authentication that interacts with the user.
* The homeserver may provide many different ways of authenticating, such as user/password auth, login via a social network (OAuth2),
* login by confirming a token sent to their email address, etc.
*
* The process takes the form of one or more 'stages'.
* At each stage the client submits a set of data for a given authentication type and awaits a response from the server,
* which will either be a final success or a request to perform an additional stage.
* This exchange continues until the final success.
*
* For each endpoint, a server offers one or more 'flows' that the client can use to authenticate itself.
* Each flow comprises a series of stages, as described above.
* The client is free to choose which flow it follows, however the flow's stages must be completed in order.
* Failing to follow the flows in order must result in an HTTP 401 response.
* When all stages in a flow are complete, authentication is complete and the API call succeeds.
*/
interface UserInteractiveAuthInterceptor {
/**
* When the API needs additional auth, this will be called.
* Implementation should check the flows from flow response and act accordingly.
* Updated auth should be provided using promise.resume, this allow implementation to perform
* an async operation (prompt for user password, open sso fallback) and then resume initial API call when done.
*/
fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>)
}

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.internal.crypto.model.rest
package org.matrix.android.sdk.api.auth
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@@ -27,7 +27,7 @@ data class UserPasswordAuth(
// device device session id
@Json(name = "session")
val session: String? = null,
override val session: String? = null,
// registration information
@Json(name = "type")
@@ -38,4 +38,16 @@ data class UserPasswordAuth(
@Json(name = "password")
val password: String? = null
)
) : UIABaseAuth {
override fun hasAuthInfo() = password != null
override fun copyWithSession(session: String) = this.copy(session = session)
override fun asMap(): Map<String, *> = mapOf(
"session" to session,
"user" to user,
"password" to password,
"type" to type
)
}

View File

@@ -19,6 +19,7 @@ package org.matrix.android.sdk.api.auth.data
sealed class LoginFlowResult {
data class Success(
val supportedLoginTypes: List<String>,
val ssoIdentityProviders: List<SsoIdentityProvider>?,
val isLoginAndRegistrationSupported: Boolean,
val homeServerUrl: String,
val isOutdatedHomeserver: Boolean

View File

@@ -0,0 +1,61 @@
/*
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* 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 org.matrix.android.sdk.api.auth.data
import android.os.Parcelable
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import kotlinx.parcelize.Parcelize
@JsonClass(generateAdapter = true)
@Parcelize
data class SsoIdentityProvider(
/**
* The id field would be opaque with the accepted characters matching unreserved URI characters as defined in RFC3986
* - this was chosen to avoid having to encode special characters in the URL. Max length 128.
*/
@Json(name = "id") val id: String,
/**
* The name field should be the human readable string intended for printing by the client.
*/
@Json(name = "name") val name: String?,
/**
* The icon field is the only optional field and should point to an icon representing the IdP.
* If present then it must be an HTTPS URL to an image resource.
* This should be hosted by the homeserver service provider to not leak the client's IP address unnecessarily.
*/
@Json(name = "icon") val iconUrl: String?,
/**
* The `brand` field is **optional**. It allows the client to style the login
* button to suit a particular brand. It should be a string matching the
* "Common namespaced identifier grammar" as defined in
* [MSC2758](https://github.com/matrix-org/matrix-doc/pull/2758).
*/
@Json(name = "brand") val brand: String?
) : Parcelable {
companion object {
const val BRAND_GOOGLE = "org.matrix.google"
const val BRAND_GITHUB = "org.matrix.github"
const val BRAND_APPLE = "org.matrix.apple"
const val BRAND_FACEBOOK = "org.matrix.facebook"
const val BRAND_TWITTER = "org.matrix.twitter"
const val BRAND_GITLAB = "org.matrix.gitlab"
}
}

View File

@@ -14,14 +14,11 @@
* limitations under the License.
*/
package org.matrix.android.sdk.internal.auth.registration
package org.matrix.android.sdk.api.auth.registration
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import org.matrix.android.sdk.api.auth.data.LoginFlowTypes
import org.matrix.android.sdk.api.auth.registration.FlowResult
import org.matrix.android.sdk.api.auth.registration.Stage
import org.matrix.android.sdk.api.auth.registration.TermPolicies
import org.matrix.android.sdk.api.util.JsonDict
import org.matrix.android.sdk.internal.auth.data.InteractiveAuthenticationFlow
@@ -51,6 +48,18 @@ data class RegistrationFlowResponse(
* The information that the client will need to know in order to use a given type of authentication.
* For each login stage type presented, that type may be present as a key in this dictionary.
* For example, the public key of reCAPTCHA stage could be given here.
* other example
* "params": {
* "m.login.sso": {
* "identity_providers": [
* {
* "id": "google",
* "name": "Google",
* "icon": "https://..."
* }
* ]
* }
* }
*/
@Json(name = "params")
val params: JsonDict? = null
@@ -97,3 +106,8 @@ fun RegistrationFlowResponse.toFlowResult(): FlowResult {
return FlowResult(missingStage, completedStage)
}
fun RegistrationFlowResponse.nextUncompletedStage(flowIndex: Int = 0): String? {
val completed = completedStages ?: emptyList()
return flows?.getOrNull(flowIndex)?.stages?.firstOrNull { completed.contains(it).not() }
}

View File

@@ -14,16 +14,16 @@
* limitations under the License.
*/
package org.matrix.android.sdk.api.raw
package org.matrix.android.sdk.api.cache
sealed class RawCacheStrategy {
sealed class CacheStrategy {
// Data is always fetched from the server
object NoCache : RawCacheStrategy()
object NoCache : CacheStrategy()
// Once data is retrieved, it is stored for the provided amount of time.
// In case of error, and if strict is set to false, the cache can be returned if available
data class TtlCache(val validityDurationInMillis: Long, val strict: Boolean) : RawCacheStrategy()
data class TtlCache(val validityDurationInMillis: Long, val strict: Boolean) : CacheStrategy()
// Once retrieved, the data is stored in cache and will be always get from the cache
object InfiniteCache : RawCacheStrategy()
object InfiniteCache : CacheStrategy()
}

View File

@@ -16,8 +16,8 @@
package org.matrix.android.sdk.api.failure
import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse
import org.matrix.android.sdk.api.extensions.tryOrNull
import org.matrix.android.sdk.internal.auth.registration.RegistrationFlowResponse
import org.matrix.android.sdk.internal.di.MoshiProvider
import java.io.IOException
import javax.net.ssl.HttpsURLConnection
@@ -43,6 +43,12 @@ fun Throwable.isInvalidPassword(): Boolean {
&& error.message == "Invalid password"
}
fun Throwable.isInvalidUIAAuth(): Boolean {
return this is Failure.ServerError
&& error.code == MatrixError.M_FORBIDDEN
&& error.flows != null
}
/**
* Try to convert to a RegistrationFlowResponse. Return null in the cases it's not possible
*/
@@ -53,6 +59,16 @@ fun Throwable.toRegistrationFlowResponse(): RegistrationFlowResponse? {
.adapter(RegistrationFlowResponse::class.java)
.fromJson(this.errorBody)
}
} else if (this is Failure.ServerError && this.httpCode == 401 && this.error.code == MatrixError.M_FORBIDDEN) {
// This happens when the submission for this stage was bad (like bad password)
if (this.error.session != null && this.error.flows != null) {
RegistrationFlowResponse(
flows = this.error.flows,
session = this.error.session,
completedStages = this.error.completedStages,
params = this.error.params
)
} else null
} else {
null
}

View File

@@ -16,8 +16,8 @@
package org.matrix.android.sdk.api.failure
import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse
import org.matrix.android.sdk.api.session.crypto.MXCryptoError
import org.matrix.android.sdk.internal.auth.registration.RegistrationFlowResponse
import org.matrix.android.sdk.internal.network.ssl.Fingerprint
import java.io.IOException

View File

@@ -18,6 +18,8 @@ package org.matrix.android.sdk.api.failure
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import org.matrix.android.sdk.api.util.JsonDict
import org.matrix.android.sdk.internal.auth.data.InteractiveAuthenticationFlow
/**
* This data class holds the error defined by the matrix specifications.
@@ -42,7 +44,17 @@ data class MatrixError(
@Json(name = "soft_logout") val isSoftLogout: Boolean = false,
// For M_INVALID_PEPPER
// {"error": "pepper does not match 'erZvr'", "lookup_pepper": "pQgMS", "algorithm": "sha256", "errcode": "M_INVALID_PEPPER"}
@Json(name = "lookup_pepper") val newLookupPepper: String? = null
@Json(name = "lookup_pepper") val newLookupPepper: String? = null,
// For M_FORBIDDEN UIA
@Json(name = "session")
val session: String? = null,
@Json(name = "completed")
val completedStages: List<String>? = null,
@Json(name = "flows")
val flows: List<InteractiveAuthenticationFlow>? = null,
@Json(name = "params")
val params: JsonDict? = null
) {
companion object {

View File

@@ -37,6 +37,6 @@ class SenderNotificationPermissionCondition(
fun isSatisfied(event: Event, powerLevels: PowerLevelsContent): Boolean {
val powerLevelsHelper = PowerLevelsHelper(powerLevels)
return event.senderId != null && powerLevelsHelper.getUserPowerLevelValue(event.senderId) >= powerLevelsHelper.notificationLevel(key)
return event.senderId != null && powerLevelsHelper.getUserPowerLevelValue(event.senderId) >= powerLevels.notificationLevel(key)
}
}

View File

@@ -16,6 +16,8 @@
package org.matrix.android.sdk.api.raw
import org.matrix.android.sdk.api.cache.CacheStrategy
/**
* Useful methods to fetch raw data from the server. The access token will not be used to fetched the data
*/
@@ -23,7 +25,7 @@ interface RawService {
/**
* Get a URL, either from cache or from the remote server, depending on the cache strategy
*/
suspend fun getUrl(url: String, rawCacheStrategy: RawCacheStrategy): String
suspend fun getUrl(url: String, cacheStrategy: CacheStrategy): String
/**
* Specific case for the well-known file. Cache validity is 8 hours

View File

@@ -35,6 +35,7 @@ import org.matrix.android.sdk.api.session.group.GroupService
import org.matrix.android.sdk.api.session.homeserver.HomeServerCapabilitiesService
import org.matrix.android.sdk.api.session.identity.IdentityService
import org.matrix.android.sdk.api.session.integrationmanager.IntegrationManagerService
import org.matrix.android.sdk.api.session.media.MediaService
import org.matrix.android.sdk.api.session.permalinks.PermalinkService
import org.matrix.android.sdk.api.session.profile.ProfileService
import org.matrix.android.sdk.api.session.pushers.PushersService
@@ -181,6 +182,11 @@ interface Session :
*/
fun widgetService(): WidgetService
/**
* Returns the media service associated with the session
*/
fun mediaService(): MediaService
/**
* Returns the integration manager service associated with the session
*/
@@ -239,6 +245,8 @@ interface Session :
val sharedSecretStorageService: SharedSecretStorageService
fun getUiaSsoFallbackUrl(authenticationSessionId: String): String
/**
* Maintenance API, allows to print outs info on DB size to logcat
*/

View File

@@ -16,6 +16,8 @@
package org.matrix.android.sdk.api.session.account
import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor
/**
* This interface defines methods to manage the account. It's implemented at the session level.
*/
@@ -43,5 +45,5 @@ interface AccountService {
* @param eraseAllData set to true to forget all messages that have been sent. Warning: this will cause future users to see
* an incomplete view of conversations
*/
suspend fun deactivateAccount(password: String, eraseAllData: Boolean)
suspend fun deactivateAccount(userInteractiveAuthInterceptor: UserInteractiveAuthInterceptor, eraseAllData: Boolean)
}

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