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

Compare commits

...

271 Commits

Author SHA1 Message Date
Benoit Marty
e9a668be0d Merge branch 'release/1.1.13' into main 2021-07-19 15:26:52 +02:00
Benoit Marty
60a9f6fcb8 Changelog - fastlane 2021-07-19 13:38:08 +02:00
Benoit Marty
1894ad21e1 Changelog 2021-07-19 13:36:34 +02:00
Benoit Marty
9f631768eb Avoid crash in debug app 2021-07-19 13:34:51 +02:00
Benoit Marty
2f6d2cfe09 Avoid crash in debug app 2021-07-19 13:31:09 +02:00
Benoit Marty
c21625079e Improve the template 2021-07-19 12:34:44 +02:00
Benoit Marty
6d8262077d Merge pull request #3698 from RiotTranslateBot/weblate-element-android-element-app
Translations update from Weblate
2021-07-19 11:29:47 +02:00
Weblate
9b829ddd04 Merge branch 'origin/develop' into Weblate. 2021-07-19 08:08:18 +00:00
Benoit Marty
f51769174d bundle update fastlane 2021-07-19 09:55:06 +02:00
Ihor Hordiichuk
5a5486c4b9 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (23 of 23 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/uk/
2021-07-17 21:25:06 +00:00
ppnplusdf0eb2eb726b4bb3
a4cb5b1d28 Translated using Weblate (Thai)
Currently translated at 12.3% (309 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/th/
2021-07-16 16:25:05 +00:00
Benoit Marty
45efb4386b Merge pull request #3668 from vector-im/dependabot/gradle/org.amshove.kluent-kluent-android-1.68
Bump kluent-android from 1.67 to 1.68
2021-07-16 18:05:45 +02:00
Benoit Marty
646dfd5029 Merge pull request #3671 from vector-im/dependabot/gradle/kotlin_version-1.5.21
Bump kotlin_version from 1.5.20 to 1.5.21
2021-07-16 15:28:59 +02:00
Benoit Marty
3116b1a1c4 Merge pull request #3680 from psrpinto/fix/naming
Standardise spelling and casing of homeserver, identity server, and integration manager
2021-07-16 15:26:50 +02:00
Paulo Pinto
8ce976549f Add entry to changelog
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
2021-07-15 16:13:12 +01:00
Paulo Pinto
5d4e71a011 Standardise casing of integration manager
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
2021-07-15 15:58:50 +01:00
Paulo Pinto
d39e14cc5c Standardise casing of homeserver
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
2021-07-15 15:58:50 +01:00
Paulo Pinto
74104d7d84 Standardise casing of identity server
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
2021-07-15 15:58:50 +01:00
Paulo Pinto
e61c8c28bb Standardise spelling and casing of homeserver
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
2021-07-15 15:58:50 +01:00
Besnik Bleta
98aec941e2 Translated using Weblate (Albanian)
Currently translated at 99.5% (2483 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sq/
2021-07-15 11:25:06 +00:00
Paulo Pinto
1dfb10d174 Translated using Weblate (Portuguese)
Currently translated at 33.8% (843 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt/
2021-07-15 11:25:05 +00:00
Benoit Marty
8757d0269f Added translation using Weblate (English (United Kingdom)) 2021-07-15 09:58:23 +00:00
dependabot[bot]
2afac82c81 Bump kotlin_version from 1.5.20 to 1.5.21
Bumps `kotlin_version` from 1.5.20 to 1.5.21.

Updates `kotlin-gradle-plugin` from 1.5.20 to 1.5.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.20...v1.5.21)

Updates `kotlin-stdlib-jdk7` from 1.5.20 to 1.5.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.20...v1.5.21)

Updates `kotlin-stdlib` from 1.5.20 to 1.5.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.20...v1.5.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk7
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-13 23:08:48 +00:00
Benoit Marty
c08bd664ab Merge pull request #3667 from vector-im/feature/bma/permission
Permission rework
2021-07-13 10:33:40 +02:00
Benoit Marty
34723ce4f7 Cleanup 2021-07-13 10:27:29 +02:00
Benoit Marty
0f27971c96 Merge pull request #3661 from SpiritCroc/emoji_reaction_top_row
Fix top row of emoji reaction picker on small displays
2021-07-13 01:10:15 +02:00
dependabot[bot]
b0ea022eea Bump kluent-android from 1.67 to 1.68
Bumps [kluent-android](https://github.com/MarkusAmshove/Kluent) from 1.67 to 1.68.
- [Release notes](https://github.com/MarkusAmshove/Kluent/releases)
- [Changelog](https://github.com/MarkusAmshove/Kluent/blob/master/CHANGELOG.md)
- [Commits](https://github.com/MarkusAmshove/Kluent/commits)

---
updated-dependencies:
- dependency-name: org.amshove.kluent:kluent-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 23:07:08 +00:00
Benoit Marty
76ab34f1a6 Cleanup 2021-07-13 00:41:26 +02:00
Benoit Marty
59e3b421bb Cleanup 2021-07-13 00:33:29 +02:00
Benoit Marty
cc042f2d7a Fail fast 2021-07-13 00:31:05 +02:00
Benoit Marty
b553ee2a76 changelog 2021-07-13 00:26:21 +02:00
Benoit Marty
067349f602 Fix some misunderstanding about the permissions request - step 2 2021-07-13 00:22:23 +02:00
Benoit Marty
80657251a5 Fix some misunderstanding about the permissions request - step 1 2021-07-12 23:47:33 +02:00
Benoit Marty
fabbd6da9e Add action to see permission status in the DebugActivity 2021-07-12 22:12:51 +02:00
Benoit Marty
cca9a8007c Use new permission request management
I do not know why all has not been migrated in the previous rework
2021-07-12 21:18:01 +02:00
SpiritCroc
9aa37dfbe9 Fix top row of emoji reaction picker on small displays
Emojis were not showing if not enough space, so allow scrolling there.
2021-07-12 17:56:58 +02:00
Benoit Marty
fbcb2ea8ae Merge pull request #3655 from SpiritCroc/unread_collapsed
Fix unread messages marker being hidden in collapsed membership item
2021-07-12 13:10:13 +02:00
Benoit Marty
219d56a4b4 Merge pull request #3660 from TheWayOfTheWarrior/patch-1
Typo in InitializeCrossSigningTask.kt
2021-07-12 12:47:58 +02:00
TheWayOfTheWarrior
995f9d87bb Typo in InitializeCrossSigningTask.kt
Typo in comment. Was "userSigningKey" instead of "selfSigningKey".
2021-07-10 22:17:17 +02:00
SpiritCroc
a52d1e4312 Add changelog.d/3655.bugfix 2021-07-10 11:07:21 +02:00
SpiritCroc
e61fc1a935 Fix unread messages marker being hidden in collapsed membership item
Scenario: the last read event in a chat is a membership change. After
that, at least two new membership changes were added, followed by normal
messages. Due to the membership changes being collapsed by default, in
this scenario the read marker would not show, since in the loop, we
would overwrite the appendReadMarker with the value for the last eventId
of the merged item, instead of showing it if any of the items matched.
2021-07-10 11:01:36 +02:00
Ali KARABAK
1888588377 Translated using Weblate (Turkish)
Currently translated at 64.2% (1603 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/tr/
2021-07-10 08:25:04 +00:00
libexus
debc3645ba Translated using Weblate (German)
Currently translated at 99.8% (2491 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-07-10 08:25:03 +00:00
Benoit Marty
910c0ff326 Merge pull request #3648 from vector-im/dependabot/gradle/com.googlecode.libphonenumber-libphonenumber-8.12.27
Bump libphonenumber from 8.12.26 to 8.12.27
2021-07-09 09:47:45 +02:00
libexus
402e3bde83 Translated using Weblate (German)
Currently translated at 99.8% (2491 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-07-08 11:39:40 +00:00
Dwaris
0545009b0a Translated using Weblate (German)
Currently translated at 99.8% (2491 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-07-08 11:39:40 +00:00
libexus
8a588abc69 Translated using Weblate (German)
Currently translated at 99.8% (2490 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-07-08 11:39:08 +00:00
Dwaris
fe81fc8f93 Translated using Weblate (German)
Currently translated at 99.8% (2490 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-07-08 11:39:08 +00:00
libexus
941735b4d3 Translated using Weblate (German)
Currently translated at 99.7% (2489 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-07-08 11:38:47 +00:00
Dwaris
5cb26fab4d Translated using Weblate (German)
Currently translated at 99.7% (2489 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-07-08 11:38:46 +00:00
libexus
1c80f0045f Translated using Weblate (German)
Currently translated at 99.7% (2488 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-07-08 11:38:24 +00:00
Dwaris
1346fd3077 Translated using Weblate (German)
Currently translated at 99.7% (2488 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-07-08 11:38:23 +00:00
HelaBasa
14dcd8a875 Translated using Weblate (Sinhala)
Currently translated at 0.2% (6 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/si/
2021-07-08 10:35:00 +00:00
libexus
05643e522a Translated using Weblate (German)
Currently translated at 100.0% (23 of 23 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/de/
2021-07-08 10:35:00 +00:00
Joe Sagawa
a1d5501215 Translated using Weblate (Japanese)
Currently translated at 62.9% (1570 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ja/
2021-07-08 10:34:59 +00:00
libexus
c6e6fc7ecb Translated using Weblate (German)
Currently translated at 99.7% (2487 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-07-08 10:34:50 +00:00
Benoit Marty
2948f03978 Merge pull request #3551 from vector-im/feature/bca/room_upgrade
Feature/bca/room upgrade
2021-07-08 10:00:01 +02:00
dependabot[bot]
76890a3b26 Bump libphonenumber from 8.12.26 to 8.12.27
Bumps [libphonenumber](https://github.com/google/libphonenumber) from 8.12.26 to 8.12.27.
- [Release notes](https://github.com/google/libphonenumber/releases)
- [Changelog](https://github.com/google/libphonenumber/blob/master/making-metadata-changes.md)
- [Commits](https://github.com/google/libphonenumber/compare/v8.12.26...v8.12.27)

---
updated-dependencies:
- dependency-name: com.googlecode.libphonenumber:libphonenumber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-07 23:06:17 +00:00
Benoit Marty
5bbb45de68 Merge pull request #3636 from vector-im/feature/bma/cleanup_interface
Decorelate interfaces for code clarity
2021-07-07 10:08:15 +02:00
Benoit Marty
07e8074c25 Merge pull request #3641 from vector-im/bmarty-patch-1
Update issue templates
2021-07-06 17:05:14 +02:00
Benoit Marty
1cb93b60c2 Update issue templates 2021-07-06 17:04:38 +02:00
random
60d9e4b344 Translated using Weblate (Italian)
Currently translated at 100.0% (23 of 23 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/it/
2021-07-06 14:34:51 +00:00
random
87df147a28 Translated using Weblate (Italian)
Currently translated at 99.8% (2491 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/it/
2021-07-06 14:34:50 +00:00
Thibault Martin
9efb213ff7 Translated using Weblate (French)
Currently translated at 100.0% (2494 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/
2021-07-06 14:34:50 +00:00
Benoit Marty
e9da63e3ee Merge pull request #3635 from vector-im/feature/bma/crash_room_aliases
Fix crash in room aliases
2021-07-06 12:15:37 +02:00
Benoit Marty
8f1b7649aa Make the code compile... 2021-07-06 12:10:06 +02:00
Benoit Marty
4963025150 Decorelate interfaces for code clarity 2021-07-06 11:36:50 +02:00
Benoit Marty
ca9f5161d1 Add retry support on Room Alias screen 2021-07-06 11:12:40 +02:00
Benoit Marty
5b149c8a34 Crash when opening room addresses screen with no internet connection 2021-07-06 10:57:59 +02:00
Benoit Marty
e22bd8f637 Merge pull request #3593 from vector-im/dependabot/gradle/androidx.test.ext-junit-1.1.3
Bump junit from 1.1.2 to 1.1.3
2021-07-05 21:36:38 +02:00
Benoit Marty
ca45cdd5c7 Merge pull request #3585 from vector-im/feature/bma/wellknown
Improve wellknown usage
2021-07-05 21:36:16 +02:00
Benoit Marty
692adffa69 Merge pull request #3626 from vector-im/dependabot/gradle/com.google.android.material-material-1.4.0
Bump material from 1.3.0 to 1.4.0
2021-07-05 21:29:49 +02:00
Benoit Marty
07d6eaacf9 Quick cleanup after #3624 2021-07-05 21:28:37 +02:00
Benoit Marty
a335c5eb4b Merge pull request #3624 from vector-im/dbkr/scan_button_title
Use different copy for self verification
2021-07-05 21:25:57 +02:00
David Baker
04cad290f7 Also change the emoji button subtitle
and tweak the other string more because it's not "each other" either
2021-07-05 19:49:48 +01:00
Benoit Marty
d29e04f16c Create fun String.getDomain(): String to avoid duplicated code 2021-07-05 16:49:09 +02:00
Benoit Marty
67f41028ff Remove Riot ref: Riot -> Web client 2021-07-05 16:41:26 +02:00
Benoit Marty
0e8018cbba ktlint and format 2021-07-05 16:24:19 +02:00
Benoit Marty
97cae9926b Merge pull request #2848 from vector-im/neilalexander/vectorpreferences
Add subscribeToChanges/unsubscribeToChanges to VectorPreferences
2021-07-05 16:22:43 +02:00
dependabot[bot]
974d5c23d3 Bump junit from 1.1.2 to 1.1.3
Bumps junit from 1.1.2 to 1.1.3.

---
updated-dependencies:
- dependency-name: androidx.test.ext:junit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 14:19:54 +00:00
Benoit Marty
d85099f23c Merge pull request #3595 from vector-im/dependabot/gradle/espresso_version-3.4.0
Bump espresso_version from 3.3.0 to 3.4.0
2021-07-05 16:19:17 +02:00
Benoit Marty
edbf70c820 Merge pull request #3273 from vector-im/feature/bma/cleanup_redundant_fields
Cleanup redundant fields - TO BE MERGED ON JULY 1st
2021-07-05 16:16:33 +02:00
Benoit Marty
c2e649f64e Fix deprecated method 2021-07-05 16:07:44 +02:00
Benoit Marty
b285bd0359 Merge branch 'develop' into feature/bca/room_upgrade 2021-07-05 16:01:27 +02:00
zeritti
084e497463 Translated using Weblate (Czech)
Currently translated at 100.0% (23 of 23 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/cs/
2021-07-05 13:34:54 +00:00
Jeff Huang
46320ef71b Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (23 of 23 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hant/
2021-07-05 13:34:54 +00:00
Priit Jõerüüt
f35050d4b4 Translated using Weblate (Estonian)
Currently translated at 100.0% (23 of 23 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/et/
2021-07-05 13:34:53 +00:00
sr093906
10e38d3319 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (23 of 23 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hans/
2021-07-05 13:34:52 +00:00
Szimszon
80d415b242 Translated using Weblate (Hungarian)
Currently translated at 100.0% (23 of 23 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/hu/
2021-07-05 13:34:52 +00:00
Jeff Huang
e0f5099bd6 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (2494 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hant/
2021-07-05 13:34:51 +00:00
sr093906
900769174c Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (2494 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/
2021-07-05 13:34:51 +00:00
lvre
7ccc218c6b Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2494 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-07-05 13:34:50 +00:00
Szimszon
a610ea06aa Translated using Weblate (Hungarian)
Currently translated at 100.0% (2494 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/hu/
2021-07-05 13:34:50 +00:00
Priit Jõerüüt
8034ea16e5 Translated using Weblate (Estonian)
Currently translated at 100.0% (2494 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/et/
2021-07-05 13:34:50 +00:00
zeritti
5fc818fac2 Translated using Weblate (Czech)
Currently translated at 100.0% (2494 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/cs/
2021-07-05 13:34:49 +00:00
Benoit Marty
c40add88f9 Merge pull request #3617 from vector-im/dependabot/gradle/io.realm-realm-gradle-plugin-10.6.1
Bump realm-gradle-plugin from 10.6.0 to 10.6.1
2021-07-05 14:38:07 +02:00
dependabot[bot]
8639582671 Bump espresso_version from 3.3.0 to 3.4.0
Bumps `espresso_version` from 3.3.0 to 3.4.0.

Updates `espresso-core` from 3.3.0 to 3.4.0

Updates `espresso-contrib` from 3.3.0 to 3.4.0

Updates `espresso-intents` from 3.3.0 to 3.4.0

---
updated-dependencies:
- dependency-name: androidx.test.espresso:espresso-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.test.espresso:espresso-contrib
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.test.espresso:espresso-intents
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 12:38:04 +00:00
Benoit Marty
fa370861e8 Merge pull request #3597 from vector-im/dependabot/gradle/com.android.tools.build-gradle-4.2.2
Bump gradle from 4.2.1 to 4.2.2
2021-07-05 14:37:58 +02:00
Benoit Marty
5ccfbf4ed8 Merge pull request #3596 from vector-im/dependabot/gradle/androidx.core-core-ktx-1.6.0
Bump core-ktx from 1.5.0 to 1.6.0
2021-07-05 14:37:48 +02:00
Benoit Marty
242962f770 Merge pull request #3594 from vector-im/dependabot/gradle/io.mockk-mockk-android-1.12.0
Bump mockk-android from 1.11.0 to 1.12.0
2021-07-05 14:37:33 +02:00
Benoit Marty
ca39182665 Merge pull request #3592 from vector-im/dependabot/gradle/io.mockk-mockk-1.12.0
Bump mockk from 1.11.0 to 1.12.0
2021-07-05 14:37:20 +02:00
Benoit Marty
f03155bbae Merge pull request #3591 from vector-im/dependabot/gradle/androidxTest_version-1.4.0
Bump androidxTest_version from 1.3.0 to 1.4.0
2021-07-05 14:37:14 +02:00
Benoit Marty
80b1aa3c01 Merge pull request #3590 from vector-im/dependabot/gradle/androidx.test-orchestrator-1.4.0
Bump orchestrator from 1.3.0 to 1.4.0
2021-07-05 14:37:07 +02:00
Benoit Marty
c443cffca5 Merge pull request #3627 from vector-im/gradlew-update-7.1.1
Update Gradle Wrapper from 7.1 to 7.1.1
2021-07-05 14:36:04 +02:00
Benoit Marty
72dcc92032 Version++ 2021-07-05 14:27:33 +02:00
Benoit Marty
2da0379505 Merge branch 'release/1.1.12' into main 2021-07-05 09:57:57 +02:00
Benoit Marty
cf5ab304df Merge branch 'release/1.1.12' into develop 2021-07-05 09:57:56 +02:00
Benoit Marty
9673b3b15b Release: fastlane 2021-07-05 09:56:27 +02:00
Benoit Marty
09e362ec6b Release: towncrier 2021-07-05 09:55:22 +02:00
Benoit Marty
76f4c81d2d Hide password... Oups 2021-07-05 09:50:20 +02:00
lvre
eb4f36319f Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2494 of 2494 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-07-03 20:00:21 +00:00
lvre
886ce7ce3b Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (23 of 23 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/pt_BR/
2021-07-03 20:00:06 +00:00
Benoit Marty
2d860eaa2a Merge pull request #3622 from vector-im/feature/bma/crash_realm
CryptoStore migration has to be object to avoid crash
2021-07-03 20:08:57 +02:00
gradle-update-robot
4ad5deac38 Update Gradle Wrapper from 7.1 to 7.1.1.
Signed-off-by: gradle-update-robot <gradle-update-robot@regolo.cc>
2021-07-03 00:09:56 +00:00
dependabot[bot]
9ff1e20f07 Bump material from 1.3.0 to 1.4.0
Bumps [material](https://github.com/material-components/material-components-android) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.3.0...1.4.0)

---
updated-dependencies:
- dependency-name: com.google.android.material:material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 23:07:53 +00:00
David Baker
78c87870ae changelog 2021-07-02 20:22:14 +01:00
David Baker
fe4c4832bd Use different copy for self verification
The copy all refers to 'their' device for when you're verifying
someone else. Update it to refer to your own devices in the case
where you're verifying one of your own devices.
2021-07-02 18:38:57 +01:00
Benoit Marty
2513be744c CryptoStore migration has to be object to avoid crash
Thread: main, Exception: java.lang.IllegalArgumentException: Configurations cannot be different if used to open the same file. The most likely cause is that equals() and hashCode() are not overridden in the migration class: org.matrix.android.sdk.internal.database.RealmSessionStoreMigration
2021-07-02 17:29:44 +02:00
Benoit Marty
2a0230633d Merge pull request #3620 from vector-im/feature/bma/fix_wl
Fix compilation issue
2021-07-02 17:29:04 +02:00
Benoit Marty
2c7b947d27 Fix compilation issue
A bit weird, I did not figure out was was the original problem.
Editiing the line, for instance adding any char fixes the issue, so I decided to put all on one line.
2021-07-02 15:32:01 +02:00
Benoit Marty
f06d2b1734 Fix typo 2021-07-02 14:55:30 +02:00
Benoit Marty
1eea734a4c Fix compilation issue
A bit weird, I did not figure out was was the original problem.
Editiing the line, for instance adding any char fixes the issue, so I decided to put all on one line.
2021-07-02 12:53:00 +02:00
Benoit Marty
dc50246ec4 Merge pull request #3618 from RiotTranslateBot/weblate-element-android-element-app
Translations update from Weblate
2021-07-02 10:25:45 +02:00
Weblate
64b6779cfa Merge branch 'origin/develop' into Weblate. 2021-07-02 07:52:44 +00:00
Benoit Marty
b0f7268d13 Merge pull request #3553 from vector-im/feature/fga/fix_timeline_visibility
Fix some issues with timeline cache invalidation and visibility.
2021-07-02 09:40:37 +02:00
Benoit Marty
d4009476f9 Cleanup 2021-07-02 09:39:32 +02:00
Benoit Marty
7dc5d8490f Merge pull request #3584 from vector-im/feature/bca/fix_oom_spacechild
Fix / dm flattenParents always growing
2021-07-02 09:35:51 +02:00
lvre
1906fbdeaa Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-07-02 01:04:01 +00:00
dependabot[bot]
9430d7a5dd Bump realm-gradle-plugin from 10.6.0 to 10.6.1
Bumps [realm-gradle-plugin](https://github.com/realm/realm-java) from 10.6.0 to 10.6.1.
- [Release notes](https://github.com/realm/realm-java/releases)
- [Changelog](https://github.com/realm/realm-java/blob/v10.6.1/CHANGELOG.md)
- [Commits](https://github.com/realm/realm-java/compare/v10.6.0...v10.6.1)

---
updated-dependencies:
- dependency-name: io.realm:realm-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-01 23:07:36 +00:00
Valere
adcd1a64df empty migration to fix big flattenParentIds for DM 2021-07-01 15:28:26 +02:00
Benoit Marty
ef31aad42c Fix copyright 2021-07-01 14:47:04 +02:00
Benoit Marty
47ef0d90fc Open upgraded room when upgrading from the room profile 2021-07-01 14:31:27 +02:00
Benoit Marty
ed7be13ea3 PR review part 2 2021-07-01 12:51:33 +02:00
Benoit Marty
69c399a229 Merge pull request #3529 from erikhuizinga/erikhuizinga-3527-fix-google-play-service-application
Apply Google Services Gradle plugin more robustly
2021-07-01 10:16:00 +02:00
dependabot[bot]
1ae88afcda Bump gradle from 4.2.1 to 4.2.2
Bumps gradle from 4.2.1 to 4.2.2.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-30 23:09:18 +00:00
dependabot[bot]
752290424c Bump core-ktx from 1.5.0 to 1.6.0
Bumps core-ktx from 1.5.0 to 1.6.0.

---
updated-dependencies:
- dependency-name: androidx.core:core-ktx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-30 23:07:55 +00:00
dependabot[bot]
7316bf4ee0 Bump mockk-android from 1.11.0 to 1.12.0
Bumps [mockk-android](https://github.com/mockk/mockk) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/mockk/mockk/releases)
- [Commits](https://github.com/mockk/mockk/compare/1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: io.mockk:mockk-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-30 23:07:27 +00:00
dependabot[bot]
f1001231d6 Bump mockk from 1.11.0 to 1.12.0
Bumps [mockk](https://github.com/mockk/mockk) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/mockk/mockk/releases)
- [Commits](https://github.com/mockk/mockk/compare/1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: io.mockk:mockk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-30 23:06:35 +00:00
dependabot[bot]
2ebfeb1709 Bump androidxTest_version from 1.3.0 to 1.4.0
Bumps `androidxTest_version` from 1.3.0 to 1.4.0.

Updates `core` from 1.3.0 to 1.4.0

Updates `runner` from 1.3.0 to 1.4.0

Updates `rules` from 1.3.0 to 1.4.0

---
updated-dependencies:
- dependency-name: androidx.test:core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.test:runner
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.test:rules
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-30 23:06:24 +00:00
dependabot[bot]
3378be935b Bump orchestrator from 1.3.0 to 1.4.0
Bumps orchestrator from 1.3.0 to 1.4.0.

---
updated-dependencies:
- dependency-name: androidx.test:orchestrator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-30 23:06:02 +00:00
Benoit Marty
ec515ced66 PR review part 1 2021-06-30 18:54:13 +02:00
Benoit Marty
3e53fa710a Merge branch 'develop' into feature/bca/room_upgrade 2021-06-30 17:56:32 +02:00
Benoit Marty
a8bef415b7 Merge pull request #3587 from vector-im/feature/fga/fix_video_call_crash
Fix crash after video call
2021-06-30 17:22:09 +02:00
ganfra
de64df3cdb Fix crash after video call 2021-06-30 14:50:30 +02:00
Benoit Marty
7292c4e13d Code quality 2021-06-30 13:57:42 +02:00
Benoit Marty
ea6b0b6a43 Fix issue when sign-in using matrixId 2021-06-30 12:53:37 +02:00
lvre
1a0f29ff94 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-30 10:34:47 +00:00
libexus
c350c94827 Translated using Weblate (German)
Currently translated at 99.9% (2488 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-06-30 10:34:47 +00:00
Benoit Marty
14ac5a292c Auto review 2021-06-30 12:32:43 +02:00
Benoit Marty
24d2669255 Keep the data entered by the user for the UI
Actually import what has been done in Login V2...
2021-06-30 12:07:24 +02:00
Benoit Marty
8f3db11693 Perform .well-known request first, even if the entered URL is a valid homeserver base url 2021-06-30 11:52:04 +02:00
Benoit Marty
a61917f2b4 Also change base URL for federationAPI 2021-06-30 11:19:22 +02:00
Benoit Marty
08000dce55 Update the UI showing the homeserver API url in developer mode 2021-06-30 11:14:44 +02:00
Benoit Marty
38cb8bd33e Store homeServerUriBase independently that the base URL for client-server API
Also handle the migration for the specific matrix-client.matrix.org URL
2021-06-30 11:07:24 +02:00
Benoit Marty
0f25e2986f fun RawService.getElementWellknown() now takes a SessionParams for parameter to be able to use something else than the userId's domain 2021-06-30 09:27:11 +02:00
Benoit Marty
984b1dd6a8 RawService.getWellknown() now takes a domain instead of a matrixId as parameter 2021-06-30 09:20:08 +02:00
Valere
a5b09b9dc3 change log 2021-06-29 17:38:48 +02:00
Valere
1d8b95560b Fix / dm flattenParents always growing 2021-06-29 14:57:43 +02:00
Benoit Marty
7f70a03f41 Use interface field 2021-06-29 10:58:28 +02:00
Benoit Marty
0d02a197a5 Remove redundant mimetype (vector-im/element-web#2547) 2021-06-29 10:58:28 +02:00
Benoit Marty
3a683fc4e9 Merge pull request #3578 from vector-im/feature/bma/button_size
Fix issue on button styles
2021-06-29 09:48:20 +02:00
Benoit Marty
bca220f909 Fix issue on button styles 2021-06-28 17:02:06 +02:00
Benoit Marty
edd24de4c3 Merge pull request #3547 from vector-im/feature/fga/jump_to_unread_redesign
Jump to unread: implement new design
2021-06-28 16:45:06 +02:00
Benoit Marty
9bbe002988 Merge pull request #3531 from vector-im/feature/fga/auto_accept_invite
Feature/fga/auto accept invite
2021-06-28 16:40:10 +02:00
ganfra
48fa9e1a5e Clean after benoits review 2021-06-28 11:00:29 +02:00
Valere
4aa93d79fe cleaning 2021-06-28 09:42:54 +02:00
random
2764ecb256 Translated using Weblate (Italian)
Currently translated at 99.8% (2486 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/it/
2021-06-27 19:34:46 +00:00
libexus
230b3f31d7 Translated using Weblate (German)
Currently translated at 99.9% (2488 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-06-27 19:34:46 +00:00
Benoit Marty
cd0c9b4e08 Merge pull request #3549 from vector-im/feature/bma/cleanup_styles
Fix styles issue
2021-06-25 19:11:54 +02:00
Benoit Marty
060e9d7a7e Merge pull request #3568 from vector-im/dependabot/gradle/kotlin_version-1.5.20
Bump kotlin_version from 1.5.10 to 1.5.20
2021-06-25 19:11:34 +02:00
Benoit Marty
631e7881ef Fix warning about implicit type, introduced in Kotlin 1.5.20.
"Returning type parameter has been inferred to Nothing implicitly. Please specify type arguments explicitly to hide this warning. Nothing can produce an exception at runtime."
2021-06-25 17:42:38 +02:00
Benoit Marty
2e37b5efa3 Merge pull request #3565 from vector-im/feature/fga/fix_call_notification
Fix call invite processed after call is ended because of fastlane mode.
2021-06-25 16:47:54 +02:00
Benoit Marty
6b82e8d55a Merge pull request #3567 from vector-im/dependabot/gradle/com.googlecode.libphonenumber-libphonenumber-8.12.26
Bump libphonenumber from 8.12.25 to 8.12.26
2021-06-25 16:45:16 +02:00
Thibault Martin
473259f150 Translated using Weblate (French)
Currently translated at 100.0% (21 of 21 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/fr/
2021-06-25 09:34:50 +00:00
BramvdnHeuvel
7c04391037 Translated using Weblate (Dutch)
Currently translated at 52.1% (1298 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/nl/
2021-06-25 09:34:49 +00:00
Thibault Martin
bafd01c0f4 Translated using Weblate (French)
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/
2021-06-25 09:34:45 +00:00
dependabot[bot]
b1a1b4651e Bump kotlin_version from 1.5.10 to 1.5.20
Bumps `kotlin_version` from 1.5.10 to 1.5.20.

Updates `kotlin-gradle-plugin` from 1.5.10 to 1.5.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.20)

Updates `kotlin-stdlib-jdk7` from 1.5.10 to 1.5.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.20)

Updates `kotlin-stdlib` from 1.5.10 to 1.5.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.20)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk7
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-24 23:09:29 +00:00
dependabot[bot]
9e2f2f2372 Bump libphonenumber from 8.12.25 to 8.12.26
Bumps [libphonenumber](https://github.com/google/libphonenumber) from 8.12.25 to 8.12.26.
- [Release notes](https://github.com/google/libphonenumber/releases)
- [Changelog](https://github.com/google/libphonenumber/blob/master/making-metadata-changes.md)
- [Commits](https://github.com/google/libphonenumber/compare/v8.12.25...v8.12.26)

---
updated-dependencies:
- dependency-name: com.googlecode.libphonenumber:libphonenumber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-24 23:05:19 +00:00
ganfra
a2c8680d7a Fix call invite processed after call is ended because of fastlane mode. 2021-06-24 20:49:35 +02:00
ganfra
cccf5de015 Jump to unread: removes unnecessary check which can cause scroll issue 2021-06-24 18:50:44 +02:00
ganfra
ab37984beb Jump to unread: avoid blink when jumping 2021-06-24 18:33:30 +02:00
ganfra
1ba97fa9be Clean after Benoits review 2021-06-24 17:40:45 +02:00
Benoit Marty
ca3e5cdf90 Merge pull request #3544 from vector-im/dependabot/gradle/org.amshove.kluent-kluent-android-1.67
Bump kluent-android from 1.65 to 1.67
2021-06-24 14:49:53 +02:00
Benoit Marty
f5ecaa0339 Merge pull request #3520 from vector-im/feature/fga/timeline_virtual_room
Feature/fga/timeline virtual room
2021-06-24 14:43:00 +02:00
Benoit Marty
5eb0097fb2 Delete unused drawable to avoid conflict on develop 2021-06-24 14:40:38 +02:00
Benoit Marty
14184aae6f Merge pull request #3506 from vector-im/dependabot/gradle/com.googlecode.libphonenumber-libphonenumber-8.12.25
Bump libphonenumber from 8.12.24 to 8.12.25
2021-06-24 14:34:45 +02:00
Benoit Marty
f0fd40b189 Merge pull request #3505 from vector-im/dependabot/gradle/io.realm-realm-gradle-plugin-10.6.0
Bump realm-gradle-plugin from 10.5.0 to 10.6.0
2021-06-24 14:32:35 +02:00
Benoit Marty
bbb51f31f3 Merge pull request #3512 from vector-im/gradlew-update-7.1
Update Gradle Wrapper from 7.0.2 to 7.1
2021-06-24 14:31:50 +02:00
Benoit Marty
ed90f376e6 Merge pull request #3518 from vector-im/dependabot/gradle/androidx.fragment-fragment-ktx-1.3.5
Bump fragment-ktx from 1.3.4 to 1.3.5
2021-06-24 14:31:04 +02:00
Benoit Marty
7257736691 Merge pull request #3545 from vector-im/feature/bma/password_reveal
Password reveal
2021-06-24 14:30:34 +02:00
ganfra
919ebaa82e Fix some issues with timeline cache invalidation and visibility. 2021-06-24 12:41:23 +02:00
Valere
846c5d52b8 Fix unused parameter 2021-06-24 11:54:06 +02:00
Valere
43a1e283c5 Merge pull request #3514 from vector-im/feature/bca/fix_join_errors
Add error feedback when joining space rooms
2021-06-24 09:56:32 +02:00
Valere
ef5c552a3b Update change log 2021-06-24 09:52:53 +02:00
Valere
57c75f8039 Ugrade unstable room notice in settings
default update parent, clean migrate bottomsheet layout
2021-06-24 09:38:52 +02:00
ganfra
d1ab116b1d Jump to unread: add towncrier file. 2021-06-23 17:13:46 +02:00
ganfra
c3ef036dca Read marker: fix some issues with jump to unread visibility. 2021-06-23 16:59:58 +02:00
Benoit Marty
885f5736c9 Stop using ProgressDialog, there is a theme issue with it.
It's not maintain by Google since it's deprecated. Force usage of MaterialAlertDialogBuilder to have the same UI effect. We sometimes need to block the UI :/
2021-06-23 16:46:15 +02:00
Thor Arne Johansen
25b9547678 Translated using Weblate (Norwegian Bokmål)
Currently translated at 62.8% (1564 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/nb_NO/
2021-06-23 14:34:46 +00:00
libexus
3b31f3956c Translated using Weblate (German)
Currently translated at 99.9% (2488 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-06-23 14:34:45 +00:00
Benoit Marty
43cad8751d Reordering 2021-06-23 16:12:38 +02:00
Benoit Marty
9ac0f6d86b Add text style for dialogs 2021-06-23 15:38:01 +02:00
Benoit Marty
11b16ea065 Colored dialog button is now handled by the theme 2021-06-23 14:50:34 +02:00
Benoit Marty
67bdb75d80 Update theme for material dialog and create a destructive variant 2021-06-23 13:19:14 +02:00
Benoit Marty
d0a7265975 Reorder buttons 2021-06-23 13:01:48 +02:00
Benoit Marty
a148d21cdb Update doc 2021-06-23 12:36:43 +02:00
Ridhubharan
13ec7a500a Added translation using Weblate (Tamil) 2021-06-22 17:31:49 +00:00
Valere
171793d190 room version cap support + room upgrade 2021-06-22 17:35:39 +02:00
ganfra
121fd9a19d Jump to unread: implement new design 2021-06-22 16:29:19 +02:00
Benoit Marty
ed97cf7dac Create dimens for text sizes 2021-06-22 14:39:24 +02:00
Benoit Marty
0c88d11429 Version++ 2021-06-22 12:28:18 +02:00
Benoit Marty
a3d54f1466 Merge branch 'release/1.1.11' into main 2021-06-22 12:27:44 +02:00
Benoit Marty
0dec46eb18 Merge branch 'release/1.1.11' into develop 2021-06-22 12:27:44 +02:00
Benoit Marty
b76fd5dd4e Prepare release 1.1.11 2021-06-22 12:27:36 +02:00
Benoit Marty
48002e11b6 Merge pull request #3540 from vector-im/feature/bma/fix_composer
Send button does not show up half of the time (#3535)
2021-06-22 12:24:28 +02:00
Benoit Marty
6289d640b4 Reveal password: use facility from com.google.android.material.textfield.TextInputLayout instead of manual handling
Also avoid repeating password on the change password dialog.
2021-06-22 11:31:45 +02:00
dependabot[bot]
e2e3e2de86 Bump kluent-android from 1.65 to 1.67
Bumps [kluent-android](https://github.com/MarkusAmshove/Kluent) from 1.65 to 1.67.
- [Release notes](https://github.com/MarkusAmshove/Kluent/releases)
- [Changelog](https://github.com/MarkusAmshove/Kluent/blob/master/CHANGELOG.md)
- [Commits](https://github.com/MarkusAmshove/Kluent/commits)

---
updated-dependencies:
- dependency-name: org.amshove.kluent:kluent-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-21 23:06:17 +00:00
Benoit Marty
5db0d75959 Remove dead code 2021-06-21 14:44:31 +02:00
Benoit Marty
434018074d Merge pull request #3538 from vector-im/feature/fga/fix_signout
Fix crash on signout: release session at the end of clean up
2021-06-21 14:11:10 +02:00
Benoit Marty
c21b19f49f Send button does not show up half of the time (#3535) 2021-06-21 14:06:43 +02:00
ganfra
d8327a5161 Fix crash on signout: release session at the end so you clean up files first. 2021-06-21 11:10:10 +02:00
zeritti
f7be5996e5 Translated using Weblate (Czech)
Currently translated at 100.0% (21 of 21 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/cs/
2021-06-21 00:34:49 +00:00
Jeff Huang
efe0a1737e Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hant/
2021-06-21 00:34:49 +00:00
sr093906
061ab76c21 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/
2021-06-21 00:34:48 +00:00
LinAGKar
8e595a7605 Translated using Weblate (Swedish)
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sv/
2021-06-21 00:34:48 +00:00
Besnik Bleta
b5ff31b84e Translated using Weblate (Albanian)
Currently translated at 99.5% (2479 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sq/
2021-06-21 00:34:48 +00:00
Szimszon
e77cca4495 Translated using Weblate (Hungarian)
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/hu/
2021-06-21 00:34:47 +00:00
Vancha
f6dd07eb64 Translated using Weblate (Frisian)
Currently translated at 25.7% (641 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fy/
2021-06-21 00:34:47 +00:00
Priit Jõerüüt
5555b0dbb7 Translated using Weblate (Estonian)
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/et/
2021-06-21 00:34:45 +00:00
libexus
b0c23426df Translated using Weblate (German)
Currently translated at 99.7% (2485 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-06-21 00:34:44 +00:00
waclaw66
a64c7e5df2 Translated using Weblate (Czech)
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/cs/
2021-06-21 00:34:44 +00:00
lvre
e0a5241caf Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-20 00:03:04 +00:00
Benoit Marty
4ce71c8487 Create a style for password edit 2021-06-18 21:52:53 +02:00
Benoit Marty
b30c27b7a6 Version++ 2021-06-18 21:50:12 +02:00
Benoit Marty
729ce509d4 Merge branch 'release/1.1.10' into develop 2021-06-18 21:38:59 +02:00
ganfra
4b6484d317 Merge branch 'develop' into feature/fga/auto_accept_invite 2021-06-18 17:37:24 +02:00
ganfra
c551cf3058 Clean and add towncrier 2021-06-18 17:30:32 +02:00
ganfra
6b10406622 AutoAcceptInvite: refact and hide behind flag 2021-06-18 17:24:51 +02:00
Erik Huizinga
cc5260b311 Disable non-Gplay flavor *GoogleServices* tasks 2021-06-18 17:23:11 +02:00
Erik Huizinga
22f3f612d7 Apply Google Services Gradle plugin more robustly
Fixes #3527
2021-06-18 12:26:31 +02:00
lvre
d4c8c645d1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-17 23:04:26 +00:00
lvre
a1bfe099ad Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-17 22:57:04 +00:00
lvre
08af370600 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-17 22:54:39 +00:00
lvre
e826900bd3 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-17 22:38:55 +00:00
lvre
7a12d29d39 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-17 22:37:13 +00:00
lvre
e6e7f82eb6 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-17 22:36:38 +00:00
lvre
de0b745eb9 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-17 22:10:39 +00:00
lvre
1ea48f89b4 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-17 21:56:46 +00:00
lvre
861d652d88 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-17 21:45:16 +00:00
lvre
51119ceec4 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-17 21:37:22 +00:00
lvre
f6ac57ec93 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2490 of 2490 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-06-17 21:11:13 +00:00
ganfra
646f00f3fc First test for auto accept invite [WIP] 2021-06-17 20:49:08 +02:00
ganfra
4a8a6d170b Clean and add towncrier file 2021-06-17 12:49:05 +02:00
ganfra
1d8b9f879b Merge develop 2021-06-17 11:58:57 +02:00
Valere
2a675bf8d1 Code review 2021-06-17 09:27:31 +02:00
dependabot[bot]
7c19c9f0b7 Bump fragment-ktx from 1.3.4 to 1.3.5
Bumps fragment-ktx from 1.3.4 to 1.3.5.

---
updated-dependencies:
- dependency-name: androidx.fragment:fragment-ktx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-16 23:08:30 +00:00
Valere
e277deece5 Add error feedback when joining space rooms 2021-06-16 17:35:25 +02:00
gradle-update-robot
5e32e98000 Update Gradle Wrapper from 7.0.2 to 7.1.
Signed-off-by: gradle-update-robot <gradle-update-robot@regolo.cc>
2021-06-16 00:09:41 +00:00
dependabot[bot]
dd74b8a755 Bump libphonenumber from 8.12.24 to 8.12.25
Bumps [libphonenumber](https://github.com/google/libphonenumber) from 8.12.24 to 8.12.25.
- [Release notes](https://github.com/google/libphonenumber/releases)
- [Changelog](https://github.com/google/libphonenumber/blob/master/making-metadata-changes.md)
- [Commits](https://github.com/google/libphonenumber/compare/v8.12.24...v8.12.25)

---
updated-dependencies:
- dependency-name: com.googlecode.libphonenumber:libphonenumber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-15 06:25:21 +00:00
dependabot[bot]
6e83f0510e Bump realm-gradle-plugin from 10.5.0 to 10.6.0
Bumps [realm-gradle-plugin](https://github.com/realm/realm-java) from 10.5.0 to 10.6.0.
- [Release notes](https://github.com/realm/realm-java/releases)
- [Changelog](https://github.com/realm/realm-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/realm/realm-java/compare/v10.5.0...v10.6.0)

---
updated-dependencies:
- dependency-name: io.realm:realm-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-15 06:24:33 +00:00
ganfra
01d0d1a5ed Timeline merge: wait for both timeline to be ready 2021-06-14 18:46:15 +02:00
ganfra
99d05d8db3 Theme: fix call tile text color 2021-06-11 19:27:35 +02:00
ganfra
b7dd7ef3e0 Timeline merging: branch virtual room (still some issues to deal with) 2021-06-11 19:27:07 +02:00
ganfra
6d9c49462a Merge branch 'develop' into feature/fga/timeline_virtual_room 2021-06-11 16:35:45 +02:00
ganfra
736a8a13d9 Merging timeline: start branching it 2021-06-11 16:34:39 +02:00
ganfra
63bbc89ed8 Merge branch 'develop' into feature/fga/timeline_virtual_room 2021-06-11 12:20:09 +02:00
ganfra
4d2fb303d2 Merge branch 'develop' into feature/fga/timeline_virtual_room 2021-06-10 16:59:04 +02:00
ganfra
5781adb163 Timeline merging : introduce TimelineProxy (WIP) 2021-06-09 15:08:28 +02:00
Neil Alexander
2b403371a3 Update VectorPreferences.kt 2021-02-19 15:17:42 +00:00
Neil Alexander
adc461d2f3 Update VectorPreferences.kt 2021-02-19 14:23:38 +00:00
Neil Alexander
e53801957c Add subscribeToChanges/unsubscribeToChanges to VectorPreferences 2021-02-19 13:36:39 +00:00
378 changed files with 4669 additions and 2675 deletions

84
.github/ISSUE_TEMPLATE/release.md vendored Normal file
View File

@@ -0,0 +1,84 @@
---
name: Release
about: Checklist for each release. To be used by the core team only.
title: "[Release] Element Android v"
labels: "\U0001F680 Release"
assignees: bmarty
---
For the example, we are releasing the version 1.1.10. Delete this line and replace 1.1.10 with the version in the issue content.
### Before the release
- [ ] Weblate sync, fix lint issue if any (in a dedicated PR)
- [ ] Check the update of the store descriptions (using Google Translate if necessary) to ensure that the changes are acceptable to be published to the stores.
- [ ] Run the script `./tools/release/pushPlayStoreMetaData.sh`. You can check in the GooglePlay console the Activity log to check the effect.
### Do the release
- [ ] Create release with gitflow, branch name `release/1.1.10`
- [ ] Run `./tools/import_emojis.py` and commit the change if any.
- [ ] Run `./tools/import_sas_strings.py` and commit the change if any. If there is no change since a while, ping Travis
- [ ] Check the crashes from the PlayStore
- [ ] Check the rageshake with the current dev version: https://github.com/matrix-org/element-android-rageshakes/labels/1.1.10-dev
- [ ] Run the integration test, and especially `UiAllScreensSanityTest.allScreensTest()`
- [ ] Create an account on matrix.org
- [ ] Run towncrier: `towncrier --version v1.1.10 --draft` (remove `--draft` do write the file CHANGES.md)
- [ ] Add file for fastlane under ./fastlane/metadata/android/en-US/changelogs
- [ ] Push the branch and start a draft PR (will not be merged), to check that the CI is happy with all the changes.
- [ ] Finish release with gitflow, delete the draft PR
- [ ] Push `main` and the new tag `v1.1.10` to origin
- [ ] Checkout `develop`
- [ ] Increase version in `./vector/build.gradle`
- [ ] Commit and push `develop`
- [ ] Wait for [Buildkite](https://buildkite.com/matrix-dot-org/element-android/builds?branch=main) to build the `main` branch.
- [ ] Run the script `~/scripts/releaseElement.sh`. It will download the APKs from Buildkite check them and sign them.
- [ ] Install the APK on your phone to check that the upgrade went well (no init sync, etc.)
- [ ] Create a new beta release on the GooglePlay console and upload the 4 signed Apks.
- [ ] Check that the version codes are correct
- [ ] Copy the fastlane change to the GooglePlay console in the section en-GB.
- [ ] Push to beta release to 100% of the users
- [ ] Create the release on gitHub [from the tag](https://github.com/vector-im/element-android/tags), copy paste the block from the file CHANGES.md
- [ ] Add the 4 signed APKs to the GitHub release
- [ ] Ping the Android Internal room
- [ ] Add an entry in the internal diary
### Once Live on PlayStore
- [ ] Ping the Android public room and update its topic
### After at least 2 days
- [ ] Check the [rageshakes](https://github.com/matrix-org/element-android-rageshakes/issues)
- [ ] Check the crash reports on the GooglePlay console
- [ ] Check the Android Element room for any reported issues on the new version
- [ ] If all is OK, push to production and notify Markus (Bubu) to release the F-Droid version
- [ ] Ping the Android public room and update its topic with the new available version
### Android SDK2
- [ ] Checkout the `main` branch on Element Android project
#### On the SDK2 project
https://github.com/matrix-org/matrix-android-sdk2
- [ ] Create a release with GitFlow
- [ ] Update the files `./build.gradle` and `./gradle/gradle-wrapper.properties` manually, to use the latest version for the dependency. You can get inspired by the same files on Element Android project.
- [ ] Run the script `./tools/import_from_element.sh`
- [ ] Update the version in `./matrix-sdk-android/build.gradle` and let the script finish to build the library
- [ ] Update the file `CHANGES.md`
- [ ] Finish the release using GitFlow
- [ ] Create the release on GitHub from [the tag](https://github.com/matrix-org/matrix-android-sdk2/tags)
- [ ] Upload the AAR on the GitHub release
### Android SDK2 sample
https://github.com/matrix-org/matrix-android-sdk2-sample
- [ ] Update the dependency to the new version of the SDK2. Jitpack will have to build the AAR, it can take a few minutes. You can check status on https://jitpack.io/#matrix-org/matrix-android-sdk2
- [ ] Build and run the sample, you may have to fix some API break
- [ ] Commit and push directly on `main`
<!-- Note: some scripts are not public because they contain some private keys -->

View File

@@ -38,6 +38,7 @@
<w>unpublish</w>
<w>unwedging</w>
<w>vctr</w>
<w>wellknown</w>
</words>
</dictionary>
</component>

View File

@@ -1,3 +1,53 @@
Changes in Element v1.1.13 (2021-07-19)
=======================================
Features ✨
----------
- Remove redundant mimetype (vector-im/element-web#2547) ([#3273](https://github.com/vector-im/element-android/issues/3273))
- Room version capabilities and room upgrade support, better error feedback ([#3551](https://github.com/vector-im/element-android/issues/3551))
- Add retry support in room addresses screen ([#3635](https://github.com/vector-im/element-android/issues/3635))
- Better management of permission requests ([#3667](https://github.com/vector-im/element-android/issues/3667))
Bugfixes 🐛
----------
- Standardise spelling and casing of homeserver, identity server, and integration manager. ([#491](https://github.com/vector-im/element-android/issues/491))
- Perform .well-known request first, even if the entered URL is a valid homeserver base url ([#2843](https://github.com/vector-im/element-android/issues/2843))
- Use different copy for self verification. ([#3624](https://github.com/vector-im/element-android/issues/3624))
- Crash when opening room addresses screen with no internet connection ([#3634](https://github.com/vector-im/element-android/issues/3634))
- Fix unread messages marker being hidden in collapsed membership item ([#3655](https://github.com/vector-im/element-android/issues/3655))
- Ensure reaction emoji picker tabs look fine on small displays ([#3661](https://github.com/vector-im/element-android/issues/3661))
SDK API changes ⚠️
------------------
- RawService.getWellknown() now takes a domain instead of a matrixId as parameter ([#3572](https://github.com/vector-im/element-android/issues/3572))
Changes in Element 1.1.12 (2021-07-05)
======================================
Features ✨
----------
- Reveal password: use facility from com.google.android.material.textfield.TextInputLayout instead of manual handling. ([#3545](https://github.com/vector-im/element-android/issues/3545))
- Implements new design for Jump to unread and quick fix visibility issues. ([#3547](https://github.com/vector-im/element-android/issues/3547))
Bugfixes 🐛
----------
- Fix some issues with timeline cache invalidation and visibility. ([#3542](https://github.com/vector-im/element-android/issues/3542))
- Fix call invite processed after call is ended because of fastlane mode. ([#3564](https://github.com/vector-im/element-android/issues/3564))
- Fix crash after video call. ([#3577](https://github.com/vector-im/element-android/issues/3577))
- Fix crash out of memory ([#3583](https://github.com/vector-im/element-android/issues/3583))
- CryptoStore migration has to be object to avoid crash ([#3605](https://github.com/vector-im/element-android/issues/3605))
Changes in Element v1.1.11 (2021-06-22)
=======================================
Bugfixes 🐛
----------
- Send button does not show up half of the time ([#3535](https://github.com/vector-im/element-android/issues/3535))
- Fix crash on signout: release session at the end of clean up. ([#3538](https://github.com/vector-im/element-android/issues/3538))
Changes in Element v1.1.10 (2021-06-18)
=======================================

View File

@@ -63,7 +63,7 @@ Supported filename extensions are:
- ``.bugfix``: Signifying a bug fix.
- ``.doc``: Signifying a documentation improvement.
- ``.removal``: Signifying a deprecation or removal of public API. Can be used to notifying about API change in the Matrix SDK
- ``.misc``: A ticket has been closed, but it is not of interest to users. Note that in this case, the content of the file will not be output, but just the issue/PR number.
- ``.misc``: Any other changes.
See https://github.com/twisted/towncrier#news-fragments if you need more details.

View File

@@ -2,25 +2,25 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.3)
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.1.1)
aws-partitions (1.462.0)
aws-sdk-core (3.114.0)
aws-partitions (1.479.0)
aws-sdk-core (3.117.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.43.0)
aws-sdk-kms (1.44.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.95.1)
aws-sdk-s3 (1.96.1)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.3)
aws-sigv4 (1.2.4)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.0.3)
@@ -35,13 +35,15 @@ GEM
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
emoji_regex (3.2.2)
excon (0.81.0)
faraday (1.4.2)
excon (0.85.0)
faraday (1.5.1)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
@@ -50,12 +52,14 @@ GEM
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.3)
fastlane (2.184.0)
fastimage (2.2.4)
fastlane (2.187.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
artifactory (~> 3.0)
@@ -94,37 +98,36 @@ GEM
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.4.0)
google-apis-core (~> 0.1)
google-apis-core (0.3.0)
google-apis-androidpublisher_v3 (0.8.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-core (0.4.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.14)
httpclient (>= 2.8.1, < 3.0)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
retriable (>= 2.0, < 4.a)
rexml
signet (~> 0.14)
webrick
google-apis-iamcredentials_v1 (0.4.0)
google-apis-core (~> 0.1)
google-apis-playcustomapp_v1 (0.3.0)
google-apis-core (~> 0.1)
google-apis-storage_v1 (0.4.0)
google-apis-core (~> 0.1)
google-apis-iamcredentials_v1 (0.6.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-playcustomapp_v1 (0.5.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-storage_v1 (0.6.0)
google-apis-core (>= 0.4, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.1.0)
google-cloud-storage (1.31.1)
google-cloud-storage (1.34.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.1)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (0.16.2)
faraday (>= 0.17.3, < 2.0)
@@ -134,7 +137,7 @@ GEM
os (>= 0.9, < 2.0)
signet (~> 0.14)
highline (2.0.3)
http-cookie (1.0.3)
http-cookie (1.0.4)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.4.0)
@@ -150,7 +153,7 @@ GEM
os (1.1.1)
plist (3.6.0)
public_suffix (4.0.6)
rake (13.0.3)
rake (13.0.6)
representable (3.1.1)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
@@ -158,8 +161,8 @@ GEM
retriable (3.1.2)
rexml (3.2.5)
rouge (2.0.7)
ruby2_keywords (0.0.4)
rubyzip (2.3.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.15.0)
addressable (~> 2.3)
@@ -184,12 +187,13 @@ GEM
unicode-display_width (1.7.0)
webrick (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.19.0)
xcodeproj (1.20.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)

View File

@@ -55,9 +55,9 @@ dependencies {
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation 'com.google.android.material:material:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
}

View File

@@ -2,7 +2,7 @@
buildscript {
// Ref: https://kotlinlang.org/releases.html
ext.kotlin_version = '1.5.10'
ext.kotlin_version = '1.5.21'
ext.kotlin_coroutines_version = "1.5.0"
repositories {
google()
@@ -12,7 +12,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.google.gms:google-services:4.3.8'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3'

View File

@@ -4,7 +4,7 @@ Issue: #607
PR: #1354
## Introduction
Identity Servers support contact discovery on Matrix by letting people look up Third Party Identifiers to see if the owner has publicly linked them with their Matrix ID.
Identity servers support contact discovery on Matrix by letting people look up Third Party Identifiers to see if the owner has publicly linked them with their Matrix ID.
## Implementation
@@ -87,6 +87,6 @@ This screen displays the identity server configuration and the binding of the us
This screen is a form to set a new identity server URL
## Ref:
- https://matrix.org/blog/2019/09/27/privacy-improvements-in-synapse-1-4-and-riot-1-4 is a good summary of the role of an Identity server and the proper way to configure and use it in respect to the privacy and the consent of the user.
- https://matrix.org/blog/2019/09/27/privacy-improvements-in-synapse-1-4-and-riot-1-4 is a good summary of the role of an identity server and the proper way to configure and use it in respect to the privacy and the consent of the user.
- API documentation: https://matrix.org/docs/spec/identity_service/latest
- vector.im TOS: https://vector.im/identity-server-privacy-notice

View File

@@ -2,11 +2,11 @@ This document aims to describe how Element android displays notifications to the
# Table of Contents
1. [Prerequisites Knowledge](#prerequisites-knowledge)
* [How does a matrix client get a message from a Home Server?](#how-does-a-matrix-client-get-a-message-from-a-home-server)
* [How does a matrix client get a message from a homeserver?](#how-does-a-matrix-client-get-a-message-from-a-homeserver)
* [How does a mobile app receives push notification?](#how-does-a-mobile-app-receives-push-notification)
* [Push VS Notification](#push-vs-notification)
* [Push in the matrix federated world](#push-in-the-matrix-federated-world)
* [How does the Home Server knows when to notify a client?](#how-does-the-home-server-knows-when-to-notify-a-client)
* [How does the homeserver know when to notify a client?](#how-does-the-homeserver-know-when-to-notify-a-client)
* [Push vs privacy, and mitigation](#push-vs-privacy-and-mitigation)
* [Background processing limitations](#background-processing-limitations)
2. [Element Notification implementations](#element-notification-implementations)
@@ -22,9 +22,9 @@ First let's start with some prerequisite knowledge
# Prerequisites Knowledge
## How does a matrix client get a message from a Home Server?
## How does a matrix client get a message from a homeserver?
In order to get messages from a home server, a matrix client need to perform a ``sync`` operation.
In order to get messages from a homeserver, a matrix client need to perform a ``sync`` operation.
`To read events, the intended flow of operation is for clients to first call the /sync API without a since parameter. This returns the most recent message events for each room, as well as the state of the room at the start of the returned timeline. `
@@ -90,7 +90,7 @@ That means that Element Android, a matrix client created by New Vector, is using
If you create your own matrix client, you will also need to deploy an instance of a **Push Gateway** with the credentials needed to use FCM for your app.
On registration, a matrix client must tell to it's Home Server what Push Gateway to use.
On registration, a matrix client must tell its homeserver what Push Gateway to use.
See [Sygnal](https://github.com/matrix-org/sygnal/) for a reference implementation.
```
@@ -122,13 +122,13 @@ Recommended reading:
* https://matrix.org/docs/spec/client_server/r0.4.0.html#id128
## How does the Home Server knows when to notify a client?
## How does the homeserver know when to notify a client?
This is defined by [**push rules**](https://matrix.org/docs/spec/client_server/r0.4.0.html#push-rules-).
`A push rule is a single rule that states under what conditions an event should be passed onto a push gateway and how the notification should be presented (sound / importance).`
A Home Server can be configured with default rules (for Direct messages, group messages, mentions, etc.. ).
A homeserver can be configured with default rules (for Direct messages, group messages, mentions, etc.. ).
There are different kind of push rules, it can be per room (each new message on this room should be notified), it can also define a pattern that a message should match (when you are mentioned, or key word based).
@@ -187,7 +187,7 @@ In background, and depending on wether push is available or not, Element will us
## Push (FCM) received in background
In order to enable Push, Element must first get a push token from the firebase SDK, then register a pusher with this token on the HomeServer.
In order to enable Push, Element must first get a push token from the firebase SDK, then register a pusher with this token on the homeserver.
When a message should be notified to a user, the user's homeserver notifies the registered `push gateway` for Element, that is [sygnal](https://github.com/matrix-org/sygnal) _- The reference implementation for push gateways -_ hosted by matrix.org.
@@ -199,7 +199,7 @@ Homeserver ----> Sygnal (configured for Element) ----> FCM ----> Element
The push gateway is configured to only send `(eventId,roomId)` in the push payload (for better [privacy](#push-vs-privacy-and-mitigation)).
Element needs then to synchronise with the user's HomeServer, in order to resolve the event and create a notification.
Element needs then to synchronise with the user's homeserver, in order to resolve the event and create a notification.
As per [Google recommendation](https://android-developers.googleblog.com/2018/09/notifying-your-users-with-fcm.html), Element will then use the WorkManager API in order to trigger a background sync.
@@ -217,7 +217,7 @@ Homeserver ----> Sygnal ----> FCM ----> Element
**Possible outcomes**
Upon reception of the FCM push, Element will perform a sync call to the Home Server, during this process it is possible that:
Upon reception of the FCM push, Element will perform a sync call to the homeserver, during this process it is possible that:
* Happy path, the sync is performed, the message resolved and displayed in the notification drawer
* The notified message is not in the sync. Can happen if a lot of things did happen since the push (`gappy sync`)
* The sync generates additional notifications (e.g an encrypted message where the user is mentioned detected locally)

View File

@@ -0,0 +1,2 @@
Hlavní změny v této verzi: beta podpora pro Spaces. Komprimace videa před odesláním.
Úplný záznam změn: https://github.com/vector-im/element-android/releases/tag/v1.1.7

View File

@@ -0,0 +1,2 @@
Hlavní změny v této verzi: vylepšení pro Spaces
Úplný záznam změn: https://github.com/vector-im/element-android/releases/tag/v1.1.8

View File

@@ -0,0 +1,2 @@
Hlavní změny v této verzi: doplněna podpora pro síť gitter.im
Úplný záznam změn: https://github.com/vector-im/element-android/releases/tag/v1.1.9

View File

@@ -0,0 +1,2 @@
Hlavní změny v této verzi: aktualizace vzhledu a stylu a nové funkce prostorů.
Úplný záznam změn: https://github.com/vector-im/element-android/releases/tag/v1.1.10

View File

@@ -0,0 +1,2 @@
Hlavní změny v této verzi: aktualizace vzhledu a stylu a nové funkce prostorů (bugfix pro 1.1.10)
Úplný záznam změn: https://github.com/vector-im/element-android/releases/tag/v1.1.11

View File

@@ -0,0 +1,2 @@
Hauptänderungen: Design-Update und neue Features für Spaces
Vollständige Änderungsliste: https://github.com/vector-im/element-android/releases/tag/v1.1.10

View File

@@ -0,0 +1,2 @@
Hauptänderungen: Design-Update und neue Features für Spaces (Bugfix für 1.1.10)
Vollständige Änderungsliste: https://github.com/vector-im/element-android/releases/tag/v1.1.11

View File

@@ -0,0 +1,2 @@
Main changes in this version: theme and style update and new features for spaces (bugfix for 1.1.10)
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.11

View File

@@ -0,0 +1,2 @@
Main changes in this version: theme and style update and fix a crash after video call
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.12

View File

@@ -0,0 +1,2 @@
Main changes in this version: mainly stability and bugfixes update.
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.13

View File

@@ -0,0 +1,2 @@
Põhilised muutused selles versioonis: teemade ja välimuse uuendused ning mõned kogukondade uuendused
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.1.10

View File

@@ -0,0 +1,2 @@
Põhilised muutused selles versioonis: teemade ja välimuse uuendused ning mõned kogukondade uuendused (1.1.10 veaparandus)
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.1.11

View File

@@ -0,0 +1,2 @@
Principaux changements pour cette version : prise en charge des espaces en bêta. Compression des vidéos avant envoi.
Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.7

View File

@@ -0,0 +1,2 @@
Principaux changements pour cette version : amélioration des espaces.
Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.8

View File

@@ -0,0 +1,2 @@
Principaux changements pour cette version : ajout de la prise en charge de gitter.im
Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.9

View File

@@ -1,30 +1,39 @@
Element est une nouvelle application de messagerie et de collaboration qui :
Element est à la fois une messagerie sécurisée et une application de collaboration en équipe, idéale pour les conversations de groupe en télétravail. Cette application utilise le chiffrement de bout en bout. Elle permet de mettre en place des téléconférences vidéo, du partage de fichier et des appels vocaux.
1. Vous permet de préserver votre vie privée
2. Vous permet de communiquer avec nimporte qui sur réseau Matrix, et plus encore grâce aux intégrations dautres applications telles que Slack ou Discord
3. Vous protège de la publicité et de la collecte de données
4. Vous protège grâce au chiffrement de bout-à-bout et à la signature croisée pour authentifier les autres utilisateurs
<b>Les fonctionnalités dElement incluent :</b>
- Outils de communication en ligne avancés
- Communication dentreprise sécurisée par le chiffrement de bout en bout des messages, même pour les travailleurs à distance
- Messagerie décentralisée basée sur le framework open source Matrix
- Partage sécurisé de fichiers avec chiffrement des données lors de la gestion de projet
- Conversations vidéo par voix sur IP et partage décran
- Intégration facile avec vos outils de collaboration, de gestion de projet, services de VoIP et autres applications de messagerie
Element est complètement différente des autres applications de messagerie et de collaboration puisque lapplication est décentralisée et open-source.
Element est complètement différente des autres applications de messagerie et de collaboration. Elle sappuie sur Matrix, un réseau ouvert de communication décentralisée. Elle permet lauto-hébergement pour que ses utilisateurs restent le plus en contrôle possible de leurs données et leurs messages.
Element vous permet dhéberger vous-même ou de choisir un hôte vous permettant dassurer votre vie privée, la propriété et le contrôle de vos données et de vos conversations. Cela vous donne accès à un réseau ouvert. Vous nêtes donc pas condamné à parler à dautres utilisateurs dElement seulement. Et c'est très sécurisé.
<b>Confidentialité et messagerie chiffrée</b>
Element vous protège des publicités non désirées, du minage de données et des prisons dorées. Elle protègé vos données et vos communications vocales grâce au chiffrement de bout en bout et à la vérification de signature croisée entre appareils.
Element peut faire tout ça car elle est basée sur Matrix, le protocole standard pour la communication ouverte et décentralisée.
Element vous donne la main sur votre confidentialité en vous permettant de communiquer de manière sécurisée avec tout le réseau Matrix ou dautres applications de communication dentreprise au travers dintégrations dapplications comme Slack.
Element vous donne le contrôle en vous laissant choisir qui héberge vos conversations. Depuis l'application Element, vous pouvez choisir votre hôte de différentes manières :
<b>Element peut être auto-hébergé</b>
Pour une meilleure souveraineté sur vos données et conversations, Element peut être auto-hébergé ou vous pouvez choisir votre hôte Matrix - la norme open source pour les communications décentralisées. Element garantit votre confidentialité, conformité aux normes de sécurité, tout en proposant une intégration souple.
1. Créer un compte gratuit sur le serveur public matrix.org hébergé par les développeurs de Matrix, ou choisir parmi les milliers de serveurs public hébergés par des bénévoles
2. Héberger vous-même votre compte en installant un serveur sur votre propre machine
3. Créer un compte sur un serveur personnalisé en souscrivant sur la plateforme d'hébergement « Element Matrix Services » (EMS)
<b>Vos données vous appartiennent</b>
Vous décidez où stocker vos données et messages. Aucun risque de minage de données où daccès par des tierce parties.
<b>Pourquoi choisir Element ?</b>
Element vous place aux commandes de différente manières :
1. Inscrivez vous sur le serveur public matrix.org hébergé par les développeurs de Matrix ou choisissez parmi des milliers de serveurs publics hébergés par des bénévoles
2. Auto-hébergez votre compte sur un serveur de votre proper infrastructure informatique
3. Inscrivez vous à la plateforme dhébergement Element Matrix Services
<b>VOS DONNÉES VOUS APPARTIENNENT</b> : vous décidez où stocker vos données et messages. Ils vous appartiennent et vous les maîtrisez. Aucune multinationale ne viendra extraire vos données pour les envoyer au plus offrant.
<b>Messagerie et collaboration ouvertes</b>
Vous pouvez discuter avec tout le réseau Matrix, que vos interlocuteurs utilisent Element, une autre application Matrix, ou même sils utilisent une application complètement différente.
<b>MESSAGERIE ET COLLABORATION OUVERTES</b> : vous pouvez discuter avec tout le réseau Matrix, quils utilisent Element ou une autre application Matrix, même sils utilisent une autre plateforme de messagerie telle que Slack, IRC ou XMPP.
<b>Ultra sécurisé</b>
Chiffrement de bout en bout (seules les personnes dans la conversation peuvent déchiffrer les messages) et vérification de signature croisée entre appareils.
<b>ULTRA SÉCURISÉ</b> : chiffrement de bout en bout (seuls les membres dune conversation peuvent déchiffrer les messages), et signature croisée pour vérifier les appareils de vos interlocuteurs.
<b>Communication et intégration parfaites</b>
Messagerie instantannée, appels audio et vidéo, partage de fichier, partage décran et bien dautres intégrations, bots et widgets. Lancez des salons, des communautés, restez en contact et menez vos projets à bien.
<b>TOUTES VOS COMMUNICATIONS</b> : messagerie, appels audio et vidéo, partage de fichier, partage décran et un grand nombre dintégrations, robots et widgets. Participez à des salons, des communautés, restez en contact et faites avancer vos projets.
<b>PARTOUT AVEC VOUS</b> : votre historique reste synchronisé entre tous vos appareils et sur le web sur https://element.io/app.
<b>Reprenez où vous vous êtes arrêté</b>
Restez en contact où que vous soyez grâce à lhistorique des messages synchronisé entre tous vos appareils et sur le web sur https://app.element.io

View File

@@ -0,0 +1,2 @@
Főbb változtatások ebben a verzióban: kinézet és stílus frissítések és új funkciók a terekhez
Teljes változásnapló: https://github.com/vector-im/element-android/releases/tag/v1.1.10

View File

@@ -0,0 +1,2 @@
Főbb változtatások ebben a verzióban: kinézet és stílus frissítések és új funkciók a terekhez (hibajavítás az 1.1.10-hez)
Teljes változásnapló: https://github.com/vector-im/element-android/releases/tag/v1.1.11

View File

@@ -0,0 +1,2 @@
Modifiche principali in questa versione: aggiornati tema e stile e nuove funzioni per gli spazi .
Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.1.10

View File

@@ -0,0 +1,2 @@
Modifiche principali in questa versione: aggiornati tema e stile e nuove funzioni per gli spazi (bugfix per 1.1.10)
Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.1.11

View File

@@ -1,2 +1,2 @@
Principais mudanças nesta version: suporte beta para Espaços. Comprimir vídeo antes de enviar.
Principais mudanças nesta versão: suporte beta para Espaços. Comprimir vídeo antes de enviar.
Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.1.7

View File

@@ -1,2 +1,2 @@
Principais mudanças nesta version: melhoramento para Espaços.
Principais mudanças nesta versão: melhoramento para Espaços.
Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.1.8

View File

@@ -1,2 +1,2 @@
Principais mudanças nesta version: adicionar supporte a rede gitter.im.
Principais mudanças nesta versão: adicionar supporte a rede gitter.im.
Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.1.9

View File

@@ -0,0 +1,2 @@
Principais mudanças nesta versão: atualização de tema e estilo e novas funcionalidades para espaços.
Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.1.10

View File

@@ -0,0 +1,2 @@
Principais mudanças nesta versão: atualização de tema e estilo e novas funcionalidades para espaços (bugfix para 1.1.10)
Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.1.11

View File

@@ -0,0 +1,2 @@
Основні зміни цієї версії: оновлено зовнішній вигляд та нові можливості для просторів
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases/tag/v1.1.10

View File

@@ -0,0 +1,2 @@
Основні зміни цієї версії: оновлено зовнішній вигляд та нові можливості для просторів (bugfix для 1.1.10)
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases/tag/v1.1.11

View File

@@ -0,0 +1,2 @@
此版本的主要变化:主题和样式更新以及空间的新功能。
完整更新日志https://github.com/vector-im/element-android/releases/tag/v1.1.10

View File

@@ -0,0 +1,2 @@
此版本的主要变化主题和样式更新以及空间的新功能1.1.10 的错误修复)
完整更新日志https://github.com/vector-im/element-android/releases/tag/v1.1.11

View File

@@ -0,0 +1,2 @@
此版本中的主要變動:佈景主題與樣式更新,以及空間的新功能。
完整的變更紀錄https://github.com/vector-im/element-android/releases/tag/v1.1.10

View File

@@ -0,0 +1,2 @@
此版本中的主要變動佈景主題與樣式更新以及空間的新功能1.1.10 的臭蟲修復版本)
完整的變更紀錄https://github.com/vector-im/element-android/releases/tag/v1.1.11

Binary file not shown.

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=13bf8d3cf8eeeb5770d19741a59bde9bd966dd78d17f1bbad787a05ef19d1c2d
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionSha256Sum=9bb8bc05f562f2d42bdf1ba8db62f6b6fa1c3bf6c392228802cc7cb0578fe7e0
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

2
gradlew vendored
View File

@@ -72,7 +72,7 @@ case "`uname`" in
Darwin* )
darwin=true
;;
MINGW* )
MSYS* | MINGW* )
msys=true
;;
NONSTOP* )

View File

@@ -53,7 +53,7 @@ android {
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
// Pref theme
implementation 'androidx.preference:preference-ktx:1.1.1'
// PFLockScreen attrs

View File

@@ -24,6 +24,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar
import im.vector.lib.ui.styles.R
import im.vector.lib.ui.styles.databinding.ActivityDebugMaterialThemeBinding
import im.vector.lib.ui.styles.dialogs.MaterialProgressDialog
// Rendering is not the same with VectorBaseActivity
abstract class DebugMaterialThemeActivity : AppCompatActivity() {
@@ -50,14 +51,20 @@ abstract class DebugMaterialThemeActivity : AppCompatActivity() {
}
views.debugShowDialog.setOnClickListener {
MaterialAlertDialogBuilder(this)
.setTitle("Dialog title")
.setMessage("Dialog content")
.setIcon(R.drawable.ic_debug_icon)
.setPositiveButton("Positive", null)
.setNegativeButton("Negative", null)
.setNeutralButton("Neutral", null)
.show()
showTestDialog(0)
}
views.debugShowDialogDestructive.setOnClickListener {
showTestDialog(R.style.ThemeOverlay_Vector_MaterialAlertDialog_Destructive)
}
views.debugShowDialogNegativeDestructive.setOnClickListener {
showTestDialog(R.style.ThemeOverlay_Vector_MaterialAlertDialog_NegativeDestructive)
}
views.debugShowProgressDialog.setOnClickListener {
MaterialProgressDialog(this)
.show(message = "Progress Dialog\nLine 2", cancellable = true)
}
views.debugShowBottomSheet.setOnClickListener {
@@ -65,6 +72,17 @@ abstract class DebugMaterialThemeActivity : AppCompatActivity() {
}
}
private fun showTestDialog(theme: Int) {
MaterialAlertDialogBuilder(this, theme)
.setTitle("Dialog title")
.setMessage("Dialog content\nLine 2")
.setIcon(R.drawable.ic_debug_icon)
.setPositiveButton("Positive", null)
.setNegativeButton("Negative", null)
.setNeutralButton("Neutral", null)
.show()
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu_debug, menu)
return true

View File

@@ -17,6 +17,8 @@
package im.vector.lib.ui.styles.debug
import android.os.Bundle
import android.text.InputType
import android.widget.EditText
import androidx.appcompat.app.AppCompatActivity
import im.vector.lib.ui.styles.databinding.ActivityDebugTextViewBinding
@@ -27,5 +29,20 @@ abstract class DebugVectorTextViewActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
val views = ActivityDebugTextViewBinding.inflate(layoutInflater)
setContentView(views.root)
views.debugShowPassword.setOnClickListener {
views.debugTextInputEditText.showPassword(true)
}
views.debugHidePassword.setOnClickListener {
views.debugTextInputEditText.showPassword(false)
}
}
private fun EditText.showPassword(visible: Boolean) {
if (visible) {
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
} else {
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PASSWORD
}
}
}

View File

@@ -452,6 +452,27 @@
android:layout_gravity="center_horizontal"
android:text="Show Dialog" />
<Button
android:id="@+id/debugShowDialogDestructive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Show Dialog Destructive" />
<Button
android:id="@+id/debugShowDialogNegativeDestructive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Show Dialog Neg Destructive" />
<Button
android:id="@+id/debugShowProgressDialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Show Progress Dialog" />
<Button
android:id="@+id/debugShowBottomSheet"
android:layout_width="wrap_content"

View File

@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp"
tools:ignore="HardcodedText">
<TextView
@@ -65,4 +67,34 @@
android:layout_height="wrap_content"
android:text="Default (TextAppearance.Vector.Body)\nline 2" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/debugTextInputLayout"
style="@style/Widget.Vector.TextInputLayout.Password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:hint="Password"
app:errorEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/debugTextInputEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/debugShowPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Show password" />
<Button
android:id="@+id/debugHidePassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hide password" />
</LinearLayout>

View File

@@ -0,0 +1,37 @@
/*
* Copyright (c) 2021 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.ui.styles.dialogs
import android.content.Context
import android.view.LayoutInflater
import androidx.appcompat.app.AlertDialog
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import im.vector.lib.ui.styles.R
import im.vector.lib.ui.styles.databinding.DialogProgressMaterialBinding
class MaterialProgressDialog(val context: Context) {
fun show(message: CharSequence, cancellable: Boolean = false): AlertDialog {
val view = LayoutInflater.from(context).inflate(R.layout.dialog_progress_material, null)
val views = DialogProgressMaterialBinding.bind(view)
views.message.text = message
return MaterialAlertDialogBuilder(context)
.setCancelable(cancellable)
.setView(view)
.show()
}
}

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- Inspired from https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/layout/progress_dialog.xml -->
<LinearLayout
android:id="@+id/body"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingTop="10dp"
android:paddingEnd="8dp"
android:paddingBottom="10dp">
<ProgressBar
android:id="@android:id/progress"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:max="10000" />
<TextView
android:id="@+id/message"
style="@style/Widget.Vector.TextView.Body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
tools:text="Content\nLine 2" />
</LinearLayout>
</FrameLayout>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="text_size_title">24sp</dimen>
<dimen name="text_size_headline">18sp</dimen>
<dimen name="text_size_subtitle">16sp</dimen>
<dimen name="text_size_body">14sp</dimen>
<dimen name="text_size_caption">12sp</dimen>
<dimen name="text_size_micro">10sp</dimen>
<dimen name="text_size_button">14sp</dimen>
</resources>

View File

@@ -1,28 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AlertDialog.Vector.Light" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
<item name="colorPrimary">@color/palette_element_green</item>
<item name="colorSecondary">@color/palette_element_green</item>
<item name="colorSurface">@color/element_system_light</item>
<item name="colorOnSurface">@color/element_content_primary_light</item>
<item name="colorError">@color/element_alert_light</item>
<!--item name="alertDialogStyle">@style/MaterialAlertDialog.App</item>
<item name="materialAlertDialogTitleTextStyle">@style/MaterialAlertDialog.App.Title.Text</item>
<item name="buttonBarPositiveButtonStyle">@style/Widget.App.Button</item>
<item name="buttonBarNeutralButtonStyle">@style/Widget.App.Button</item-->
<style name="ThemeOverlay.Vector.MaterialAlertDialog" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
<item name="materialAlertDialogTitleTextStyle">@style/MaterialAlertDialog.Vector.Title.Text</item>
<item name="materialAlertDialogBodyTextStyle">@style/MaterialAlertDialog.Vector.Body.Text</item>
<item name="buttonBarPositiveButtonStyle">@style/Widget.Vector.Button.TextButton.Dialog</item>
<item name="buttonBarNegativeButtonStyle">@style/Widget.Vector.Button.TextButton.Dialog</item>
<item name="buttonBarNeutralButtonStyle">@style/Widget.Vector.Button.TextButton.Dialog</item>
</style>
<style name="AlertDialog.Vector.Dark" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
<item name="colorPrimary">@color/palette_element_green</item>
<item name="colorSecondary">@color/palette_element_green</item>
<item name="colorSurface">@color/element_system_dark</item>
<item name="colorOnSurface">@color/element_content_primary_dark</item>
<item name="colorError">@color/element_alert_dark</item>
<!--item name="alertDialogStyle">@style/MaterialAlertDialog.App</item>
<item name="materialAlertDialogTitleTextStyle">@style/MaterialAlertDialog.App.Title.Text</item>
<item name="buttonBarPositiveButtonStyle">@style/Widget.App.Button</item>
<item name="buttonBarNeutralButtonStyle">@style/Widget.App.Button</item-->
<style name="ThemeOverlay.Vector.MaterialAlertDialog.Destructive">
<item name="buttonBarPositiveButtonStyle">@style/Widget.Vector.Button.TextButton.Dialog.Destructive</item>
</style>
<style name="ThemeOverlay.Vector.MaterialAlertDialog.NegativeDestructive">
<item name="buttonBarNegativeButtonStyle">@style/Widget.Vector.Button.TextButton.Dialog.Destructive</item>
</style>
<!-- Title -->
<style name="MaterialAlertDialog.Vector.Title.Text" parent="MaterialAlertDialog.MaterialComponents.Title.Text">
<item name="android:textAppearance">@style/TextAppearance.Vector.Subtitle</item>
</style>
<!-- Body -->
<style name="MaterialAlertDialog.Vector.Body.Text" parent="MaterialAlertDialog.MaterialComponents.Body.Text">
<item name="android:textAppearance">@style/TextAppearance.Vector.Body</item>
<item name="lineHeight">20sp</item>
</style>
<!-- Buttons -->
<style name="Widget.Vector.Button.TextButton.Dialog" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textAppearance">@style/TextAppearance.Vector.Button</item>
</style>
<style name="Widget.Vector.Button.TextButton.Dialog.Destructive">
<item name="materialThemeOverlay">@style/VectorMaterialThemeOverlayDestructive</item>
</style>
</resources>

View File

@@ -6,6 +6,7 @@
<item name="android:paddingRight">16dp</item>
<item name="android:minWidth">94dp</item>
<item name="android:textAppearance">@style/TextAppearance.Vector.Button</item>
<item name="cornerRadius">8dp</item>
<item name="lineHeight">24sp</item>
</style>
@@ -32,6 +33,7 @@
<item name="android:paddingRight">16dp</item>
<item name="android:minWidth">94dp</item>
<item name="android:textAppearance">@style/TextAppearance.Vector.Button</item>
<item name="cornerRadius">8dp</item>
<item name="lineHeight">24sp</item>
</style>
@@ -48,6 +50,7 @@
<item name="colorControlHighlight">?colorSecondary</item>
<item name="materialThemeOverlay">@style/VectorMaterialThemeOverlayPositive</item>
<item name="android:textAppearance">@style/TextAppearance.Vector.Button</item>
<item name="cornerRadius">8dp</item>
<item name="lineHeight">24sp</item>
</style>
@@ -61,6 +64,7 @@
<item name="strokeColor">@color/button_background_tint_selector</item>
<item name="strokeWidth">1dp</item>
<item name="android:textAppearance">@style/TextAppearance.Vector.Button</item>
<item name="cornerRadius">8dp</item>
<item name="lineHeight">24sp</item>
</style>

View File

@@ -4,6 +4,11 @@
<!-- Default style for TextInputLayout -->
<style name="Widget.Vector.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox" />
<style name="Widget.Vector.TextInputLayout.Password">
<item name="endIconMode">password_toggle</item>
<item name="endIconTint">?vctr_content_secondary</item>
</style>
<style name="Widget.Vector.EditText.Composer" parent="Widget.AppCompat.EditText">
<item name="android:background">@android:color/transparent</item>
<item name="android:inputType">textCapSentences|textMultiLine</item>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="vctr_jump_to_unread_style" format="reference" />
<style name="Widget.Vector.JumpToUnread.Base" parent="Widget.MaterialComponents.Chip.Action">
<item name="android:textAppearance">@style/TextAppearance.Vector.Body.Medium</item>
<item name="chipEndPadding">12dp</item>
<item name="chipIconSize">24dp</item>
<item name="chipMinHeight">44dp</item>
<item name="chipStartPadding">12dp</item>
<item name="closeIconVisible">true</item>
<item name="android:elevation">6dp</item>
<item name="closeIconSize">24dp</item>
</style>
<style name="Widget.Vector.JumpToUnread.Light" parent="Widget.Vector.JumpToUnread.Base">
<item name="chipBackgroundColor">@color/element_background_light</item>
<item name="closeIconTint">?vctr_content_secondary</item>
</style>
<style name="Widget.Vector.JumpToUnread.Dark" parent="Widget.Vector.JumpToUnread.Base">
<item name="chipBackgroundColor">@color/element_system_dark</item>
<item name="closeIconTint">?vctr_content_quaternary</item>
</style>
</resources>

View File

@@ -14,7 +14,7 @@
<style name="TextAppearance.Vector.Title" parent="TextAppearance.MaterialComponents.Headline3">
<item name="fontFamily">sans-serif</item>
<item name="android:fontFamily">sans-serif</item>
<item name="android:textSize">24sp</item>
<item name="android:textSize">@dimen/text_size_title</item>
<item name="android:letterSpacing">0</item>
<item name="android:textColor">?vctr_content_primary</item>
</style>
@@ -27,7 +27,7 @@
<style name="TextAppearance.Vector.Headline.Medium" parent="TextAppearance.MaterialComponents.Headline1">
<item name="fontFamily">sans-serif-medium</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textSize">18sp</item>
<item name="android:textSize">@dimen/text_size_headline</item>
<item name="android:letterSpacing">0</item>
<item name="android:textColor">?vctr_content_primary</item>
</style>
@@ -35,7 +35,7 @@
<style name="TextAppearance.Vector.Subtitle" parent="TextAppearance.MaterialComponents.Subtitle1">
<item name="fontFamily">sans-serif</item>
<item name="android:fontFamily">sans-serif</item>
<item name="android:textSize">16sp</item>
<item name="android:textSize">@dimen/text_size_subtitle</item>
<item name="android:letterSpacing">0</item>
<item name="android:textColor">?vctr_content_secondary</item>
</style>
@@ -49,7 +49,7 @@
<style name="TextAppearance.Vector.Body" parent="TextAppearance.MaterialComponents.Body1">
<item name="fontFamily">sans-serif</item>
<item name="android:fontFamily">sans-serif</item>
<item name="android:textSize">14sp</item>
<item name="android:textSize">@dimen/text_size_body</item>
<item name="android:letterSpacing">0</item>
<item name="android:textColor">?vctr_content_primary</item>
</style>
@@ -62,7 +62,7 @@
<style name="TextAppearance.Vector.Caption" parent="TextAppearance.MaterialComponents.Caption">
<item name="fontFamily">sans-serif</item>
<item name="android:fontFamily">sans-serif</item>
<item name="android:textSize">12sp</item>
<item name="android:textSize">@dimen/text_size_caption</item>
<item name="android:letterSpacing">0</item>
<item name="android:textColor">?vctr_content_secondary</item>
</style>
@@ -70,14 +70,14 @@
<style name="TextAppearance.Vector.Micro" parent="TextAppearance.MaterialComponents.Caption">
<item name="fontFamily">sans-serif</item>
<item name="android:fontFamily">sans-serif</item>
<item name="android:textSize">10sp</item>
<item name="android:textSize">@dimen/text_size_micro</item>
<item name="android:letterSpacing">0</item>
</style>
<style name="TextAppearance.Vector.Button" parent="TextAppearance.MaterialComponents.Button">
<item name="fontFamily">sans-serif-medium</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textSize">16sp</item>
<item name="android:textSize">@dimen/text_size_button</item>
<item name="android:letterSpacing">0.02</item>
</style>

View File

@@ -76,7 +76,6 @@
<item name="android:textViewStyle">@style/Widget.Vector.TextView.Body</item>
<item name="materialButtonStyle">@style/Widget.Vector.Button</item>
<item name="toolbarStyle">@style/Widget.Vector.Toolbar</item>
<item name="materialAlertDialogTheme">@style/AlertDialog.Vector.Dark</item>
<item name="bottomNavigationStyle">@style/BottomNavigation.Vector</item>
<item name="searchViewStyle">@style/Widget.Vector.SearchView</item>
<item name="textInputStyle">@style/Widget.Vector.TextInputLayout</item>
@@ -89,6 +88,7 @@
<!-- Default theme -->
<item name="bottomSheetDialogTheme">@style/Theme.Vector.BottomSheetDialog.Dark</item>
<item name="materialAlertDialogTheme">@style/ThemeOverlay.Vector.MaterialAlertDialog</item>
<item name="android:textColorLink">@color/element_link_dark</item>
@@ -132,6 +132,9 @@
<item name="vctr_social_login_button_twitter_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Twitter.Dark</item>
<item name="vctr_social_login_button_apple_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Apple.Dark</item>
<item name="vctr_social_login_button_gitlab_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Gitlab.Dark</item>
<item name="vctr_jump_to_unread_style">@style/Widget.Vector.JumpToUnread.Dark</item>
</style>
<style name="Theme.Vector.Dark" parent="Base.Theme.Vector.Dark" />

View File

@@ -76,7 +76,6 @@
<item name="android:textViewStyle">@style/Widget.Vector.TextView.Body</item>
<item name="materialButtonStyle">@style/Widget.Vector.Button</item>
<item name="toolbarStyle">@style/Widget.Vector.Toolbar</item>
<item name="materialAlertDialogTheme">@style/AlertDialog.Vector.Light</item>
<item name="bottomNavigationStyle">@style/BottomNavigation.Vector</item>
<item name="searchViewStyle">@style/Widget.Vector.SearchView</item>
<item name="textInputStyle">@style/Widget.Vector.TextInputLayout</item>
@@ -89,6 +88,7 @@
<!-- Default theme -->
<item name="bottomSheetDialogTheme">@style/Theme.Vector.BottomSheetDialog.Light</item>
<item name="materialAlertDialogTheme">@style/ThemeOverlay.Vector.MaterialAlertDialog</item>
<item name="android:textColorLink">@color/element_link_light</item>
@@ -134,6 +134,9 @@
<item name="vctr_social_login_button_twitter_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Twitter.Light</item>
<item name="vctr_social_login_button_apple_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Apple.Light</item>
<item name="vctr_social_login_button_gitlab_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Gitlab.Light</item>
<item name="vctr_jump_to_unread_style">@style/Widget.Vector.JumpToUnread.Light</item>
</style>
<style name="Theme.Vector.Light" parent="Base.Theme.Vector.Light" />

View File

@@ -9,7 +9,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "io.realm:realm-gradle-plugin:10.5.0"
classpath "io.realm:realm-gradle-plugin:10.6.1"
}
}
@@ -121,7 +121,7 @@ dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
implementation "androidx.appcompat:appcompat:1.3.0"
implementation "androidx.core:core-ktx:1.5.0"
implementation "androidx.core:core-ktx:1.6.0"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
@@ -169,30 +169,30 @@ dependencies {
implementation 'com.otaliastudios:transcoder:0.10.3'
// Phone number https://github.com/google/libphonenumber
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.24'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.27'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.robolectric:robolectric:4.5.1'
//testImplementation 'org.robolectric:shadows-support-v4:3.0'
// Note: version sticks to 1.9.2 due to https://github.com/mockk/mockk/issues/281
testImplementation 'io.mockk:mockk:1.11.0'
testImplementation 'org.amshove.kluent:kluent-android:1.65'
testImplementation 'io.mockk:mockk:1.12.0'
testImplementation 'org.amshove.kluent:kluent-android:1.68'
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
// Plant Timber tree for test
testImplementation 'net.lachlanmckee:timber-junit-rule:1.0.1'
kaptAndroidTest "com.google.dagger:dagger-compiler:$daggerVersion"
androidTestImplementation 'androidx.test:core:1.3.0'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'org.amshove.kluent:kluent-android:1.65'
androidTestImplementation 'io.mockk:mockk-android:1.11.0'
androidTestImplementation 'androidx.test:core:1.4.0'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test:rules:1.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'org.amshove.kluent:kluent-android:1.68'
androidTestImplementation 'io.mockk:mockk-android:1.12.0'
androidTestImplementation "androidx.arch.core:core-testing:$arch_version"
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
// Plant Timber tree for test
androidTestImplementation 'net.lachlanmckee:timber-junit-rule:1.0.1'
androidTestUtil 'androidx.test:orchestrator:1.3.0'
androidTestUtil 'androidx.test:orchestrator:1.4.0'
}

View File

@@ -78,7 +78,7 @@ class CommonTestHelper(context: Context) {
}
/**
* Create a Home server configuration, with Http connection allowed for test
* Create a homeserver configuration, with Http connection allowed for test
*/
fun createHomeServerConfig(): HomeServerConnectionConfig {
return HomeServerConnectionConfig.Builder()

View File

@@ -816,7 +816,7 @@ class KeysBackupTest : InstrumentedTest {
// - Do an e2e backup to the homeserver
mKeysBackupTestHelper.prepareAndCreateKeysBackupData(keysBackup)
// Get key backup version from the home server
// Get key backup version from the homeserver
val keysVersionResult = mTestHelper.doSync<KeysVersionResult?> {
keysBackup.getCurrentVersion(it)
}

View File

@@ -16,8 +16,12 @@
package org.matrix.android.sdk.api
import org.matrix.android.sdk.BuildConfig
import timber.log.Timber
/**
* This class contains pattern to match the different Matrix ids
* Ref: https://matrix.org/docs/spec/appendices#identifier-grammar
*/
object MatrixPatterns {
@@ -25,7 +29,7 @@ object MatrixPatterns {
private const val DOMAIN_REGEX = ":[A-Z0-9.-]+(:[0-9]{2,5})?"
// regex pattern to find matrix user ids in a string.
// See https://matrix.org/speculator/spec/HEAD/appendices.html#historical-user-ids
// See https://matrix.org/docs/spec/appendices#historical-user-ids
private const val MATRIX_USER_IDENTIFIER_REGEX = "@[A-Z0-9\\x21-\\x39\\x3B-\\x7F]+$DOMAIN_REGEX"
val PATTERN_CONTAIN_MATRIX_USER_IDENTIFIER = MATRIX_USER_IDENTIFIER_REGEX.toRegex(RegexOption.IGNORE_CASE)
@@ -154,7 +158,7 @@ object MatrixPatterns {
* Orders which are not strings, or do not consist solely of ascii characters in the range \x20 (space) to \x7E (~),
* or consist of more than 50 characters, are forbidden and the field should be ignored if received.
*/
fun isValidOrderString(order: String?) : Boolean {
fun isValidOrderString(order: String?): Boolean {
return order != null && order.length < 50 && order matches ORDER_STRING_REGEX
}
@@ -163,4 +167,18 @@ object MatrixPatterns {
"[^a-z0-9._%#@=+-]".toRegex().replace(it, "")
}
}
/**
* Return the domain form a userId
* Examples:
* - "@alice:domain.org".getDomain() will return "domain.org"
* - "@bob:domain.org:3455".getDomain() will return "domain.org:3455"
*/
fun String.getDomain(): String {
if (BuildConfig.DEBUG && !isUserId(this)) {
// They are some invalid userId localpart in the wild, but the domain part should be there anyway
Timber.w("Not a valid user ID: $this")
}
return substringAfter(":")
}
}

View File

@@ -18,11 +18,11 @@ package org.matrix.android.sdk.api.auth.data
import android.net.Uri
import com.squareup.moshi.JsonClass
import okhttp3.CipherSuite
import okhttp3.TlsVersion
import org.matrix.android.sdk.api.auth.data.HomeServerConnectionConfig.Builder
import org.matrix.android.sdk.internal.network.ssl.Fingerprint
import org.matrix.android.sdk.internal.util.ensureTrailingSlash
import okhttp3.CipherSuite
import okhttp3.TlsVersion
/**
* This data class holds how to connect to a specific Homeserver.
@@ -31,7 +31,12 @@ import okhttp3.TlsVersion
*/
@JsonClass(generateAdapter = true)
data class HomeServerConnectionConfig(
// This is the homeserver URL entered by the user
val homeServerUri: Uri,
// This is the homeserver base URL for the client-server API. Default to homeServerUri,
// but can be updated with data from .Well-Known before login, and/or with the data
// included in the login response
val homeServerUriBase: Uri = homeServerUri,
val identityServerUri: Uri? = null,
val antiVirusServerUri: Uri? = null,
val allowedFingerprints: List<Fingerprint> = emptyList(),
@@ -47,7 +52,6 @@ data class HomeServerConnectionConfig(
* This builder should be use to create a [HomeServerConnectionConfig] instance.
*/
class Builder {
private lateinit var homeServerUri: Uri
private var identityServerUri: Uri? = null
private var antiVirusServerUri: Uri? = null
@@ -69,14 +73,14 @@ data class HomeServerConnectionConfig(
*/
fun withHomeServerUri(hsUri: Uri): Builder {
if (hsUri.scheme != "http" && hsUri.scheme != "https") {
throw RuntimeException("Invalid home server URI: $hsUri")
throw RuntimeException("Invalid homeserver URI: $hsUri")
}
// ensure trailing /
val hsString = hsUri.toString().ensureTrailingSlash()
homeServerUri = try {
Uri.parse(hsString)
} catch (e: Exception) {
throw RuntimeException("Invalid home server URI: $hsUri")
throw RuntimeException("Invalid homeserver URI: $hsUri")
}
return this
}
@@ -134,7 +138,7 @@ data class HomeServerConnectionConfig(
}
/**
* Add an accepted TLS version for TLS connections with the home server.
* Add an accepted TLS version for TLS connections with the homeserver.
*
* @param tlsVersion the tls version to add to the set of TLS versions accepted.
* @return this builder
@@ -156,7 +160,7 @@ data class HomeServerConnectionConfig(
}
/**
* Add a TLS cipher suite to the list of accepted TLS connections with the home server.
* Add a TLS cipher suite to the list of accepted TLS connections with the homeserver.
*
* @param tlsCipherSuite the tls cipher suite to add.
* @return this builder
@@ -234,16 +238,16 @@ data class HomeServerConnectionConfig(
*/
fun build(): HomeServerConnectionConfig {
return HomeServerConnectionConfig(
homeServerUri,
identityServerUri,
antiVirusServerUri,
allowedFingerprints,
shouldPin,
tlsVersions,
tlsCipherSuites,
shouldAcceptTlsExtensions,
allowHttpExtension,
forceUsageTlsVersions
homeServerUri = homeServerUri,
identityServerUri = identityServerUri,
antiVirusServerUri = antiVirusServerUri,
allowedFingerprints = allowedFingerprints,
shouldPin = shouldPin,
tlsVersions = tlsVersions,
tlsCipherSuites = tlsCipherSuites,
shouldAcceptTlsExtensions = shouldAcceptTlsExtensions,
allowHttpExtension = allowHttpExtension,
forceUsageTlsVersions = forceUsageTlsVersions
)
}
}

View File

@@ -51,13 +51,18 @@ data class SessionParams(
val deviceId = credentials.deviceId
/**
* The current homeserver Url. It can be different that the homeserver url entered
* during login phase, because a redirection may have occurred
* The homeserver Url entered by the user during the login phase.
*/
val homeServerUrl = homeServerConnectionConfig.homeServerUri.toString()
/**
* The current homeserver host
* The current homeserver Url for client-server API. It can be different that the homeserver url entered
* during login phase, because a redirection may have occurred
*/
val homeServerUrlBase = homeServerConnectionConfig.homeServerUriBase.toString()
/**
* The current homeserver host, using what has been entered by the user during login phase
*/
val homeServerHost = homeServerConnectionConfig.homeServerUri.host

View File

@@ -38,7 +38,7 @@ data class RegistrationFlowResponse(
val completedStages: List<String>? = null,
/**
* The session identifier that the client must pass back to the home server, if one is provided,
* The 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")

View File

@@ -22,11 +22,6 @@ import org.matrix.android.sdk.api.auth.data.WellKnown
* Ref: https://matrix.org/docs/spec/client_server/latest#well-known-uri
*/
sealed class WellknownResult {
/**
* The provided matrixId is no valid. Unable to extract a domain name.
*/
object InvalidMatrixId : WellknownResult()
/**
* Retrieve the specific piece of information from the user in a way which fits within the existing client user experience,
* if the client is inclined to do so. Failure can take place instead if no good user experience for this is possible at this point.

View File

@@ -0,0 +1,21 @@
/*
* Copyright (c) 2021 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.failure
sealed class MatrixIdFailure : Failure.FeatureFailure() {
object InvalidMatrixId : MatrixIdFailure()
}

View File

@@ -29,8 +29,10 @@ interface RawService {
/**
* Specific case for the well-known file. Cache validity is 8 hours
* @param domain the domain to get the .well-known file, for instance "matrix.org".
* The URL will be "https://{domain}/.well-known/matrix/client"
*/
suspend fun getWellknown(userId: String): String
suspend fun getWellknown(domain: String): String
/**
* Clear all the cache data

View File

@@ -28,7 +28,7 @@ import org.matrix.android.sdk.internal.crypto.store.SavedKeyBackupKeyInfo
interface KeysBackupService {
/**
* Retrieve the current version of the backup from the home server
* Retrieve the current version of the backup from the homeserver
*
* It can be different than keysBackupVersion.
* @param callback onSuccess(null) will be called if there is no backup on the server

View File

@@ -54,7 +54,7 @@ enum class KeysBackupState {
// Need to check the current backup version on the homeserver
Unknown,
// Checking if backup is enabled on home server
// Checking if backup is enabled on homeserver
CheckingBackUpOnHomeserver,
// Backup has been stopped because a new backup version has been detected on the homeserver

View File

@@ -104,7 +104,7 @@ data class Event(
/**
* The `age` value transcoded in a timestamp based on the device clock when the SDK received
* the event from the home server.
* the event from the homeserver.
* Unlike `age`, this value is static.
*/
@Transient

View File

@@ -32,7 +32,13 @@ data class HomeServerCapabilities(
/**
* Default identity server url, provided in Wellknown
*/
val defaultIdentityServerUrl: String? = null
val defaultIdentityServerUrl: String? = null,
/**
* Room versions supported by the server
* This capability describes the default and available room versions a server supports, and at what level of stability.
* Clients should make use of this capability to determine if users need to be encouraged to upgrade their rooms.
*/
val roomVersions: RoomVersionCapabilities? = null
) {
companion object {
const val MAX_UPLOAD_FILE_SIZE_UNKNOWN = -1L

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019 New Vector Ltd
* Copyright 2021 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.
@@ -14,14 +14,19 @@
* limitations under the License.
*/
package im.vector.app.core.dialogs
package org.matrix.android.sdk.api.session.homeserver
import androidx.annotation.AttrRes
import androidx.appcompat.app.AlertDialog
import im.vector.app.R
import im.vector.app.features.themes.ThemeUtils
data class RoomVersionCapabilities(
val defaultRoomVersion: String,
val supportedVersion: List<RoomVersionInfo>
)
fun AlertDialog.withColoredButton(whichButton: Int, @AttrRes color: Int = R.attr.colorError): AlertDialog {
getButton(whichButton)?.setTextColor(ThemeUtils.getColor(context, color))
return this
data class RoomVersionInfo(
val version: String,
val status: RoomVersionStatus
)
enum class RoomVersionStatus {
STABLE,
UNSTABLE
}

View File

@@ -34,6 +34,7 @@ import org.matrix.android.sdk.api.session.room.tags.TagsService
import org.matrix.android.sdk.api.session.room.timeline.TimelineService
import org.matrix.android.sdk.api.session.room.typing.TypingService
import org.matrix.android.sdk.api.session.room.uploads.UploadsService
import org.matrix.android.sdk.api.session.room.version.RoomVersionService
import org.matrix.android.sdk.api.session.search.SearchResult
import org.matrix.android.sdk.api.session.space.Space
import org.matrix.android.sdk.api.util.Optional
@@ -57,7 +58,8 @@ interface Room :
RelationService,
RoomCryptoService,
RoomPushRuleService,
RoomAccountDataService {
RoomAccountDataService,
RoomVersionService {
/**
* The roomId of this room

View File

@@ -125,6 +125,12 @@ interface RoomService {
*/
suspend fun deleteRoomAlias(roomAlias: String)
/**
* Return the current local changes membership for the given room.
* see [getChangeMembershipsLive] for more details.
*/
fun getChangeMemberships(roomIdOrAlias: String): ChangeMembershipState
/**
* Return a live data of all local changes membership that happened since the session has been opened.
* It allows you to track this in your client to known what is currently being processed by the SDK.

View File

@@ -54,5 +54,5 @@ data class MessageAudioContent(
) : MessageWithAttachmentContent {
override val mimeType: String?
get() = encryptedFileInfo?.mimetype ?: audioInfo?.mimeType
get() = audioInfo?.mimeType
}

View File

@@ -60,8 +60,7 @@ data class MessageFileContent(
) : MessageWithAttachmentContent {
override val mimeType: String?
get() = encryptedFileInfo?.mimetype
?: info?.mimeType
get() = info?.mimeType
?: MimeTypeMap.getFileExtensionFromUrl(filename ?: body)?.let { extension ->
MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension)
}

View File

@@ -20,7 +20,6 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import org.matrix.android.sdk.api.session.events.model.Content
import org.matrix.android.sdk.api.session.room.model.relation.RelationDefaultContent
import org.matrix.android.sdk.api.util.MimeTypes
import org.matrix.android.sdk.internal.crypto.model.rest.EncryptedFileInfo
@JsonClass(generateAdapter = true)
@@ -55,5 +54,5 @@ data class MessageImageContent(
@Json(name = "file") override val encryptedFileInfo: EncryptedFileInfo? = null
) : MessageImageInfoContent {
override val mimeType: String?
get() = encryptedFileInfo?.mimetype ?: info?.mimeType ?: MimeTypes.Images
get() = info?.mimeType
}

View File

@@ -55,5 +55,5 @@ data class MessageStickerContent(
@Json(name = "file") override val encryptedFileInfo: EncryptedFileInfo? = null
) : MessageImageInfoContent {
override val mimeType: String?
get() = encryptedFileInfo?.mimetype ?: info?.mimeType
get() = info?.mimeType
}

View File

@@ -53,5 +53,5 @@ data class MessageVideoContent(
@Json(name = "file") override val encryptedFileInfo: EncryptedFileInfo? = null
) : MessageWithAttachmentContent {
override val mimeType: String?
get() = encryptedFileInfo?.mimetype ?: videoInfo?.mimeType
get() = videoInfo?.mimeType
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2021 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.session.room.version
interface RoomVersionService {
/**
* Return the room version of this room
*/
fun getRoomVersion(): String
/**
* Upgrade to the given room version
* @return the replacement room id
*/
suspend fun upgradeToVersion(version: String): String
/**
* Get the recommended room version for the current homeserver
*/
fun getRecommendedVersion() : String
/**
* Ask if the user has enough power level to upgrade the room
*/
fun userMayUpgradeRoom(userId: String): Boolean
/**
* Return true if the current room version is declared unstable by the homeserver
*/
fun isUsingUnstableRoomVersion(): Boolean
}

View File

@@ -18,6 +18,7 @@ package org.matrix.android.sdk.api.session.space
import org.matrix.android.sdk.api.session.room.Room
import org.matrix.android.sdk.api.session.room.model.RoomSummary
import org.matrix.android.sdk.api.session.space.model.SpaceChildContent
interface Space {
@@ -38,6 +39,8 @@ interface Space {
autoJoin: Boolean = false,
suggested: Boolean? = false)
fun getChildInfo(roomId: String): SpaceChildContent?
suspend fun removeChildren(roomId: String)
@Throws

View File

@@ -21,8 +21,8 @@ import org.matrix.android.sdk.api.util.JsonDict
import org.matrix.android.sdk.internal.auth.data.Availability
import org.matrix.android.sdk.internal.auth.data.LoginFlowResponse
import org.matrix.android.sdk.internal.auth.data.PasswordLoginParams
import org.matrix.android.sdk.internal.auth.data.RiotConfig
import org.matrix.android.sdk.internal.auth.data.TokenLoginParams
import org.matrix.android.sdk.internal.auth.data.WebClientConfig
import org.matrix.android.sdk.internal.auth.login.ResetPasswordMailConfirmed
import org.matrix.android.sdk.internal.auth.registration.AddThreePidRegistrationParams
import org.matrix.android.sdk.internal.auth.registration.AddThreePidRegistrationResponse
@@ -44,16 +44,16 @@ import retrofit2.http.Url
*/
internal interface AuthAPI {
/**
* Get a Riot config file, using the name including the domain
* Get a Web client config file, using the name including the domain
*/
@GET("config.{domain}.json")
suspend fun getRiotConfigDomain(@Path("domain") domain: String): RiotConfig
suspend fun getWebClientConfigDomain(@Path("domain") domain: String): WebClientConfig
/**
* Get a Riot config file
* Get a Web client default config file
*/
@GET("config.json")
suspend fun getRiotConfig(): RiotConfig
suspend fun getWebClientConfig(): WebClientConfig
/**
* Get the version information of the homeserver

View File

@@ -19,6 +19,8 @@ package org.matrix.android.sdk.internal.auth
import android.net.Uri
import dagger.Lazy
import okhttp3.OkHttpClient
import org.matrix.android.sdk.api.MatrixPatterns
import org.matrix.android.sdk.api.MatrixPatterns.getDomain
import org.matrix.android.sdk.api.auth.AuthenticationService
import org.matrix.android.sdk.api.auth.data.Credentials
import org.matrix.android.sdk.api.auth.data.HomeServerConnectionConfig
@@ -28,10 +30,11 @@ import org.matrix.android.sdk.api.auth.login.LoginWizard
import org.matrix.android.sdk.api.auth.registration.RegistrationWizard
import org.matrix.android.sdk.api.auth.wellknown.WellknownResult
import org.matrix.android.sdk.api.failure.Failure
import org.matrix.android.sdk.api.failure.MatrixIdFailure
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.util.appendParamToUrl
import org.matrix.android.sdk.internal.SessionManager
import org.matrix.android.sdk.internal.auth.data.RiotConfig
import org.matrix.android.sdk.internal.auth.data.WebClientConfig
import org.matrix.android.sdk.internal.auth.db.PendingSessionData
import org.matrix.android.sdk.internal.auth.login.DefaultLoginWizard
import org.matrix.android.sdk.internal.auth.login.DirectLoginTask
@@ -122,7 +125,7 @@ internal class DefaultAuthenticationService @Inject constructor(
private fun getHomeServerUrlBase(): String? {
return pendingSessionData
?.homeServerConnectionConfig
?.homeServerUri
?.homeServerUriBase
?.toString()
?.trim { it == '/' }
}
@@ -143,9 +146,9 @@ internal class DefaultAuthenticationService @Inject constructor(
return result.fold(
{
// The homeserver exists and up to date, keep the config
// Homeserver url may have been changed, if it was a Riot url
// Homeserver url may have been changed, if it was a Web client url
val alteredHomeServerConnectionConfig = homeServerConnectionConfig.copy(
homeServerUri = Uri.parse(it.homeServerUrl)
homeServerUriBase = Uri.parse(it.homeServerUrl)
)
pendingSessionData = PendingSessionData(alteredHomeServerConnectionConfig)
@@ -154,7 +157,7 @@ internal class DefaultAuthenticationService @Inject constructor(
},
{
if (it is UnrecognizedCertificateException) {
throw Failure.UnrecognizedCertificateFailure(homeServerConnectionConfig.homeServerUri.toString(), it.fingerprint)
throw Failure.UnrecognizedCertificateFailure(homeServerConnectionConfig.homeServerUriBase.toString(), it.fingerprint)
} else {
throw it
}
@@ -165,46 +168,57 @@ internal class DefaultAuthenticationService @Inject constructor(
private suspend fun getLoginFlowInternal(homeServerConnectionConfig: HomeServerConnectionConfig): LoginFlowResult {
val authAPI = buildAuthAPI(homeServerConnectionConfig)
// First check the homeserver version
return runCatching {
executeRequest(null) {
authAPI.versions()
// First check if there is a well-known file
return try {
getWellknownLoginFlowInternal(homeServerConnectionConfig)
} catch (failure: Throwable) {
if (failure is Failure.OtherServerError
&& failure.httpCode == HttpsURLConnection.HTTP_NOT_FOUND /* 404 */) {
// 404, no well-known data, try direct access to the API
// First check the homeserver version
return runCatching {
executeRequest(null) {
authAPI.versions()
}
}
.map { versions ->
// Ok, it seems that the homeserver url is valid
getLoginFlowResult(authAPI, versions, homeServerConnectionConfig.homeServerUriBase.toString())
}
.fold(
{
it
},
{
if (it is Failure.OtherServerError
&& it.httpCode == HttpsURLConnection.HTTP_NOT_FOUND /* 404 */) {
// It's maybe a Web client url?
getWebClientDomainLoginFlowInternal(homeServerConnectionConfig)
} else {
throw it
}
}
)
} else {
throw failure
}
}
.map { versions ->
// Ok, it seems that the homeserver url is valid
getLoginFlowResult(authAPI, versions, homeServerConnectionConfig.homeServerUri.toString())
}
.fold(
{
it
},
{
if (it is Failure.OtherServerError
&& it.httpCode == HttpsURLConnection.HTTP_NOT_FOUND /* 404 */) {
// It's maybe a Riot url?
getRiotDomainLoginFlowInternal(homeServerConnectionConfig)
} else {
throw it
}
}
)
}
private suspend fun getRiotDomainLoginFlowInternal(homeServerConnectionConfig: HomeServerConnectionConfig): LoginFlowResult {
private suspend fun getWebClientDomainLoginFlowInternal(homeServerConnectionConfig: HomeServerConnectionConfig): LoginFlowResult {
val authAPI = buildAuthAPI(homeServerConnectionConfig)
val domain = homeServerConnectionConfig.homeServerUri.host
?: return getRiotLoginFlowInternal(homeServerConnectionConfig)
?: return getWebClientLoginFlowInternal(homeServerConnectionConfig)
// Ok, try to get the config.domain.json file of a RiotWeb client
// Ok, try to get the config.domain.json file of a Web client
return runCatching {
executeRequest(null) {
authAPI.getRiotConfigDomain(domain)
authAPI.getWebClientConfigDomain(domain)
}
}
.map { riotConfig ->
onRiotConfigRetrieved(homeServerConnectionConfig, riotConfig)
.map { webClientConfig ->
onWebClientConfigRetrieved(homeServerConnectionConfig, webClientConfig)
}
.fold(
{
@@ -214,7 +228,7 @@ internal class DefaultAuthenticationService @Inject constructor(
if (it is Failure.OtherServerError
&& it.httpCode == HttpsURLConnection.HTTP_NOT_FOUND /* 404 */) {
// Try with config.json
getRiotLoginFlowInternal(homeServerConnectionConfig)
getWebClientLoginFlowInternal(homeServerConnectionConfig)
} else {
throw it
}
@@ -222,40 +236,24 @@ internal class DefaultAuthenticationService @Inject constructor(
)
}
private suspend fun getRiotLoginFlowInternal(homeServerConnectionConfig: HomeServerConnectionConfig): LoginFlowResult {
private suspend fun getWebClientLoginFlowInternal(homeServerConnectionConfig: HomeServerConnectionConfig): LoginFlowResult {
val authAPI = buildAuthAPI(homeServerConnectionConfig)
// Ok, try to get the config.json file of a RiotWeb client
return runCatching {
executeRequest(null) {
authAPI.getRiotConfig()
}
// Ok, try to get the config.json file of a Web client
return executeRequest(null) {
authAPI.getWebClientConfig()
}
.map { riotConfig ->
onRiotConfigRetrieved(homeServerConnectionConfig, riotConfig)
.let { webClientConfig ->
onWebClientConfigRetrieved(homeServerConnectionConfig, webClientConfig)
}
.fold(
{
it
},
{
if (it is Failure.OtherServerError
&& it.httpCode == HttpsURLConnection.HTTP_NOT_FOUND /* 404 */) {
// Try with wellknown
getWellknownLoginFlowInternal(homeServerConnectionConfig)
} else {
throw it
}
}
)
}
private suspend fun onRiotConfigRetrieved(homeServerConnectionConfig: HomeServerConnectionConfig, riotConfig: RiotConfig): LoginFlowResult {
val defaultHomeServerUrl = riotConfig.getPreferredHomeServerUrl()
private suspend fun onWebClientConfigRetrieved(homeServerConnectionConfig: HomeServerConnectionConfig, webClientConfig: WebClientConfig): LoginFlowResult {
val defaultHomeServerUrl = webClientConfig.getPreferredHomeServerUrl()
if (defaultHomeServerUrl?.isNotEmpty() == true) {
// Ok, good sign, we got a default hs url
val newHomeServerConnectionConfig = homeServerConnectionConfig.copy(
homeServerUri = Uri.parse(defaultHomeServerUrl)
homeServerUriBase = Uri.parse(defaultHomeServerUrl)
)
val newAuthAPI = buildAuthAPI(newHomeServerConnectionConfig)
@@ -275,15 +273,13 @@ internal class DefaultAuthenticationService @Inject constructor(
val domain = homeServerConnectionConfig.homeServerUri.host
?: throw Failure.OtherServerError("", HttpsURLConnection.HTTP_NOT_FOUND /* 404 */)
// Create a fake userId, for the getWellknown task
val fakeUserId = "@alice:$domain"
val wellknownResult = getWellknownTask.execute(GetWellknownTask.Params(fakeUserId, homeServerConnectionConfig))
val wellknownResult = getWellknownTask.execute(GetWellknownTask.Params(domain, homeServerConnectionConfig))
return when (wellknownResult) {
is WellknownResult.Prompt -> {
val newHomeServerConnectionConfig = homeServerConnectionConfig.copy(
homeServerUri = Uri.parse(wellknownResult.homeServerUrl),
identityServerUri = wellknownResult.identityServerUrl?.let { Uri.parse(it) }
homeServerUriBase = Uri.parse(wellknownResult.homeServerUrl),
identityServerUri = wellknownResult.identityServerUrl?.let { Uri.parse(it) } ?: homeServerConnectionConfig.identityServerUri
)
val newAuthAPI = buildAuthAPI(newHomeServerConnectionConfig)
@@ -379,7 +375,14 @@ internal class DefaultAuthenticationService @Inject constructor(
override suspend fun getWellKnownData(matrixId: String,
homeServerConnectionConfig: HomeServerConnectionConfig?): WellknownResult {
return getWellknownTask.execute(GetWellknownTask.Params(matrixId, homeServerConnectionConfig))
if (!MatrixPatterns.isUserId(matrixId)) {
throw MatrixIdFailure.InvalidMatrixId
}
return getWellknownTask.execute(GetWellknownTask.Params(
domain = matrixId.getDomain(),
homeServerConnectionConfig = homeServerConnectionConfig)
)
}
override suspend fun directAuthentication(homeServerConnectionConfig: HomeServerConnectionConfig,
@@ -390,7 +393,7 @@ internal class DefaultAuthenticationService @Inject constructor(
}
private fun buildAuthAPI(homeServerConnectionConfig: HomeServerConnectionConfig): AuthAPI {
val retrofit = retrofitFactory.create(buildClient(homeServerConnectionConfig), homeServerConnectionConfig.homeServerUri.toString())
val retrofit = retrofitFactory.create(buildClient(homeServerConnectionConfig), homeServerConnectionConfig.homeServerUriBase.toString())
return retrofit.create(AuthAPI::class.java)
}

View File

@@ -42,7 +42,7 @@ internal class DefaultIsValidClientServerApiTask @Inject constructor(
override suspend fun execute(params: IsValidClientServerApiTask.Params): Boolean {
val client = buildClient(params.homeServerConnectionConfig)
val homeServerUrl = params.homeServerConnectionConfig.homeServerUri.toString()
val homeServerUrl = params.homeServerConnectionConfig.homeServerUriBase.toString()
val authAPI = retrofitFactory.create(client, homeServerUrl)
.create(AuthAPI::class.java)

View File

@@ -38,7 +38,7 @@ internal class DefaultSessionCreator @Inject constructor(
) : SessionCreator {
/**
* Credentials can affect the homeServerConnectionConfig, override home server url and/or
* Credentials can affect the homeServerConnectionConfig, override homeserver url and/or
* identity server url if provided in the credentials
*/
override suspend fun createSession(credentials: Credentials, homeServerConnectionConfig: HomeServerConnectionConfig): Session {
@@ -56,7 +56,7 @@ internal class DefaultSessionCreator @Inject constructor(
tryOrNull {
isValidClientServerApiTask.execute(
IsValidClientServerApiTask.Params(
homeServerConnectionConfig.copy(homeServerUri = it)
homeServerConnectionConfig.copy(homeServerUriBase = it)
)
)
.also { Timber.d("Overriding homeserver url: $it") }
@@ -66,7 +66,7 @@ internal class DefaultSessionCreator @Inject constructor(
val sessionParams = SessionParams(
credentials = credentials,
homeServerConnectionConfig = homeServerConnectionConfig.copy(
homeServerUri = overriddenUrl ?: homeServerConnectionConfig.homeServerUri,
homeServerUriBase = overriddenUrl ?: homeServerConnectionConfig.homeServerUriBase,
identityServerUri = credentials.discoveryInformation?.identityServer?.baseURL
// remove trailing "/"
?.trim { it == '/' }

View File

@@ -20,7 +20,7 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
internal data class RiotConfig(
internal data class WebClientConfig(
/**
* This is now deprecated, but still used first, rather than value from "default_server_config"
*/
@@ -28,7 +28,7 @@ internal data class RiotConfig(
val defaultHomeServerUrl: String?,
@Json(name = "default_server_config")
val defaultServerConfig: RiotConfigDefaultServerConfig?
val defaultServerConfig: WebClientConfigDefaultServerConfig?
) {
fun getPreferredHomeServerUrl(): String? {
return defaultHomeServerUrl
@@ -38,13 +38,13 @@ internal data class RiotConfig(
}
@JsonClass(generateAdapter = true)
internal data class RiotConfigDefaultServerConfig(
internal data class WebClientConfigDefaultServerConfig(
@Json(name = "m.homeserver")
val homeServer: RiotConfigBaseConfig? = null
val homeServer: WebClientConfigBaseConfig? = null
)
@JsonClass(generateAdapter = true)
internal data class RiotConfigBaseConfig(
internal data class WebClientConfigBaseConfig(
@Json(name = "base_url")
val baseURL: String? = null
)

View File

@@ -16,17 +16,19 @@
package org.matrix.android.sdk.internal.auth.db
import org.matrix.android.sdk.api.auth.data.Credentials
import org.matrix.android.sdk.api.auth.data.sessionId
import org.matrix.android.sdk.internal.di.MoshiProvider
import android.net.Uri
import io.realm.DynamicRealm
import io.realm.RealmMigration
import org.matrix.android.sdk.api.auth.data.Credentials
import org.matrix.android.sdk.api.auth.data.HomeServerConnectionConfig
import org.matrix.android.sdk.api.auth.data.sessionId
import org.matrix.android.sdk.internal.di.MoshiProvider
import timber.log.Timber
internal object AuthRealmMigration : RealmMigration {
// Current schema version
const val SCHEMA_VERSION = 3L
const val SCHEMA_VERSION = 4L
override fun migrate(realm: DynamicRealm, oldVersion: Long, newVersion: Long) {
Timber.d("Migrating Auth Realm from $oldVersion to $newVersion")
@@ -34,6 +36,7 @@ internal object AuthRealmMigration : RealmMigration {
if (oldVersion <= 0) migrateTo1(realm)
if (oldVersion <= 1) migrateTo2(realm)
if (oldVersion <= 2) migrateTo3(realm)
if (oldVersion <= 3) migrateTo4(realm)
}
private fun migrateTo1(realm: DynamicRealm) {
@@ -81,4 +84,34 @@ internal object AuthRealmMigration : RealmMigration {
}
?.addPrimaryKey(SessionParamsEntityFields.SESSION_ID)
}
private fun migrateTo4(realm: DynamicRealm) {
Timber.d("Step 3 -> 4")
Timber.d("Update SessionParamsEntity to add HomeServerConnectionConfig.homeServerUriBase value")
val adapter = MoshiProvider.providesMoshi()
.adapter(HomeServerConnectionConfig::class.java)
realm.schema.get("SessionParamsEntity")
?.transform {
val homeserverConnectionConfigJson = it.getString(SessionParamsEntityFields.HOME_SERVER_CONNECTION_CONFIG_JSON)
val homeserverConnectionConfig = adapter
.fromJson(homeserverConnectionConfigJson)
val homeserverUrl = homeserverConnectionConfig?.homeServerUri?.toString()
// Special case for matrix.org. Old session may use "https://matrix.org", newer one may use
// "https://matrix-client.matrix.org". So fix that here
val alteredHomeserverConnectionConfig =
if (homeserverUrl == "https://matrix.org" || homeserverUrl == "https://matrix-client.matrix.org") {
homeserverConnectionConfig.copy(
homeServerUri = Uri.parse("https://matrix.org"),
homeServerUriBase = Uri.parse("https://matrix-client.matrix.org")
)
} else {
homeserverConnectionConfig
}
it.set(SessionParamsEntityFields.HOME_SERVER_CONNECTION_CONFIG_JSON, adapter.toJson(alteredHomeserverConnectionConfig))
}
}
}

View File

@@ -50,7 +50,7 @@ internal class DefaultDirectLoginTask @Inject constructor(
override suspend fun execute(params: DirectLoginTask.Params): Session {
val client = buildClient(params.homeServerConnectionConfig)
val homeServerUrl = params.homeServerConnectionConfig.homeServerUri.toString()
val homeServerUrl = params.homeServerConnectionConfig.homeServerUriBase.toString()
val authAPI = retrofitFactory.create(client, homeServerUrl)
.create(AuthAPI::class.java)

View File

@@ -112,7 +112,6 @@ internal abstract class CryptoModule {
@SessionScope
fun providesRealmConfiguration(@SessionFilesDirectory directory: File,
@UserMd5 userMd5: String,
realmCryptoStoreMigration: RealmCryptoStoreMigration,
realmKeysUtils: RealmKeysUtils): RealmConfiguration {
return RealmConfiguration.Builder()
.directory(directory)
@@ -123,7 +122,7 @@ internal abstract class CryptoModule {
.modules(RealmCryptoStoreModule())
.allowWritesOnUiThread(true)
.schemaVersion(RealmCryptoStoreMigration.CRYPTO_STORE_SCHEMA_VERSION)
.migration(realmCryptoStoreMigration)
.migration(RealmCryptoStoreMigration)
.build()
}

View File

@@ -39,7 +39,9 @@ internal object MXEncryptedAttachments {
private const val SECRET_KEY_SPEC_ALGORITHM = "AES"
private const val MESSAGE_DIGEST_ALGORITHM = "SHA-256"
fun encrypt(clearStream: InputStream, mimetype: String?, outputFile: File, progress: ((current: Int, total: Int) -> Unit)): EncryptedFileInfo {
fun encrypt(clearStream: InputStream,
outputFile: File,
progress: ((current: Int, total: Int) -> Unit)): EncryptedFileInfo {
val t0 = System.currentTimeMillis()
val secureRandom = SecureRandom()
val initVectorBytes = ByteArray(16) { 0.toByte() }
@@ -86,7 +88,6 @@ internal object MXEncryptedAttachments {
return EncryptedFileInfo(
url = null,
mimetype = mimetype,
key = EncryptedFileKey(
alg = "A256CTR",
ext = true,
@@ -155,10 +156,9 @@ internal object MXEncryptedAttachments {
* Encrypt an attachment stream.
* DO NOT USE for big files, it will load all in memory
* @param attachmentStream the attachment stream. Will be closed after this method call.
* @param mimetype the mime type
* @return the encryption file info
*/
fun encryptAttachment(attachmentStream: InputStream, mimetype: String?): EncryptionResult {
fun encryptAttachment(attachmentStream: InputStream): EncryptionResult {
val t0 = System.currentTimeMillis()
val secureRandom = SecureRandom()
@@ -207,7 +207,6 @@ internal object MXEncryptedAttachments {
return EncryptionResult(
encryptedFileInfo = EncryptedFileInfo(
url = null,
mimetype = mimetype,
key = EncryptedFileKey(
alg = "A256CTR",
ext = true,
@@ -232,7 +231,9 @@ internal object MXEncryptedAttachments {
* @param outputStream the outputStream where the decrypted attachment will be write.
* @return true in case of success, false in case of error
*/
fun decryptAttachment(attachmentStream: InputStream?, elementToDecrypt: ElementToDecrypt?, outputStream: OutputStream): Boolean {
fun decryptAttachment(attachmentStream: InputStream?,
elementToDecrypt: ElementToDecrypt?,
outputStream: OutputStream): Boolean {
// sanity checks
if (null == attachmentStream || elementToDecrypt == null) {
Timber.e("## decryptAttachment() : null stream")

View File

@@ -56,7 +56,7 @@ data class MXDeviceInfo(
val signatures: Map<String, Map<String, String>>? = null,
/*
* Additional data from the home server.
* Additional data from the homeserver.
*/
@Json(name = "unsigned")
val unsigned: JsonDict? = null,

View File

@@ -29,12 +29,6 @@ data class EncryptedFileInfo(
@Json(name = "url")
val url: String? = null,
/**
* Not documented
*/
@Json(name = "mimetype")
val mimetype: String? = null,
/**
* Required. A JSON Web Key object.
*/

View File

@@ -18,6 +18,9 @@ package org.matrix.android.sdk.internal.crypto.store.db
import com.squareup.moshi.Moshi
import com.squareup.moshi.Types
import io.realm.DynamicRealm
import io.realm.RealmMigration
import io.realm.RealmObjectSchema
import org.matrix.android.sdk.api.extensions.tryOrNull
import org.matrix.android.sdk.api.util.JsonDict
import org.matrix.android.sdk.internal.crypto.model.MXDeviceInfo
@@ -35,29 +38,24 @@ import org.matrix.android.sdk.internal.crypto.store.db.model.KeysBackupDataEntit
import org.matrix.android.sdk.internal.crypto.store.db.model.MyDeviceLastSeenInfoEntityFields
import org.matrix.android.sdk.internal.crypto.store.db.model.OlmInboundGroupSessionEntityFields
import org.matrix.android.sdk.internal.crypto.store.db.model.OlmSessionEntityFields
import org.matrix.android.sdk.internal.crypto.store.db.model.OutboundGroupSessionInfoEntityFields
import org.matrix.android.sdk.internal.crypto.store.db.model.OutgoingGossipingRequestEntityFields
import org.matrix.android.sdk.internal.crypto.store.db.model.SharedSessionEntityFields
import org.matrix.android.sdk.internal.crypto.store.db.model.TrustLevelEntityFields
import org.matrix.android.sdk.internal.crypto.store.db.model.UserEntityFields
import org.matrix.android.sdk.internal.crypto.store.db.model.WithHeldSessionEntityFields
import org.matrix.android.sdk.internal.di.MoshiProvider
import org.matrix.android.sdk.internal.di.SerializeNulls
import io.realm.DynamicRealm
import io.realm.RealmMigration
import io.realm.RealmObjectSchema
import org.matrix.android.sdk.internal.crypto.store.db.model.OutboundGroupSessionInfoEntityFields
import org.matrix.androidsdk.crypto.data.MXOlmInboundGroupSession2
import timber.log.Timber
import javax.inject.Inject
import org.matrix.androidsdk.crypto.data.MXDeviceInfo as LegacyMXDeviceInfo
internal class RealmCryptoStoreMigration @Inject constructor(private val crossSigningKeysMapper: CrossSigningKeysMapper) : RealmMigration {
internal object RealmCryptoStoreMigration : RealmMigration {
companion object {
// 0, 1, 2: legacy Riot-Android
// 3: migrate to RiotX schema
// 4, 5, 6, 7, 8, 9: migrations from RiotX (which was previously 1, 2, 3, 4, 5, 6)
const val CRYPTO_STORE_SCHEMA_VERSION = 12L
}
// 0, 1, 2: legacy Riot-Android
// 3: migrate to RiotX schema
// 4, 5, 6, 7, 8, 9: migrations from RiotX (which was previously 1, 2, 3, 4, 5, 6)
const val CRYPTO_STORE_SCHEMA_VERSION = 12L
private fun RealmObjectSchema.addFieldIfNotExists(fieldName: String, fieldType: Class<*>): RealmObjectSchema {
if (!hasField(fieldName)) {
@@ -384,6 +382,8 @@ internal class RealmCryptoStoreMigration @Inject constructor(private val crossSi
private fun migrateTo7(realm: DynamicRealm) {
Timber.d("Step 6 -> 7")
Timber.d("Updating KeyInfoEntity table")
val crossSigningKeysMapper = CrossSigningKeysMapper(MoshiProvider.providesMoshi())
val keyInfoEntities = realm.where("KeyInfoEntity").findAll()
try {
keyInfoEntities.forEach {

View File

@@ -97,7 +97,7 @@ internal class DefaultInitializeCrossSigningTask @Inject constructor(
Timber.v("## CrossSigning - sskPublicKey:$sskPublicKey")
// Sign userSigningKey with master
// Sign selfSigningKey with master
val signedSSK = CryptoCrossSigningKey.Builder(userId, KeyUsage.SELF_SIGNING)
.key(sskPublicKey)
.build()

View File

@@ -19,9 +19,10 @@ package org.matrix.android.sdk.internal.database
import io.realm.DynamicRealm
import io.realm.FieldAttribute
import io.realm.RealmMigration
import org.matrix.android.sdk.api.session.room.model.VersioningState
import org.matrix.android.sdk.api.session.events.model.EventType
import org.matrix.android.sdk.api.session.room.model.Membership
import org.matrix.android.sdk.api.session.room.model.RoomJoinRulesContent
import org.matrix.android.sdk.api.session.room.model.VersioningState
import org.matrix.android.sdk.api.session.room.model.create.RoomCreateContent
import org.matrix.android.sdk.api.session.room.model.tag.RoomTag
import org.matrix.android.sdk.internal.database.model.CurrentStateEventEntityFields
@@ -40,14 +41,12 @@ import org.matrix.android.sdk.internal.database.model.SpaceChildSummaryEntityFie
import org.matrix.android.sdk.internal.database.model.SpaceParentSummaryEntityFields
import org.matrix.android.sdk.internal.database.model.TimelineEventEntityFields
import org.matrix.android.sdk.internal.di.MoshiProvider
import org.matrix.android.sdk.internal.query.process
import timber.log.Timber
import javax.inject.Inject
class RealmSessionStoreMigration @Inject constructor() : RealmMigration {
internal object RealmSessionStoreMigration : RealmMigration {
companion object {
const val SESSION_STORE_SCHEMA_VERSION = 14L
}
const val SESSION_STORE_SCHEMA_VERSION = 16L
override fun migrate(realm: DynamicRealm, oldVersion: Long, newVersion: Long) {
Timber.v("Migrating Realm Session from $oldVersion to $newVersion")
@@ -66,6 +65,8 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration {
if (oldVersion <= 11) migrateTo12(realm)
if (oldVersion <= 12) migrateTo13(realm)
if (oldVersion <= 13) migrateTo14(realm)
if (oldVersion <= 14) migrateTo15(realm)
if (oldVersion <= 15) migrateTo16(realm)
}
private fun migrateTo1(realm: DynamicRealm) {
@@ -292,7 +293,7 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration {
Timber.d("Step 13 -> 14")
val roomAccountDataSchema = realm.schema.create("RoomAccountDataEntity")
.addField(RoomAccountDataEntityFields.CONTENT_STR, String::class.java)
.addField(RoomAccountDataEntityFields.TYPE, String::class.java, FieldAttribute.INDEXED)
.addField(RoomAccountDataEntityFields.TYPE, String::class.java, FieldAttribute.INDEXED)
realm.schema.get("RoomEntity")
?.addRealmListField(RoomEntityFields.ACCOUNT_DATA.`$`, roomAccountDataSchema)
@@ -306,4 +307,27 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration {
roomAccountDataSchema.isEmbedded = true
}
private fun migrateTo15(realm: DynamicRealm) {
Timber.d("Step 14 -> 15")
// fix issue with flattenParentIds on DM that kept growing with duplicate
// so we reset it, will be updated next sync
realm.where("RoomSummaryEntity")
.process(RoomSummaryEntityFields.MEMBERSHIP_STR, Membership.activeMemberships())
.equalTo(RoomSummaryEntityFields.IS_DIRECT, true)
.findAll()
.onEach {
it.setString(RoomSummaryEntityFields.FLATTEN_PARENT_IDS, null)
}
}
private fun migrateTo16(realm: DynamicRealm) {
Timber.d("Step 15 -> 16")
realm.schema.get("HomeServerCapabilitiesEntity")
?.addField(HomeServerCapabilitiesEntityFields.ROOM_VERSIONS_JSON, String::class.java)
?.transform { obj ->
// Schedule a refresh of the capabilities
obj.setLong(HomeServerCapabilitiesEntityFields.LAST_UPDATED_TIMESTAMP, 0)
}
}
}

View File

@@ -43,7 +43,6 @@ internal class SessionRealmConfigurationFactory @Inject constructor(
@SessionFilesDirectory val directory: File,
@SessionId val sessionId: String,
@UserMd5 val userMd5: String,
val migration: RealmSessionStoreMigration,
context: Context) {
// Keep legacy preferences name for compatibility reason
@@ -72,7 +71,7 @@ internal class SessionRealmConfigurationFactory @Inject constructor(
.allowWritesOnUiThread(true)
.modules(SessionRealmModule())
.schemaVersion(RealmSessionStoreMigration.SESSION_STORE_SCHEMA_VERSION)
.migration(migration)
.migration(RealmSessionStoreMigration)
.build()
// Try creating a realm instance and if it succeeds we can clear the flag

View File

@@ -16,8 +16,15 @@
package org.matrix.android.sdk.internal.database.mapper
import org.matrix.android.sdk.api.extensions.tryOrNull
import org.matrix.android.sdk.api.session.homeserver.HomeServerCapabilities
import org.matrix.android.sdk.api.session.homeserver.RoomVersionCapabilities
import org.matrix.android.sdk.api.session.homeserver.RoomVersionInfo
import org.matrix.android.sdk.api.session.homeserver.RoomVersionStatus
import org.matrix.android.sdk.internal.database.model.HomeServerCapabilitiesEntity
import org.matrix.android.sdk.internal.di.MoshiProvider
import org.matrix.android.sdk.internal.session.homeserver.RoomVersions
import org.matrix.android.sdk.internal.session.room.version.DefaultRoomVersionService
/**
* HomeServerCapabilitiesEntity -> HomeSeverCapabilities
@@ -29,7 +36,30 @@ internal object HomeServerCapabilitiesMapper {
canChangePassword = entity.canChangePassword,
maxUploadFileSize = entity.maxUploadFileSize,
lastVersionIdentityServerSupported = entity.lastVersionIdentityServerSupported,
defaultIdentityServerUrl = entity.defaultIdentityServerUrl
defaultIdentityServerUrl = entity.defaultIdentityServerUrl,
roomVersions = mapRoomVersion(entity.roomVersionsJson)
)
}
private fun mapRoomVersion(roomVersionsJson: String?): RoomVersionCapabilities? {
roomVersionsJson ?: return null
return tryOrNull {
MoshiProvider.providesMoshi().adapter(RoomVersions::class.java).fromJson(roomVersionsJson)?.let {
RoomVersionCapabilities(
defaultRoomVersion = it.default ?: DefaultRoomVersionService.DEFAULT_ROOM_VERSION,
supportedVersion = it.available.entries.map { entry ->
RoomVersionInfo(
version = entry.key,
status = if (entry.value == "stable") {
RoomVersionStatus.STABLE
} else {
RoomVersionStatus.UNSTABLE
}
)
}
)
}
}
}
}

View File

@@ -21,6 +21,7 @@ import org.matrix.android.sdk.api.session.homeserver.HomeServerCapabilities
internal open class HomeServerCapabilitiesEntity(
var canChangePassword: Boolean = true,
var roomVersionsJson: String? = null,
var maxUploadFileSize: Long = HomeServerCapabilities.MAX_UPLOAD_FILE_SIZE_UNKNOWN,
var lastVersionIdentityServerSupported: Boolean = false,
var defaultIdentityServerUrl: String? = null,

View File

@@ -20,7 +20,7 @@ import io.realm.RealmObject
import io.realm.annotations.Index
/**
* Clients can store custom config data for their account on their HomeServer.
* Clients can store custom config data for their account on their homeserver.
* This account data will be synced between different devices and can persist across installations on a particular device.
* Users may only view the account data for their own account.
* The account_data may be either global or scoped to a particular rooms.

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