diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index 38885e9cc7..c1ab98e85d 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -64,9 +64,9 @@ body:
- type: dropdown
id: rageshake
attributes:
- label: Have you submitted a rageshake?
+ label: Will you send logs?
description: |
- Did you know that you can shake your phone to submit logs for this issue? Trigger the defect, then shake your phone and you will see a popup asking if you would like to open the bug report screen. Click YES, and describe the issue, mentioning that you have also filed a bug. Submit the report to send anonymous logs to the developers.
+ Did you know that you can shake your phone to submit logs for this issue? Trigger the defect, then shake your phone and you will see a popup asking if you would like to open the bug report screen. Click YES, and describe the issue, mentioning that you have also filed a bug (it's helpful if you can include a link to the bug). Send the report to submit anonymous logs to the developers.
options:
- 'Yes'
- 'No'
diff --git a/.github/ISSUE_TEMPLATE/release.yml b/.github/ISSUE_TEMPLATE/release.yml
index 903c05c5d3..7ac55427a9 100644
--- a/.github/ISSUE_TEMPLATE/release.yml
+++ b/.github/ISSUE_TEMPLATE/release.yml
@@ -23,8 +23,6 @@ body:
### 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()`
diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml
index 8c56edfa3a..5ccd00a02b 100644
--- a/.github/workflows/quality.yml
+++ b/.github/workflows/quality.yml
@@ -14,12 +14,12 @@ jobs:
- name: Run code quality check suite
run: ./tools/check/check_code_quality.sh
- klint:
+ ktlint:
name: Kotlin Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - name: Run klint
+ - name: Run ktlint
run: |
./gradlew ktlintCheck --continue
- name: Upload reports
diff --git a/.github/workflows/sync-from-external-sources.yml b/.github/workflows/sync-from-external-sources.yml
new file mode 100644
index 0000000000..6a4f8ef147
--- /dev/null
+++ b/.github/workflows/sync-from-external-sources.yml
@@ -0,0 +1,69 @@
+name: Sync Data From External Sources
+on:
+ schedule:
+ # At 00:00 on every Monday UTC
+ - cron: '0 0 * * 1'
+
+jobs:
+ sync-emojis:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.8
+ - name: Cache pip
+ uses: actions/cache@v2
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip
+ restore-keys: |
+ ${{ runner.os }}-pip-
+ ${{ runner.os }}-
+ - name: Install Prerequisite dependencies
+ run: |
+ pip install BeautifulSoup4
+ pip install requests
+ - name: Run Emoji script
+ run: ./tools/import_emojis.py
+ - name: Create Pull Request for Emojis
+ uses: peter-evans/create-pull-request@v3
+ with:
+ commit-message: Sync Emojis
+ title: Sync Emojis
+ body: |
+ - Update Emojis from Unicode.org
+ branch: sync-emojis
+ base: develop
+
+ sync-sas-strings:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.8
+ - name: Cache pip
+ uses: actions/cache@v2
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip
+ restore-keys: |
+ ${{ runner.os }}-pip-
+ ${{ runner.os }}-
+ - name: Install Prerequisite dependencies
+ run: |
+ pip install requests
+ - name: Run SAS String script
+ run: ./tools/import_sas_strings.py
+ - name: Create Pull Request for SAS Strings
+ uses: peter-evans/create-pull-request@v3
+ with:
+ commit-message: Sync SAS Strings
+ title: Sync SAS Strings
+ body: |
+ - Update SAS Strings from matrix-doc.
+ branch: sync-sas-strings
+ base: develop
\ No newline at end of file
diff --git a/CHANGES.md b/CHANGES.md
index 8d4899e6fb..c545a70671 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,57 @@
+Changes in Element v1.3.3 (2021-10-11)
+======================================
+
+Bugfixes 🐛
+----------
+ - Disable Android Auto supports ([#4205](https://github.com/vector-im/element-android/issues/4205))
+
+
+Changes in Element v1.3.2 (2021-10-08)
+======================================
+
+Features ✨
+----------
+ - Android Auto notification support ([#240](https://github.com/vector-im/element-android/issues/240))
+ - Add a fallback for user displayName when this one is null or empty ([#3732](https://github.com/vector-im/element-android/issues/3732))
+ - Add client base url config to customize permalinks ([#4027](https://github.com/vector-im/element-android/issues/4027))
+ - Check if DM exists before creating a new one ([#4157](https://github.com/vector-im/element-android/issues/4157))
+ - Handle 8 new slash commands: `/ignore`, `/unignore`, `/roomname`, `/myroomnick`, `/roomavatar`, `/myroomavatar`, `/lenny`, `/whois`. ([#4158](https://github.com/vector-im/element-android/issues/4158))
+ - Display identity server policies in the Discovery screen ([#4184](https://github.com/vector-im/element-android/issues/4184))
+
+Bugfixes 🐛
+----------
+ - Ensure initial sync progress dialog is hidden when the initial sync is over ([#983](https://github.com/vector-im/element-android/issues/983))
+ - Avoid resending notifications that are already shown ([#1673](https://github.com/vector-im/element-android/issues/1673))
+ - Room filter no results bad CTA in space mode when a space selected ([#3048](https://github.com/vector-im/element-android/issues/3048))
+ - Fixes notifications not dismissing when reading messages on other devices ([#3347](https://github.com/vector-im/element-android/issues/3347))
+ - Fixes the passphrase screen being incorrectly shown when pressing back on the key verification screen.
+ When the user doesn't have a passphrase set we don't show the passphrase screen. ([#3898](https://github.com/vector-im/element-android/issues/3898))
+ - App doesn't take you to a Space after choosing to Join it ([#3933](https://github.com/vector-im/element-android/issues/3933))
+ - Validate public space addresses and room aliases length ([#3934](https://github.com/vector-im/element-android/issues/3934))
+ - Save button for adding rooms to a space is hidden when scrolling through list of rooms ([#3935](https://github.com/vector-im/element-android/issues/3935))
+ - Align new room encryption default to Web ([#4045](https://github.com/vector-im/element-android/issues/4045))
+ - Fix Reply/Edit mode animation is broken when sending ([#4077](https://github.com/vector-im/element-android/issues/4077))
+ - Added changes that will make SearchView in search bar focused by default on opening reaction picker.
+
+ When tapping close icon of SearchView, the SearchView did not collapse therefore added the on close listener
+ which will collapse the SearchView on close. ([#4092](https://github.com/vector-im/element-android/issues/4092))
+ - Troubleshoot notification: Fix button not clickable ([#4109](https://github.com/vector-im/element-android/issues/4109))
+ - Harmonize wording in the message bottom sheet and move up the View Reactions item ([#4155](https://github.com/vector-im/element-android/issues/4155))
+ - Remove unused SendRelationWorker and related API call (3588) ([#4156](https://github.com/vector-im/element-android/issues/4156))
+ - SIP user to native user mapping is wrong ([#4176](https://github.com/vector-im/element-android/issues/4176))
+
+SDK API changes ⚠️
+------------------
+ - Create extension `String.isMxcUrl()` ([#4158](https://github.com/vector-im/element-android/issues/4158))
+
+Other changes
+-------------
+ - Use ktlint plugin. See [the documentation](https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#ktlint) for more detail. ([#3957](https://github.com/vector-im/element-android/issues/3957))
+ - Minimize the use of exported="true" in android Manifest (link: https://github.com/matrix-org/matrix-dinsic/issues/618) ([#4018](https://github.com/vector-im/element-android/issues/4018))
+ - Fix redundancy in heading in the bug report issue form ([#4076](https://github.com/vector-im/element-android/issues/4076))
+ - Fix release label in the release issue template ([#4113](https://github.com/vector-im/element-android/issues/4113))
+
+
Changes in Element v1.3.1 (2021-09-29)
======================================
diff --git a/changelog.d/1673.bugfix b/changelog.d/1673.bugfix
deleted file mode 100644
index b0459f34b8..0000000000
--- a/changelog.d/1673.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Avoid resending notifications that are already shown
diff --git a/changelog.d/240.feature b/changelog.d/240.feature
deleted file mode 100644
index ee4d07a975..0000000000
--- a/changelog.d/240.feature
+++ /dev/null
@@ -1 +0,0 @@
-Android Auto notification support
diff --git a/changelog.d/3048.bugfix b/changelog.d/3048.bugfix
deleted file mode 100644
index 81fbe7b65e..0000000000
--- a/changelog.d/3048.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Room filter no results bad CTA in space mode when a space selected
\ No newline at end of file
diff --git a/changelog.d/3347.bugfix b/changelog.d/3347.bugfix
deleted file mode 100644
index 8ba1d7af88..0000000000
--- a/changelog.d/3347.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fixes notifications not dismissing when reading messages on other devices
\ No newline at end of file
diff --git a/changelog.d/3732.feature b/changelog.d/3732.feature
deleted file mode 100644
index 3352c30886..0000000000
--- a/changelog.d/3732.feature
+++ /dev/null
@@ -1 +0,0 @@
-Add a fallback for user displayName when this one is null or empty
\ No newline at end of file
diff --git a/changelog.d/3890.misc b/changelog.d/3890.misc
new file mode 100644
index 0000000000..3bace80fa7
--- /dev/null
+++ b/changelog.d/3890.misc
@@ -0,0 +1 @@
+Migrate to MvRx2 (Mavericks)
\ No newline at end of file
diff --git a/changelog.d/3898.bugfix b/changelog.d/3898.bugfix
deleted file mode 100644
index 49cab4adad..0000000000
--- a/changelog.d/3898.bugfix
+++ /dev/null
@@ -1,2 +0,0 @@
-Fixes the passphrase screen being incorrectly shown when pressing back on the key verification screen.
-When the user doesn't have a passphrase set we don't show the passphrase screen.
\ No newline at end of file
diff --git a/changelog.d/3933.bugfix b/changelog.d/3933.bugfix
deleted file mode 100644
index 3396bd75e7..0000000000
--- a/changelog.d/3933.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-App doesn't take you to a Space after choosing to Join it
\ No newline at end of file
diff --git a/changelog.d/3934.bugfix b/changelog.d/3934.bugfix
deleted file mode 100644
index 989f96d004..0000000000
--- a/changelog.d/3934.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Validate public space addresses and room aliases length
\ No newline at end of file
diff --git a/changelog.d/3935.bugfix b/changelog.d/3935.bugfix
deleted file mode 100644
index f4b1d309b4..0000000000
--- a/changelog.d/3935.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Save button for adding rooms to a space is hidden when scrolling through list of rooms
\ No newline at end of file
diff --git a/changelog.d/3957.misc b/changelog.d/3957.misc
deleted file mode 100644
index bc6e417a49..0000000000
--- a/changelog.d/3957.misc
+++ /dev/null
@@ -1 +0,0 @@
-Use ktlint plugin. See [the documentation](https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#ktlint) for more detail.
\ No newline at end of file
diff --git a/changelog.d/4018.misc b/changelog.d/4018.misc
deleted file mode 100644
index d0849d5842..0000000000
--- a/changelog.d/4018.misc
+++ /dev/null
@@ -1 +0,0 @@
-Minimize the use of exported="true" in android Manifest (link: https://github.com/matrix-org/matrix-dinsic/issues/618)
diff --git a/changelog.d/4027.feature b/changelog.d/4027.feature
deleted file mode 100644
index fa45d07ef9..0000000000
--- a/changelog.d/4027.feature
+++ /dev/null
@@ -1 +0,0 @@
-Add client base url config to customize permalinks
\ No newline at end of file
diff --git a/changelog.d/4045.bugfix b/changelog.d/4045.bugfix
deleted file mode 100644
index c6798ae492..0000000000
--- a/changelog.d/4045.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Align new room encryption default to Web
\ No newline at end of file
diff --git a/changelog.d/4076.misc b/changelog.d/4076.misc
deleted file mode 100644
index 97b50d8c54..0000000000
--- a/changelog.d/4076.misc
+++ /dev/null
@@ -1 +0,0 @@
-Fix redundancy in heading in the bug report issue form
diff --git a/changelog.d/4077.bugfix b/changelog.d/4077.bugfix
deleted file mode 100644
index a8ab6b3c54..0000000000
--- a/changelog.d/4077.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix Reply/Edit mode animation is broken when sending
\ No newline at end of file
diff --git a/changelog.d/4092.bugfix b/changelog.d/4092.bugfix
deleted file mode 100644
index 68ce518060..0000000000
--- a/changelog.d/4092.bugfix
+++ /dev/null
@@ -1,4 +0,0 @@
-Added changes that will make SearchView in search bar focused by default on opening reaction picker.
-
-When tapping close icon of SearchView, the SearchView did not collapse therefore added the on close listener
-which will collapse the SearchView on close.
diff --git a/changelog.d/4106.bugfix b/changelog.d/4106.bugfix
new file mode 100644
index 0000000000..6ca030f8c4
--- /dev/null
+++ b/changelog.d/4106.bugfix
@@ -0,0 +1,2 @@
+Fixes push notification emails list not refreshing the first time seeing the notifications page.
+Also improves the error handling in the email notification toggling by using synchronous flows instead of the WorkManager
\ No newline at end of file
diff --git a/changelog.d/4109.bugfix b/changelog.d/4109.bugfix
deleted file mode 100644
index 4f35dd7f55..0000000000
--- a/changelog.d/4109.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Troubleshoot notification: Fix button not clickable
\ No newline at end of file
diff --git a/changelog.d/4113.misc b/changelog.d/4113.misc
deleted file mode 100644
index a5faa57b92..0000000000
--- a/changelog.d/4113.misc
+++ /dev/null
@@ -1 +0,0 @@
-Fix release label in the release issue template
diff --git a/changelog.d/4155.bugfix b/changelog.d/4155.bugfix
deleted file mode 100644
index 59f5c564aa..0000000000
--- a/changelog.d/4155.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Harmonize wording in the message bottom sheet and move up the View Reactions item
\ No newline at end of file
diff --git a/changelog.d/4156.bugfix b/changelog.d/4156.bugfix
deleted file mode 100644
index a010398adc..0000000000
--- a/changelog.d/4156.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Remove unused SendRelationWorker and related API call (3588)
\ No newline at end of file
diff --git a/changelog.d/4157.feature b/changelog.d/4157.feature
deleted file mode 100644
index 71cbe60b1f..0000000000
--- a/changelog.d/4157.feature
+++ /dev/null
@@ -1 +0,0 @@
-Check if DM exists before creating a new one
\ No newline at end of file
diff --git a/changelog.d/4158.feature b/changelog.d/4158.feature
deleted file mode 100644
index 86d2c760c2..0000000000
--- a/changelog.d/4158.feature
+++ /dev/null
@@ -1 +0,0 @@
-Handle 8 new slash commands: `/ignore`, `/unignore`, `/roomname`, `/myroomnick`, `/roomavatar`, `/myroomavatar`, `/lenny`, `/whois`.
\ No newline at end of file
diff --git a/changelog.d/4158.removal b/changelog.d/4158.removal
deleted file mode 100644
index 557a85262e..0000000000
--- a/changelog.d/4158.removal
+++ /dev/null
@@ -1 +0,0 @@
-Create extension `String.isMxcUrl()`
\ No newline at end of file
diff --git a/changelog.d/4167.bugfix b/changelog.d/4167.bugfix
new file mode 100644
index 0000000000..8df264d8f6
--- /dev/null
+++ b/changelog.d/4167.bugfix
@@ -0,0 +1 @@
+Fixing push notifications starting the looping background sync when the push notification causes the application to be created.
diff --git a/changelog.d/4193.bugfix b/changelog.d/4193.bugfix
new file mode 100644
index 0000000000..a395e70cee
--- /dev/null
+++ b/changelog.d/4193.bugfix
@@ -0,0 +1 @@
+Fix random crash when user logs out just after the log in.
\ No newline at end of file
diff --git a/changelog.d/4216.misc b/changelog.d/4216.misc
new file mode 100644
index 0000000000..acf5f1dbcb
--- /dev/null
+++ b/changelog.d/4216.misc
@@ -0,0 +1 @@
+Implement a new github action workflow to generate two PRs for emoji and sas string sync
diff --git a/changelog.d/4226.misc b/changelog.d/4226.misc
new file mode 100644
index 0000000000..ac7a294f35
--- /dev/null
+++ b/changelog.d/4226.misc
@@ -0,0 +1 @@
+Improve wording around rageshakes in the defect issue template.
diff --git a/changelog.d/908.bugfix b/changelog.d/908.bugfix
new file mode 100644
index 0000000000..f43b03e892
--- /dev/null
+++ b/changelog.d/908.bugfix
@@ -0,0 +1 @@
+Issue #908 Adding trailing space " " or ": " if the user started a sentence by mentioning someone,
diff --git a/changelog.d/983.bugfix b/changelog.d/983.bugfix
deleted file mode 100644
index 7318f7f4cd..0000000000
--- a/changelog.d/983.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Ensure initial sync progress dialog is hidden when the initial sync is over
\ No newline at end of file
diff --git a/dependencies.gradle b/dependencies.gradle
index 92358952db..1e3c492149 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -7,7 +7,7 @@ ext.versions = [
'targetCompat' : JavaVersion.VERSION_11,
]
-def gradle = "7.0.2"
+def gradle = "7.0.3"
// Ref: https://kotlinlang.org/releases.html
def kotlin = "1.5.31"
def kotlinCoroutines = "1.5.2"
@@ -19,6 +19,7 @@ def moshi = "1.12.0"
def lifecycle = "2.2.0"
def rxBinding = "3.1.0"
def epoxy = "4.6.2"
+def mavericks = "2.4.0"
def glide = "4.12.0"
def bigImageViewer = "1.8.1"
def jjwt = "0.11.2"
@@ -98,7 +99,9 @@ ext.libs = [
'epoxyGlide' : "com.airbnb.android:epoxy-glide-preloading:$epoxy",
'epoxyProcessor' : "com.airbnb.android:epoxy-processor:$epoxy",
'epoxyPaging' : "com.airbnb.android:epoxy-paging:$epoxy",
- 'mvrx' : "com.airbnb.android:mvrx:1.5.1"
+ 'mavericks' : "com.airbnb.android:mavericks:$mavericks",
+ 'mavericksRx' : "com.airbnb.android:mavericks-rxjava2:$mavericks",
+ 'mavericksTesting' : "com.airbnb.android:mavericks-testing:$mavericks"
],
mockk : [
'mockk' : "io.mockk:mockk:$mockk",
diff --git a/docs/design.md b/docs/design.md
new file mode 100644
index 0000000000..2e27f00ebf
--- /dev/null
+++ b/docs/design.md
@@ -0,0 +1,104 @@
+# Element Android design
+
+## Introduction
+
+Design at element.io is done using Figma - https://www.figma.com
+
+## How to import from Figma to the Element Android project
+
+Integration should be done using the Android development best practice, and should follow the existing convention in the code.
+
+### Colors
+
+Element Android already contains all the colors which can be used by the designer, in the module `ui-style`.
+Some of them depend on the theme, so ensure to use theme attributes and not colors directly.
+
+### Text
+
+ - click on a text on Figma
+ - on the right panel, information about the style and colors are displayed
+ - in Element Android, text style are already defined, generally you should not create new style
+ - apply the style and the color to the layout
+
+### Dimension, position and margin
+
+ - click on an item on Figma
+ - dimensions of the item will be displayed.
+ - move the mouse to other items to get relative positioning, margin, etc.
+
+### Icons
+
+#### Export drawable from Figma
+
+ - click on the element to export
+ - ensure that the correct layer is selected. Sometimes the parent layer has to be selected on the left panel
+ - on the right panel, click on "export"
+ - select SVG
+ - you can check the preview of what will be exported
+ - click on "export" and save the file locally
+ - unzip the file if necessary
+
+It's also possible for any icon to go to the main component by right-clicking on the icon.
+
+#### Import in Android Studio
+
+ - right click on the drawable folder where the drawable will be created
+ - click on "New"/"Vector Asset"
+ - select the exported file
+ - update the filename if necessary
+ - click on "Next" and click on "Finish"
+ - open the created vector drawable
+ - optionally update the color(s) to "#FF0000" (red) to ensure that the drawable is correctly tinted at runtime.
+
+## Figma links
+
+Figma links can be included in the layout, for future reference, but it is also OK to add a paragraph below here, to centralize the information
+
+Main entry point: https://www.figma.com/files/project/5612863/Element?fuid=779371459522484071
+
+Note: all the Figma links are not publicly available.
+
+### Coumpound
+
+Coumpound contains the theme of the application, with all the components, in Light and Dark theme: palette (colors), typography, iconography, etc.
+
+https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound
+
+### Login
+
+TBD
+
+#### Login v2
+
+https://www.figma.com/file/xdV4PuI3DlzA1EiBvbrggz/Login-Flow-v2
+
+### Room list
+
+TBD
+
+### Timeline
+
+https://www.figma.com/file/x1HYYLYMmbYnhfoz2c2nGD/%5BRiotX%5D-Misc?node-id=0%3A1
+
+### Voice message
+
+https://www.figma.com/file/uaWc62Ux2DkZC4OGtAGcNc/Voice-Messages?node-id=473%3A12
+
+### Room settings
+
+TBD
+
+### VoIP
+
+https://www.figma.com/file/V6m2z0oAtUV1l8MdyIrAep/VoIP?node-id=4254%3A25767
+
+### Presence
+
+https://www.figma.com/file/qmvEskET5JWva8jZJ4jX8o/Presence---User-Status?node-id=114%3A9174
+(Option B is chosen)
+
+### Spaces
+
+https://www.figma.com/file/m7L63aGPW7iHnIYStfdxCe/Spaces?node-id=192%3A30161
+
+### List to be continued...
diff --git a/docs/mavericks_migration.md b/docs/mavericks_migration.md
new file mode 100644
index 0000000000..a36ae8261a
--- /dev/null
+++ b/docs/mavericks_migration.md
@@ -0,0 +1,11 @@
+Useful links:
+- https://airbnb.io/mavericks/#/new-2x
+
+Mavericks 2 is replacing MvRx, by removing usage of Rx by Flow, both internally and in the API.
+See the link ^ to have more intel, but basically, the changes are:
+
+session.rx() => session.flow()
+room.rx() => room.flow()
+subscribe { }.disposeOnClear() => onEach { }.launchIn(viewModelScope)
+
+Only using manually onEach requires to add launchIn,any other methods provided by Mavericks on viewModel and activity/fragment are already taking care of lifecycle.
\ No newline at end of file
diff --git a/fastlane/metadata/android/cs-CZ/changelogs/40103000.txt b/fastlane/metadata/android/cs-CZ/changelogs/40103000.txt
new file mode 100644
index 0000000000..f97ff3ef3a
--- /dev/null
+++ b/fastlane/metadata/android/cs-CZ/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+Hlavní změny v této verzi: Uspořádejte si místnosti pomocí Prostorů!
+Úplný seznam změn: https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/en-US/changelogs/40103020.txt b/fastlane/metadata/android/en-US/changelogs/40103020.txt
new file mode 100644
index 0000000000..7ac48f4890
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/40103020.txt
@@ -0,0 +1,2 @@
+Main changes in this version: Add support for Android Auto. Lot of bug fixes!
+Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.3.2
\ No newline at end of file
diff --git a/fastlane/metadata/android/en-US/changelogs/40103030.txt b/fastlane/metadata/android/en-US/changelogs/40103030.txt
new file mode 100644
index 0000000000..2068aeed95
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/40103030.txt
@@ -0,0 +1,2 @@
+Main changes in this version: Make identity server policy(ies) visible in the settings. Temporarily remove Android Auto support.
+Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.3.3
\ No newline at end of file
diff --git a/fastlane/metadata/android/es-ES/changelogs/40100100.txt b/fastlane/metadata/android/es-ES/changelogs/40100100.txt
index 70b786d12e..5cfcde2145 100644
--- a/fastlane/metadata/android/es-ES/changelogs/40100100.txt
+++ b/fastlane/metadata/android/es-ES/changelogs/40100100.txt
@@ -1 +1,2 @@
-// TODO
+Esta nueva versión contiene principalmente correcciones de errores y mejoras. Enviar un mensaje ahora es mucho más rápido.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.0.10
diff --git a/fastlane/metadata/android/es-ES/changelogs/40100110.txt b/fastlane/metadata/android/es-ES/changelogs/40100110.txt
new file mode 100644
index 0000000000..5444087750
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40100110.txt
@@ -0,0 +1,2 @@
+Esta nueva versión contiene principalmente mejoras en la interfaz de usuario y la experiencia del usuario. Ahora puedes invitar amigos y crear mensajes directos muy rápido escaneando códigos QR.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.0.11
diff --git a/fastlane/metadata/android/es-ES/changelogs/40100120.txt b/fastlane/metadata/android/es-ES/changelogs/40100120.txt
new file mode 100644
index 0000000000..3e17b0359b
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40100120.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: Vista previa de URL, nuevo teclado Emoji, nuevas capacidades de configuración de la habitación y ¡nieve para Navidad!
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.0.12
diff --git a/fastlane/metadata/android/es-ES/changelogs/40100130.txt b/fastlane/metadata/android/es-ES/changelogs/40100130.txt
new file mode 100644
index 0000000000..c87cb0faf5
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40100130.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: Vista previa de URL, nuevo teclado Emoji, nuevas capacidades de configuración de la habitación y ¡nieve para Navidad!
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.0.13
diff --git a/fastlane/metadata/android/es-ES/changelogs/40100140.txt b/fastlane/metadata/android/es-ES/changelogs/40100140.txt
new file mode 100644
index 0000000000..9bd36b13db
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40100140.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: Editar permisos de sala, tema automático de luz / oscuridad y un montón de correcciones de errores.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.0.14
diff --git a/fastlane/metadata/android/es-ES/changelogs/40100150.txt b/fastlane/metadata/android/es-ES/changelogs/40100150.txt
new file mode 100644
index 0000000000..f1b7d303d1
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40100150.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: Soporte de inicio de sesión social.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.0.15
diff --git a/fastlane/metadata/android/es-ES/changelogs/40100160.txt b/fastlane/metadata/android/es-ES/changelogs/40100160.txt
new file mode 100644
index 0000000000..707ec23519
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40100160.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: Soporte de inicio de sesión social.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.0.15 y https://github.com/vector-im/element-android/releases/tag/v1.0.16
diff --git a/fastlane/metadata/android/es-ES/changelogs/40100170.txt b/fastlane/metadata/android/es-ES/changelogs/40100170.txt
new file mode 100644
index 0000000000..9c6d3d7f54
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40100170.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: ¡Corrección de errores!
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.0.17
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101000.txt b/fastlane/metadata/android/es-ES/changelogs/40101000.txt
new file mode 100644
index 0000000000..996f9fdde8
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101000.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: ¡Mejora de VoIP (audio y videollamadas en DM) y corrección de errores!
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.0
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101010.txt b/fastlane/metadata/android/es-ES/changelogs/40101010.txt
new file mode 100644
index 0000000000..ea9662576c
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101010.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: mejora del rendimiento y corrección de errores.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.1
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101020.txt b/fastlane/metadata/android/es-ES/changelogs/40101020.txt
new file mode 100644
index 0000000000..87a92a96cd
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101020.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: mejora del rendimiento y corrección de errores.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.2
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101030.txt b/fastlane/metadata/android/es-ES/changelogs/40101030.txt
new file mode 100644
index 0000000000..ca82a2c59c
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101030.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: mejora del rendimiento y corrección de errores.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.3
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101040.txt b/fastlane/metadata/android/es-ES/changelogs/40101040.txt
new file mode 100644
index 0000000000..59acee78de
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101040.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: mejora del rendimiento y corrección de errores.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.4
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101050.txt b/fastlane/metadata/android/es-ES/changelogs/40101050.txt
new file mode 100644
index 0000000000..ccdd9fd8d6
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101050.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: correcciones urgentes para 1.1.4
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.5
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101060.txt b/fastlane/metadata/android/es-ES/changelogs/40101060.txt
new file mode 100644
index 0000000000..9da3a09866
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101060.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: correcciones urgentes para 1.1.5
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.6
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101070.txt b/fastlane/metadata/android/es-ES/changelogs/40101070.txt
new file mode 100644
index 0000000000..6abb774b93
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101070.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: soporte beta para Spaces. Comprima el video antes de enviarlo.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.7
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101080.txt b/fastlane/metadata/android/es-ES/changelogs/40101080.txt
new file mode 100644
index 0000000000..776bc52a25
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101080.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: mejora de Spaces.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.8
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101090.txt b/fastlane/metadata/android/es-ES/changelogs/40101090.txt
new file mode 100644
index 0000000000..eaeab1517a
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101090.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: agregar soporte para la red gitter.im.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.9
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101100.txt b/fastlane/metadata/android/es-ES/changelogs/40101100.txt
new file mode 100644
index 0000000000..d82529cf22
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101100.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: actualización de tema y estilo y nuevas funcionalidades para espacios.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.10
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101110.txt b/fastlane/metadata/android/es-ES/changelogs/40101110.txt
new file mode 100644
index 0000000000..6432d2052a
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101110.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: actualización de tema y estilo y nuevas funciones para espacios (corrección de errores para 1.1.10)
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.11
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101120.txt b/fastlane/metadata/android/es-ES/changelogs/40101120.txt
new file mode 100644
index 0000000000..a657fff51c
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101120.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: actualización de tema y estilo y corrección de un bloqueo después de la videollamada
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.12
diff --git a/fastlane/metadata/android/es-ES/changelogs/40101130.txt b/fastlane/metadata/android/es-ES/changelogs/40101130.txt
new file mode 100644
index 0000000000..c9fbf424ae
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40101130.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: principalmente actualización de estabilidad y corrección de errores.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.1.13
diff --git a/fastlane/metadata/android/es-ES/changelogs/40102000.txt b/fastlane/metadata/android/es-ES/changelogs/40102000.txt
new file mode 100644
index 0000000000..907019b6d6
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40102000.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: Mensaje de voz está habilitado por defecto.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.2.0
diff --git a/fastlane/metadata/android/es-ES/changelogs/40102010.txt b/fastlane/metadata/android/es-ES/changelogs/40102010.txt
new file mode 100644
index 0000000000..909921ffd4
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40102010.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: Muchas mejoras en VoIP y Spaces (aún en beta).
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.2.1
diff --git a/fastlane/metadata/android/es-ES/changelogs/40103000.txt b/fastlane/metadata/android/es-ES/changelogs/40103000.txt
new file mode 100644
index 0000000000..054aa68541
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: ¡Organiza tus habitaciones usando Spaces!
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/es-ES/changelogs/40103010.txt b/fastlane/metadata/android/es-ES/changelogs/40103010.txt
new file mode 100644
index 0000000000..6ff7b0502e
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40103010.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: ¡Organiza tus habitaciones usando Spaces! v1.3.1 está arreglando un bloqueo que puede ocurrir en v1.3.0.
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.3.1
diff --git a/fastlane/metadata/android/es-ES/changelogs/40103020.txt b/fastlane/metadata/android/es-ES/changelogs/40103020.txt
new file mode 100644
index 0000000000..22f7592aea
--- /dev/null
+++ b/fastlane/metadata/android/es-ES/changelogs/40103020.txt
@@ -0,0 +1,2 @@
+Principales cambios en esta versión: agregar soporte para Android Auto. ¡Muchas correcciones de errores!
+Registro de cambios completo: https://github.com/vector-im/element-android/releases/tag/v1.3.2
diff --git a/fastlane/metadata/android/es-ES/full_description.txt b/fastlane/metadata/android/es-ES/full_description.txt
index 8c9915a735..fdba15e90e 100644
--- a/fastlane/metadata/android/es-ES/full_description.txt
+++ b/fastlane/metadata/android/es-ES/full_description.txt
@@ -1,30 +1,39 @@
-Element es un nuevo tipo de aplicación de mensajería y colaboración que:
+Element es un mensajero seguro y una aplicación de colaboración en equipo de productividad que es ideal para chats grupales mientras se trabaja a distancia. Esta aplicación de chat utiliza encriptación de un extremo a otro para proporcionar poderosas videoconferencias, uso compartido de archivos y llamadas de voz.
-1. Te da el control para preservar su privacidad
-2. Te permite comunicarse con cualquier persona en la red Matrix e incluso más allá al integrarse con aplicaciones como Slack
-3. Te protege de la publicidad, la minería de datos y los jardines vallados
-4. Te protege a través de encriptación de Extremo-a-Extremo, con firma cruzada para verificar a otros
+Las características de Element incluyen:
+- Herramientas de comunicación online avanzadas
+- Mensajes totalmente encriptados para permitir una comunicación corporativa más segura, incluso para trabajadores remotos
+- Chat descentralizado basado en el marco de código abierto Matrix
+- Uso compartido de archivos de forma segura con datos cifrados mientras gestiona proyectos
+- Chats de video con voz sobre IP y pantalla compartida
+- Fácil integración con sus herramientas de colaboración en línea favoritas, herramientas de gestión de proyectos, servicios VoIP y otras aplicaciones de mensajería para equipos
-Element es completamente diferente de otras aplicaciones de mensajería y colaboración porque es descentralizado y de código abierto.
+Element es completamente diferente de otras aplicaciones de mensajería y colaboración. Opera en Matrix, una red abierta para mensajería segura y comunicación descentralizada. Permite el autohospedaje para brindar a los usuarios la máxima propiedad y control de sus datos y mensajes.
-Element te permite tener su propio servidor privado, o elegir uno público, para que tenga privacidad, posesión, y control de sus datos y conversaciones. Te da acceso a una red abierta; para que no se quede atrapado hablando solo con otros usuarios de Element. Y es muy seguro.
+Privacidad y mensajería encriptada
+Element lo protege de anuncios no deseados, minería de datos y jardines amurallados. También protege todos sus datos, video uno a uno y comunicación de voz a través del cifrado de extremo a extremo y la verificación de dispositivos con firma cruzada.
-Element puede hacer todo esto porque opera en Matrix, el estándar para la comunicación abierta y descentralizada.
+Element le brinda control sobre su privacidad al mismo tiempo que le permite comunicarse de manera segura con cualquier persona en la red Matrix u otras herramientas de colaboración empresarial al integrarse con aplicaciones como Slack.
-Element te da el control permitiéndote elegir quién aloja tus conversaciones. Desde la aplicación Element, puedes elegir hospedar de diferentes maneras:
+El elemento puede ser autohospedado
+Para permitir un mayor control de sus conversaciones y datos confidenciales, Element puede ser autohospedado o puede elegir cualquier host basado en Matrix, el estándar para la comunicación descentralizada de código abierto. Element le brinda privacidad, cumplimiento de seguridad y flexibilidad de integración.
-1. Obtén una cuenta gratuita en el servidor público de matrix.org alojado por los desarrolladores de Matrix, o elije entre miles de servidores públicos alojados por voluntarios
-2. Autohospeda tu cuenta con un servidor en tu propio hardware
-3. Regístrate para obtener una cuenta en un servidor personalizado simplemente suscribiéndote a la plataforma de alojamiento de Element Matrix Services
+Sea dueño de sus datos
+Tú decides dónde guardar tus datos y mensajes. Sin riesgo de minería de datos o acceso de terceros.
-¿Por qué elegir Element?
+Element te da el control de diferentes maneras:
+1. Obtenga una cuenta gratuita en el servidor público de matrix.org alojado por los desarrolladores de Matrix, o elija entre miles de servidores públicos alojados por voluntarios
+2. Autohospede su cuenta ejecutando un servidor en su propia infraestructura de TI
+3. Regístrese para obtener una cuenta en un servidor personalizado simplemente suscribiéndose a la plataforma de alojamiento de Element Matrix Services
-TOMA POSESIÓN DE TUS DATOS: Tú decides dónde guardar tus datos y mensajes. Tú eres el propietario y quien lo controla, no alguna MEGACORP que extrae tu datos o da acceso a terceros.
+Colaboración y mensajería abierta
+Puede chatear con cualquier persona en la red Matrix, ya sea que esté usando Element, otra aplicación Matrix o incluso si está usando una aplicación de mensajería diferente.
-MENSAJERÍA ABIERTA Y COLABORACIÓN: Puede chatear con cualquier otra persona en la red de Matrix, tanto si usan Element u otra aplicación de Matrix, e incluso si están usando un sistema de mensajería diferente como Slack, IRC o XMPP.
+Súper seguro
+Cifrado real de extremo a extremo (solo aquellos en la conversación pueden descifrar mensajes) y verificación de dispositivos con firma cruzada.
-SUPER SEGURO: Encriptación de Extremo-a-Extremo real (solo aquellos en la conversación pueden descifrar mensajes) y firma cruzada para verificar los dispositivos de los participantes de la conversación.
+Completa comunicación e integración
+Mensajería, llamadas de voz y video, uso compartido de archivos, uso compartido de pantalla y un montón de integraciones, bots y widgets. Construya salas, comunidades, manténgase en contacto y haga las cosas.
-COMUNICACIÓN COMPLETA: Mensajería, llamadas de voz y video, uso compartido de archivos, uso compartido de pantalla y un montón de integraciones, bots y widgets. Crea salas, comunidades, mantente en contacto y organízate con eficacia.
-
-EN TODAS PARTES: Mantente en contacto donde quiera que estés con un historial de mensajes totalmente sincronizado en todos sus dispositivos y en la web en https://app.element.io.
+Continúa donde lo dejaste
+Manténgase en contacto donde quiera que esté con el historial de mensajes totalmente sincronizado en todos sus dispositivos y en la web en https://app.element.io
diff --git a/fastlane/metadata/android/es-ES/title.txt b/fastlane/metadata/android/es-ES/title.txt
index 971e5cf146..2e011d7ee7 100644
--- a/fastlane/metadata/android/es-ES/title.txt
+++ b/fastlane/metadata/android/es-ES/title.txt
@@ -1 +1 @@
-Element (previamente Riot.im)
+Element - Mensajero seguro
diff --git a/fastlane/metadata/android/et/changelogs/40103000.txt b/fastlane/metadata/android/et/changelogs/40103000.txt
new file mode 100644
index 0000000000..643ae1ce0e
--- /dev/null
+++ b/fastlane/metadata/android/et/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+Põhilised muutused selles versioonis: halda oma jututubasid koondades neid uut tüüpi kogukondadesse!
+Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/et/changelogs/40103010.txt b/fastlane/metadata/android/et/changelogs/40103010.txt
new file mode 100644
index 0000000000..e292f6db81
--- /dev/null
+++ b/fastlane/metadata/android/et/changelogs/40103010.txt
@@ -0,0 +1,2 @@
+Põhilised muutused selles versioonis: halda oma jututubasid koondades neid uut tüüpi kogukondadesse! Lisaks parandasime versioonis 1.3.0 tekkinud olulise vea.
+Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.3.1
diff --git a/fastlane/metadata/android/et/changelogs/40103020.txt b/fastlane/metadata/android/et/changelogs/40103020.txt
new file mode 100644
index 0000000000..ca3c0d3ea5
--- /dev/null
+++ b/fastlane/metadata/android/et/changelogs/40103020.txt
@@ -0,0 +1,2 @@
+Põhilised muutused selles versioonis: Android Auto tugi ning palju veaparandusi!
+Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.3.2
diff --git a/fastlane/metadata/android/fa/changelogs/40103000.txt b/fastlane/metadata/android/fa/changelogs/40103000.txt
new file mode 100644
index 0000000000..ba43459c0a
--- /dev/null
+++ b/fastlane/metadata/android/fa/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+تغییرات عمده در این نگارش: سازماندهی اتاقهایتان با استفاده از فضاها
+گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/fa/changelogs/40103010.txt b/fastlane/metadata/android/fa/changelogs/40103010.txt
new file mode 100644
index 0000000000..1a800ac505
--- /dev/null
+++ b/fastlane/metadata/android/fa/changelogs/40103010.txt
@@ -0,0 +1,2 @@
+تغییرات اصلی در این نگارش: سازماندهی اتاقهایتان با فضاها! نگارش ۱٫۳٫۱ فروپاشیای را که میتوانست در نگارش ۱٫۳٫۰ رخ دهد، رفع میکند.
+گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases/tag/v1.3.1
diff --git a/fastlane/metadata/android/fa/changelogs/40103020.txt b/fastlane/metadata/android/fa/changelogs/40103020.txt
new file mode 100644
index 0000000000..be669d29a9
--- /dev/null
+++ b/fastlane/metadata/android/fa/changelogs/40103020.txt
@@ -0,0 +1,2 @@
+تغییرات اصلی در این نگارش: افزودن پشتیبانی از اندروید خودرو. کلّی رفع اشکال!
+گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases/tag/v1.3.2
diff --git a/fastlane/metadata/android/fr-FR/changelogs/40102000.txt b/fastlane/metadata/android/fr-FR/changelogs/40102000.txt
index 504c3e24be..0bcf3551f6 100644
--- a/fastlane/metadata/android/fr-FR/changelogs/40102000.txt
+++ b/fastlane/metadata/android/fr-FR/changelogs/40102000.txt
@@ -1,2 +1,2 @@
-Principaux changements pour cette version : messages vocaux activés par défault.
-Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.16
+Principaux changements pour cette version : messages vocaux activés par défaut.
+Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.2.0
diff --git a/fastlane/metadata/android/fr-FR/changelogs/40102010.txt b/fastlane/metadata/android/fr-FR/changelogs/40102010.txt
new file mode 100644
index 0000000000..910d4bd9c0
--- /dev/null
+++ b/fastlane/metadata/android/fr-FR/changelogs/40102010.txt
@@ -0,0 +1,2 @@
+Principaux changements pour cette version : Beaucoup d’améliorations sur la VoIP et les Espaces (toujours en bêta).
+Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.2.1
diff --git a/fastlane/metadata/android/fr-FR/changelogs/40103000.txt b/fastlane/metadata/android/fr-FR/changelogs/40103000.txt
new file mode 100644
index 0000000000..66c2c3db86
--- /dev/null
+++ b/fastlane/metadata/android/fr-FR/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+Principaux changements pour cette version : Organisez vous salons à l’aide des Espaces !
+Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/hu-HU/changelogs/40103000.txt b/fastlane/metadata/android/hu-HU/changelogs/40103000.txt
new file mode 100644
index 0000000000..40673b30b1
--- /dev/null
+++ b/fastlane/metadata/android/hu-HU/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+Fő változás ebben a verzióban: Szobák terekbe szervezése
+Teljes változásnapló: https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/hu-HU/changelogs/40103010.txt b/fastlane/metadata/android/hu-HU/changelogs/40103010.txt
new file mode 100644
index 0000000000..2cc0dab42d
--- /dev/null
+++ b/fastlane/metadata/android/hu-HU/changelogs/40103010.txt
@@ -0,0 +1,2 @@
+Fő változás ebben a verzióban: Rendezd a szobáidat terekbe! v1.3.1 a v1.3.0 összeomlásait javítja.
+Teljes változásnapló: https://github.com/vector-im/element-android/releases/tag/v1.3.1
diff --git a/fastlane/metadata/android/hu-HU/changelogs/40103020.txt b/fastlane/metadata/android/hu-HU/changelogs/40103020.txt
new file mode 100644
index 0000000000..ff8af250e2
--- /dev/null
+++ b/fastlane/metadata/android/hu-HU/changelogs/40103020.txt
@@ -0,0 +1,2 @@
+Fő változás ebben a verzióban: Android Auto támogatás és sok hibajavítás!
+Teljes változásnapló: https://github.com/vector-im/element-android/releases/tag/v1.3.2
diff --git a/fastlane/metadata/android/id/changelogs/40102000.txt b/fastlane/metadata/android/id/changelogs/40102000.txt
index 2258b114e8..f7d93e2e4f 100644
--- a/fastlane/metadata/android/id/changelogs/40102000.txt
+++ b/fastlane/metadata/android/id/changelogs/40102000.txt
@@ -1,2 +1,2 @@
Perubahan utama dalam versi ini: Pesan Suara diaktifkan secara default
-Changelog lanjutan: https://github.com/vector-im/element-android/releases/tag/v1.1.16
+Changelog lanjutan: https://github.com/vector-im/element-android/releases/tag/v1.2.0
diff --git a/fastlane/metadata/android/id/changelogs/40102010.txt b/fastlane/metadata/android/id/changelogs/40102010.txt
new file mode 100644
index 0000000000..e77f0327b0
--- /dev/null
+++ b/fastlane/metadata/android/id/changelogs/40102010.txt
@@ -0,0 +1,2 @@
+Perubahan utama di versi ini: Banyak perbaikan di VoIP dan Space (masih beta).
+Changelog lanjutan: https://github.com/vector-im/element-android/releases/tag/v1.2.1
diff --git a/fastlane/metadata/android/id/changelogs/40103000.txt b/fastlane/metadata/android/id/changelogs/40103000.txt
new file mode 100644
index 0000000000..bf7b5d8d5d
--- /dev/null
+++ b/fastlane/metadata/android/id/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+Perubahan utama di versi ini: Organisir ruangan Anda menggunakan sebuah Space!
+Changelog lanjutan: https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/id/changelogs/40103010.txt b/fastlane/metadata/android/id/changelogs/40103010.txt
new file mode 100644
index 0000000000..7823017895
--- /dev/null
+++ b/fastlane/metadata/android/id/changelogs/40103010.txt
@@ -0,0 +1,2 @@
+Perubahan utama dalam versi ini: Organisir ruangan Anda dengan menggunakan sebuah Space! v1.3.1 memperbaiki crash yang dapat terjadi di v1.3.0.
+Changelog lengkap: https://github.com/vector-im/element-android/releases/tag/v1.3.1
diff --git a/fastlane/metadata/android/id/changelogs/40103020.txt b/fastlane/metadata/android/id/changelogs/40103020.txt
new file mode 100644
index 0000000000..4f46881d68
--- /dev/null
+++ b/fastlane/metadata/android/id/changelogs/40103020.txt
@@ -0,0 +1,2 @@
+Perubahan utama dalam versi ini: Penambahan dukungan untuk Android Auto. Banyak perbaikan bug!
+Changelog lanjutan: https://github.com/vector-im/element-android/releases/tag/v1.3.2
diff --git a/fastlane/metadata/android/id/full_description.txt b/fastlane/metadata/android/id/full_description.txt
index 75249c6a20..bd357bb161 100644
--- a/fastlane/metadata/android/id/full_description.txt
+++ b/fastlane/metadata/android/id/full_description.txt
@@ -11,7 +11,7 @@ Element adalah perpesanan yang aman dan aplikasi kolaborasi tim produktivitas ya
Element benar-benar berbeda dari aplikasi perpesanan dan kolaborasi lainnya. Element beroperasi pada Matrix, jaringan terbuka untuk pengiriman pesan yang aman dan komunikasi terdesentralisasi. Matrix memungkinkan hosting sendiri untuk memberi pengguna kepemilikan maksimum dan kontrol data dan pesan mereka.
Pesan privasi dan terenkripsi
-Element melindungi Anda dari iklan yang tidak diinginkan, data penambangan dan taman berdinding. Element juga mengamankan semua data Anda, komunikasi video dan suara satu-ke-satu melalui enkripsi ujung-ke-ujung dan verifikasi perangkat yang ditanda tangani silang.
+Element melindungi Anda dari iklan yang tidak diinginkan, penambangan data dan taman berdinding. Element juga mengamankan semua data Anda, komunikasi video dan suara satu-ke-satu melalui enkripsi ujung-ke-ujung dan verifikasi perangkat yang ditandatangani secara silang.
Element memberi Anda kendali atas privasi Anda sambil memungkinkan Anda untuk berkomunikasi dengan aman dengan siapa pun di jaringan Matrix, atau alat kolaborasi bisnis lainnya dengan mengintegrasikan dengan aplikasi seperti Slack.
diff --git a/fastlane/metadata/android/it-IT/changelogs/40103000.txt b/fastlane/metadata/android/it-IT/changelogs/40103000.txt
new file mode 100644
index 0000000000..6ad9001bfd
--- /dev/null
+++ b/fastlane/metadata/android/it-IT/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+Modifiche principali in questa versione: organizza le tue stanze usando gli Spazi!
+Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/pt-BR/changelogs/40103000.txt b/fastlane/metadata/android/pt-BR/changelogs/40103000.txt
new file mode 100644
index 0000000000..c046c1cbc9
--- /dev/null
+++ b/fastlane/metadata/android/pt-BR/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+Principais mudanças nesta versão: Organize suas salas usando Espaços!
+Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/pt-BR/changelogs/40103010.txt b/fastlane/metadata/android/pt-BR/changelogs/40103010.txt
new file mode 100644
index 0000000000..25d497eaa9
--- /dev/null
+++ b/fastlane/metadata/android/pt-BR/changelogs/40103010.txt
@@ -0,0 +1,2 @@
+Principais mudanças nesta versão: Organize suas salas usando Espaços! v1.3.1 está consertando um crash que pode ocorrer em v1.3.0.
+Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.3.1
diff --git a/fastlane/metadata/android/pt-BR/changelogs/40103020.txt b/fastlane/metadata/android/pt-BR/changelogs/40103020.txt
new file mode 100644
index 0000000000..e34e321494
--- /dev/null
+++ b/fastlane/metadata/android/pt-BR/changelogs/40103020.txt
@@ -0,0 +1,2 @@
+Principais mudanças nesta versão: Adicionar suporte para Android Auto. Muitos consertos de bugs!
+Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.3.2
diff --git a/fastlane/metadata/android/sq/changelogs/40103000.txt b/fastlane/metadata/android/sq/changelogs/40103000.txt
new file mode 100644
index 0000000000..ecd5568c02
--- /dev/null
+++ b/fastlane/metadata/android/sq/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+Ndryshime kryesore në këtë version: Sistemoni dhomat tuaja duke përdorur Hapësira!
+Regjistër i plotë ndryshimesh: https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/sq/changelogs/40103010.txt b/fastlane/metadata/android/sq/changelogs/40103010.txt
new file mode 100644
index 0000000000..1981135963
--- /dev/null
+++ b/fastlane/metadata/android/sq/changelogs/40103010.txt
@@ -0,0 +1,2 @@
+Ndryshime kryesore në këtë version: Sistemoni dhomat tuaja duke përdorur Hapësira! v1.3.1 ndreq një vithisje që mund të ndodhë në v1.3.0.
+Regjistër i plotë ndryshimesh: https://github.com/vector-im/element-android/releases/tag/v1.3.1
diff --git a/fastlane/metadata/android/sq/changelogs/40103020.txt b/fastlane/metadata/android/sq/changelogs/40103020.txt
new file mode 100644
index 0000000000..6c8bd02cf0
--- /dev/null
+++ b/fastlane/metadata/android/sq/changelogs/40103020.txt
@@ -0,0 +1,2 @@
+Ndryshime kryesore në këtë version: Shtim mbulimi për Android Auto. Plot ndreqje të metash!
+Regjistër i plotë ndryshimesh: https://github.com/vector-im/element-android/releases/tag/v1.3.2
diff --git a/fastlane/metadata/android/sv-SE/changelogs/40102010.txt b/fastlane/metadata/android/sv-SE/changelogs/40102010.txt
new file mode 100644
index 0000000000..f29b95de79
--- /dev/null
+++ b/fastlane/metadata/android/sv-SE/changelogs/40102010.txt
@@ -0,0 +1,2 @@
+Huvudsakliga ändringar i den här versionen: Många förbättringar för VoIP och utrymmen (fortfarande i beta).
+Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.2.1
diff --git a/fastlane/metadata/android/sv-SE/changelogs/40103000.txt b/fastlane/metadata/android/sv-SE/changelogs/40103000.txt
new file mode 100644
index 0000000000..d9a2c34f1d
--- /dev/null
+++ b/fastlane/metadata/android/sv-SE/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+Huvudsakliga ändringar i den här versionen: Organisera dina rum med utrymmen!
+Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/uk/changelogs/40103000.txt b/fastlane/metadata/android/uk/changelogs/40103000.txt
new file mode 100644
index 0000000000..64a168cbe9
--- /dev/null
+++ b/fastlane/metadata/android/uk/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+Основні зміни в цій версії: Упорядковуйте свої кімнати за допомогою Просторів!
+Повний журнал змін: https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/uk/changelogs/40103010.txt b/fastlane/metadata/android/uk/changelogs/40103010.txt
new file mode 100644
index 0000000000..5940cdedb0
--- /dev/null
+++ b/fastlane/metadata/android/uk/changelogs/40103010.txt
@@ -0,0 +1,2 @@
+Основні зміни в цій версії: Впорядковуйте кімнати у простори. v1.3.1 виправляє збої, які виникали у v1.3.0.
+Повний журнал змін: https://github.com/vector-im/element-android/releases/tag/v1.3.1
diff --git a/fastlane/metadata/android/uk/changelogs/40103020.txt b/fastlane/metadata/android/uk/changelogs/40103020.txt
new file mode 100644
index 0000000000..dc80b0be10
--- /dev/null
+++ b/fastlane/metadata/android/uk/changelogs/40103020.txt
@@ -0,0 +1,2 @@
+Основні зміни в цій версії: Додано підтримку Android Auto. Виправлення багато помилок!
+Повний журнал змін: https://github.com/vector-im/element-android/releases/tag/v1.3.2
diff --git a/fastlane/metadata/android/zh-CN/changelogs/40103000.txt b/fastlane/metadata/android/zh-CN/changelogs/40103000.txt
new file mode 100644
index 0000000000..96ec8b3322
--- /dev/null
+++ b/fastlane/metadata/android/zh-CN/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+此版本主要更改:使用空间组织你的聊天室!
+完整更新日志:https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/fastlane/metadata/android/zh-CN/changelogs/40103010.txt b/fastlane/metadata/android/zh-CN/changelogs/40103010.txt
new file mode 100644
index 0000000000..98b506fb6e
--- /dev/null
+++ b/fastlane/metadata/android/zh-CN/changelogs/40103010.txt
@@ -0,0 +1,2 @@
+此版本的主要变化:使用空间组织您的聊天室! v1.3.1 正在修复 v1.3.0 中可能发生的崩溃。
+完整更新日志:https://github.com/vector-im/element-android/releases/tag/v1.3.1
diff --git a/fastlane/metadata/android/zh-CN/changelogs/40103020.txt b/fastlane/metadata/android/zh-CN/changelogs/40103020.txt
new file mode 100644
index 0000000000..586ba8d892
--- /dev/null
+++ b/fastlane/metadata/android/zh-CN/changelogs/40103020.txt
@@ -0,0 +1,2 @@
+此版本的主要变化: 添加对 Android Auto 的支持。 许多错误修复!
+完整更新日志:https://github.com/vector-im/element-android/releases/tag/v1.3.2
diff --git a/fastlane/metadata/android/zh-TW/changelogs/40103000.txt b/fastlane/metadata/android/zh-TW/changelogs/40103000.txt
new file mode 100644
index 0000000000..fbae69cd21
--- /dev/null
+++ b/fastlane/metadata/android/zh-TW/changelogs/40103000.txt
@@ -0,0 +1,2 @@
+此版本中的主要變動:使用空間來整理您的聊天室!
+完整的變更紀錄:https://github.com/vector-im/element-android/releases/tag/v1.3.0
diff --git a/matrix-sdk-android-flow/.gitignore b/matrix-sdk-android-flow/.gitignore
new file mode 100644
index 0000000000..42afabfd2a
--- /dev/null
+++ b/matrix-sdk-android-flow/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/matrix-sdk-android-flow/build.gradle b/matrix-sdk-android-flow/build.gradle
new file mode 100644
index 0000000000..fd2e2e0824
--- /dev/null
+++ b/matrix-sdk-android-flow/build.gradle
@@ -0,0 +1,48 @@
+
+plugins {
+ id 'com.android.library'
+ id 'org.jetbrains.kotlin.android'
+}
+
+android {
+ compileSdk versions.compileSdk
+
+ defaultConfig {
+ minSdk versions.minSdk
+ targetSdk versions.targetSdk
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles "consumer-rules.pro"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility versions.sourceCompat
+ targetCompatibility versions.targetCompat
+ }
+ kotlinOptions {
+ jvmTarget = "11"
+ }
+}
+
+dependencies {
+
+ implementation project(":matrix-sdk-android")
+ implementation libs.androidx.appCompat
+
+ implementation libs.jetbrains.kotlinStdlibJdk7
+ implementation libs.jetbrains.coroutinesCore
+ implementation libs.jetbrains.coroutinesAndroid
+ implementation libs.androidx.lifecycleLivedata
+
+ // Paging
+ implementation libs.androidx.pagingRuntimeKtx
+
+ // Logging
+ implementation libs.jakewharton.timber
+}
diff --git a/matrix-sdk-android-flow/consumer-rules.pro b/matrix-sdk-android-flow/consumer-rules.pro
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/matrix-sdk-android-flow/proguard-rules.pro b/matrix-sdk-android-flow/proguard-rules.pro
new file mode 100644
index 0000000000..481bb43481
--- /dev/null
+++ b/matrix-sdk-android-flow/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/matrix-sdk-android-flow/src/main/AndroidManifest.xml b/matrix-sdk-android-flow/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..2392c0bfcb
--- /dev/null
+++ b/matrix-sdk-android-flow/src/main/AndroidManifest.xml
@@ -0,0 +1,5 @@
+
+
+
+
\ No newline at end of file
diff --git a/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowExt.kt b/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowExt.kt
new file mode 100644
index 0000000000..72493325c3
--- /dev/null
+++ b/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowExt.kt
@@ -0,0 +1,31 @@
+/*
+ * 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 org.matrix.android.sdk.flow
+
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.onStart
+import kotlinx.coroutines.withContext
+
+internal fun Flow.startWith(dispatcher: CoroutineDispatcher, supplier: suspend () -> T): Flow {
+ return onStart {
+ val value = withContext(dispatcher) {
+ supplier()
+ }
+ emit(value)
+ }
+}
diff --git a/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowRoom.kt b/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowRoom.kt
new file mode 100644
index 0000000000..42c1476b79
--- /dev/null
+++ b/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowRoom.kt
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2020 The Matrix.org Foundation C.I.C.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.matrix.android.sdk.flow
+
+import androidx.lifecycle.asFlow
+import kotlinx.coroutines.flow.Flow
+import org.matrix.android.sdk.api.query.QueryStringValue
+import org.matrix.android.sdk.api.session.events.model.Event
+import org.matrix.android.sdk.api.session.room.Room
+import org.matrix.android.sdk.api.session.room.members.RoomMemberQueryParams
+import org.matrix.android.sdk.api.session.room.model.EventAnnotationsSummary
+import org.matrix.android.sdk.api.session.room.model.ReadReceipt
+import org.matrix.android.sdk.api.session.room.model.RoomMemberSummary
+import org.matrix.android.sdk.api.session.room.model.RoomSummary
+import org.matrix.android.sdk.api.session.room.notification.RoomNotificationState
+import org.matrix.android.sdk.api.session.room.send.UserDraft
+import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
+import org.matrix.android.sdk.api.util.Optional
+import org.matrix.android.sdk.api.util.toOptional
+
+class FlowRoom(private val room: Room) {
+
+ fun liveRoomSummary(): Flow> {
+ return room.getRoomSummaryLive().asFlow()
+ .startWith(room.coroutineDispatchers.io) {
+ room.roomSummary().toOptional()
+ }
+ }
+
+ fun liveRoomMembers(queryParams: RoomMemberQueryParams): Flow> {
+ return room.getRoomMembersLive(queryParams).asFlow()
+ .startWith(room.coroutineDispatchers.io) {
+ room.getRoomMembers(queryParams)
+ }
+ }
+
+ fun liveAnnotationSummary(eventId: String): Flow> {
+ return room.getEventAnnotationsSummaryLive(eventId).asFlow()
+ .startWith(room.coroutineDispatchers.io) {
+ room.getEventAnnotationsSummary(eventId).toOptional()
+ }
+ }
+
+ fun liveTimelineEvent(eventId: String): Flow> {
+ return room.getTimeLineEventLive(eventId).asFlow()
+ .startWith(room.coroutineDispatchers.io) {
+ room.getTimeLineEvent(eventId).toOptional()
+ }
+ }
+
+ fun liveStateEvent(eventType: String, stateKey: QueryStringValue): Flow> {
+ return room.getStateEventLive(eventType, stateKey).asFlow()
+ .startWith(room.coroutineDispatchers.io) {
+ room.getStateEvent(eventType, stateKey).toOptional()
+ }
+ }
+
+ fun liveStateEvents(eventTypes: Set): Flow> {
+ return room.getStateEventsLive(eventTypes).asFlow()
+ .startWith(room.coroutineDispatchers.io) {
+ room.getStateEvents(eventTypes)
+ }
+ }
+
+ fun liveReadMarker(): Flow> {
+ return room.getReadMarkerLive().asFlow()
+ }
+
+ fun liveReadReceipt(): Flow> {
+ return room.getMyReadReceiptLive().asFlow()
+ }
+
+ fun liveEventReadReceipts(eventId: String): Flow> {
+ return room.getEventReadReceiptsLive(eventId).asFlow()
+ }
+
+ fun liveDraft(): Flow> {
+ return room.getDraftLive().asFlow()
+ .startWith(room.coroutineDispatchers.io) {
+ room.getDraft().toOptional()
+ }
+ }
+
+ fun liveNotificationState(): Flow {
+ return room.getLiveRoomNotificationState().asFlow()
+ }
+}
+
+fun Room.flow(): FlowRoom {
+ return FlowRoom(this)
+}
diff --git a/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowSession.kt b/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowSession.kt
new file mode 100644
index 0000000000..13fd097bcd
--- /dev/null
+++ b/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowSession.kt
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2020 The Matrix.org Foundation C.I.C.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.matrix.android.sdk.flow
+
+import androidx.lifecycle.asFlow
+import androidx.paging.PagedList
+import kotlinx.coroutines.flow.Flow
+import org.matrix.android.sdk.api.query.QueryStringValue
+import org.matrix.android.sdk.api.session.Session
+import org.matrix.android.sdk.api.session.accountdata.UserAccountDataEvent
+import org.matrix.android.sdk.api.session.crypto.crosssigning.MXCrossSigningInfo
+import org.matrix.android.sdk.api.session.group.GroupSummaryQueryParams
+import org.matrix.android.sdk.api.session.group.model.GroupSummary
+import org.matrix.android.sdk.api.session.identity.ThreePid
+import org.matrix.android.sdk.api.session.pushers.Pusher
+import org.matrix.android.sdk.api.session.room.RoomSummaryQueryParams
+import org.matrix.android.sdk.api.session.room.accountdata.RoomAccountDataEvent
+import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState
+import org.matrix.android.sdk.api.session.room.model.RoomMemberSummary
+import org.matrix.android.sdk.api.session.room.model.RoomSummary
+import org.matrix.android.sdk.api.session.space.SpaceSummaryQueryParams
+import org.matrix.android.sdk.api.session.sync.SyncState
+import org.matrix.android.sdk.api.session.user.model.User
+import org.matrix.android.sdk.api.session.widgets.model.Widget
+import org.matrix.android.sdk.api.util.Optional
+import org.matrix.android.sdk.api.util.toOptional
+import org.matrix.android.sdk.internal.crypto.model.CryptoDeviceInfo
+import org.matrix.android.sdk.internal.crypto.model.rest.DeviceInfo
+import org.matrix.android.sdk.internal.crypto.store.PrivateKeysInfo
+
+class FlowSession(private val session: Session) {
+
+ fun liveRoomSummaries(queryParams: RoomSummaryQueryParams): Flow> {
+ return session.getRoomSummariesLive(queryParams).asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.getRoomSummaries(queryParams)
+ }
+ }
+
+ fun liveGroupSummaries(queryParams: GroupSummaryQueryParams): Flow> {
+ return session.getGroupSummariesLive(queryParams).asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.getGroupSummaries(queryParams)
+ }
+ }
+
+ fun liveSpaceSummaries(queryParams: SpaceSummaryQueryParams): Flow> {
+ return session.spaceService().getSpaceSummariesLive(queryParams).asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.spaceService().getSpaceSummaries(queryParams)
+ }
+ }
+
+ fun liveBreadcrumbs(queryParams: RoomSummaryQueryParams): Flow> {
+ return session.getBreadcrumbsLive(queryParams).asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.getBreadcrumbs(queryParams)
+ }
+ }
+
+ fun liveMyDevicesInfo(): Flow> {
+ return session.cryptoService().getLiveMyDevicesInfo().asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.cryptoService().getMyDevicesInfo()
+ }
+ }
+
+ fun liveSyncState(): Flow {
+ return session.getSyncStateLive().asFlow()
+ }
+
+ fun livePushers(): Flow> {
+ return session.getPushersLive().asFlow()
+ }
+
+ fun liveUser(userId: String): Flow> {
+ return session.getUserLive(userId).asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.getUser(userId).toOptional()
+ }
+ }
+
+ fun liveRoomMember(userId: String, roomId: String): Flow> {
+ return session.getRoomMemberLive(userId, roomId).asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.getRoomMember(userId, roomId).toOptional()
+ }
+ }
+
+ fun liveUsers(): Flow> {
+ return session.getUsersLive().asFlow()
+ }
+
+ fun liveIgnoredUsers(): Flow> {
+ return session.getIgnoredUsersLive().asFlow()
+ }
+
+ fun livePagedUsers(filter: String? = null, excludedUserIds: Set? = null): Flow> {
+ return session.getPagedUsersLive(filter, excludedUserIds).asFlow()
+ }
+
+ fun liveThreePIds(refreshData: Boolean): Flow> {
+ return session.getThreePidsLive(refreshData).asFlow()
+ .startWith(session.coroutineDispatchers.io) { session.getThreePids() }
+ }
+
+ fun livePendingThreePIds(): Flow> {
+ return session.getPendingThreePidsLive().asFlow()
+ .startWith(session.coroutineDispatchers.io) { session.getPendingThreePids() }
+ }
+
+ fun liveUserCryptoDevices(userId: String): Flow> {
+ return session.cryptoService().getLiveCryptoDeviceInfo(userId).asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.cryptoService().getCryptoDeviceInfo(userId)
+ }
+ }
+
+ fun liveCrossSigningInfo(userId: String): Flow> {
+ return session.cryptoService().crossSigningService().getLiveCrossSigningKeys(userId).asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.cryptoService().crossSigningService().getUserCrossSigningKeys(userId).toOptional()
+ }
+ }
+
+ fun liveCrossSigningPrivateKeys(): Flow> {
+ return session.cryptoService().crossSigningService().getLiveCrossSigningPrivateKeys().asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.cryptoService().crossSigningService().getCrossSigningPrivateKeys().toOptional()
+ }
+ }
+
+ fun liveUserAccountData(types: Set): Flow> {
+ return session.accountDataService().getLiveUserAccountDataEvents(types).asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.accountDataService().getUserAccountDataEvents(types)
+ }
+ }
+
+ fun liveRoomAccountData(types: Set): Flow> {
+ return session.accountDataService().getLiveRoomAccountDataEvents(types).asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.accountDataService().getRoomAccountDataEvents(types)
+ }
+ }
+
+ fun liveRoomWidgets(
+ roomId: String,
+ widgetId: QueryStringValue,
+ widgetTypes: Set? = null,
+ excludedTypes: Set? = null
+ ): Flow> {
+ return session.widgetService().getRoomWidgetsLive(roomId, widgetId, widgetTypes, excludedTypes).asFlow()
+ .startWith(session.coroutineDispatchers.io) {
+ session.widgetService().getRoomWidgets(roomId, widgetId, widgetTypes, excludedTypes)
+ }
+ }
+
+ fun liveRoomChangeMembershipState(): Flow