Skip to content

Commit 1d2fd52

Browse files
committed
Merge branch 'develop' into feature/fga/power_level
2 parents 669e62e + 9741b3d commit 1d2fd52

File tree

188 files changed

+813
-628
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+813
-628
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ jobs:
3434
distribution: 'temurin' # See 'Supported distributions' for available options
3535
java-version: '17'
3636
- name: Configure gradle
37-
uses: gradle/[email protected].0
37+
uses: gradle/[email protected].1
3838
with:
3939
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
4040
- name: Assemble debug APK
41+
env:
42+
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
4143
run: ./gradlew assembleDebug $CI_GRADLE_ARG_PROPERTIES
4244
- name: Upload debug APKs
4345
uses: actions/upload-artifact@v3

.github/workflows/nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
run: |
3636
./gradlew assembleNightly appDistributionUploadNightly $CI_GRADLE_ARG_PROPERTIES
3737
env:
38+
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
3839
ELEMENT_ANDROID_NIGHTLY_KEYID: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYID }}
3940
ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD }}
4041
ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD }}

.github/workflows/nightlyReports.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
distribution: 'temurin' # See 'Supported distributions' for available options
6363
java-version: '17'
6464
- name: Configure gradle
65-
uses: gradle/[email protected].0
65+
uses: gradle/[email protected].1
6666
with:
6767
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
6868
- name: Dependency analysis

.github/workflows/quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
distribution: 'temurin' # See 'Supported distributions' for available options
4040
java-version: '17'
4141
- name: Configure gradle
42-
uses: gradle/[email protected].0
42+
uses: gradle/[email protected].1
4343
with:
4444
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
4545
- name: Run code quality check suite

.github/workflows/recordScreenshots.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
java-version: '17'
2525
# Add gradle cache, this should speed up the process
2626
- name: Configure gradle
27-
uses: gradle/[email protected].0
27+
uses: gradle/[email protected].1
2828
with:
2929
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
3030
- name: Record screenshots

.github/workflows/scripts/recordScreenshots.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ if [[ -z ${REPO} ]]; then
5858
exit 1
5959
fi
6060

61+
echo "Deleting previous screenshots"
62+
./gradlew removeOldSnapshots --stacktrace -PpreDexEnable=false --max-workers 4 --warn
63+
6164
echo "Record screenshots"
6265
./gradlew recordPaparazziDebug --stacktrace -PpreDexEnable=false --max-workers 4 --warn
6366

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
distribution: 'temurin' # See 'Supported distributions' for available options
3434
java-version: '17'
3535
- name: Configure gradle
36-
uses: gradle/[email protected].0
36+
uses: gradle/[email protected].1
3737
with:
3838
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
3939

.idea/dictionaries/shared.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

appnav/src/main/kotlin/io/element/android/appnav/loggedin/LoggedInView.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package io.element.android.appnav.loggedin
1818

19-
import android.app.Activity
2019
import androidx.compose.runtime.Composable
2120
import androidx.compose.ui.Modifier
2221
import androidx.compose.ui.platform.LocalContext
@@ -32,14 +31,12 @@ fun LoggedInView(
3231
state: LoggedInState,
3332
modifier: Modifier = Modifier
3433
) {
35-
val activity = LocalContext.current as? Activity
34+
val context = LocalContext.current
3635

3736
PermissionsView(
3837
state = state.permissionsState,
3938
modifier = modifier,
40-
openSystemSettings = {
41-
activity?.let { openAppSettingsPage(it) }
42-
}
39+
openSystemSettings = context::openAppSettingsPage
4340
)
4441
}
4542

docs/maps.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Use of maps
2+
3+
<!--- TOC -->
4+
5+
* [Overview](#overview)
6+
* [Local development with MapTiler](#local-development-with-maptiler)
7+
* [Making releasable builds with MapTiler](#making-releasable-builds-with-maptiler)
8+
* [Using other map sources or MapTiler styles](#using-other-map-sources-or-maptiler-styles)
9+
10+
<!--- END -->
11+
12+
## Overview
13+
14+
Element Android uses [MapTiler](https://www.maptiler.com/) to provide map
15+
imagery where required. MapTiler requires an API key, which we bake in to
16+
the app at release time.
17+
18+
## Local development with MapTiler
19+
20+
If you're developing the application and want maps to render properly you can
21+
sign up for the [MapTiler free tier](https://www.maptiler.com/cloud/pricing/).
22+
23+
Place your API key in `local.properties` with the key
24+
`services.maptiler.apikey`, e.g.:
25+
26+
```properties
27+
services.maptiler.apikey=abCd3fGhijK1mN0pQr5t
28+
```
29+
30+
## Making releasable builds with MapTiler
31+
32+
To insert the MapTiler API key when building an APK, set the
33+
`ELEMENT_ANDROID_MAPTILER_API_KEY` environment variable in your build
34+
environment.
35+
36+
## Using other map sources or MapTiler styles
37+
38+
If you wish to use an alternative map provider, or custom MapTiler styles,
39+
you can customise the functions in
40+
`features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapUrls.kt`.
41+
We've kept this file small and self contained to minimise the chances of merge
42+
collisions in forks.

0 commit comments

Comments
 (0)