Merge pull request #2260 from vector-im/feature/bma/fix_issue

Feature/bma/fix issue
This commit is contained in:
Benoit Marty 2020-10-15 18:14:17 +02:00 committed by GitHub
commit 93683d026b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 3 deletions

View File

@ -33,9 +33,12 @@ Bugfix 🐛:
- Very long topic cannot be fully visible (#1957)
- Properly detect cross signing keys reset
- Don't set presence when handling a push notification or polling (#2156)
- Be robust against `StrandHogg` task injection
- Clear alerts if user sign out
Translations 🗣:
- Move store data to `/fastlane/metadata/android` (#812)
- Weblate is now hosted at https://translate.element.io
SDK API changes ⚠️:
- Search messages in a room by using Session.searchService() or Room.search()
@ -137,7 +140,7 @@ Bugfix 🐛:
- Replies to poll appears in timeline as unsupported events during sending (#1004)
Translations 🗣:
- The SDK is now using SAS string translations from [Weblate Matrix-doc project](https://translate.riot.im/projects/matrix-doc/) (#1909)
- The SDK is now using SAS string translations from [Weblate Matrix-doc project](https://translate.element.io/projects/matrix-doc/) (#1909)
- New translation to kabyle
Build 🧱:

View File

@ -40,7 +40,7 @@ For now, the Matrix SDK and the Element application are in the same project. So
## I want to help translating Element
If you want to fix an issue with an English string, please submit a PR.
If you want to fix an issue in other languages, or add a missing translation, or even add a new language, please use [Weblate](https://translate.riot.im/projects/element-android/).
If you want to fix an issue in other languages, or add a missing translation, or even add a new language, please use [Weblate](https://translate.element.io/projects/element-android/).
## I want to submit a PR to fix an issue

View File

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

View File

@ -14,6 +14,8 @@ org.gradle.jvmargs=-Xmx2048m
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# Enable file system watch (https://docs.gradle.org/6.7/release-notes.html)
org.gradle.vfs.watch=true
vector.debugPrivateData=false
vector.httpLogLevel=NONE

View File

@ -63,6 +63,8 @@
<activity
android:name=".features.MainActivity"
android:launchMode="singleTask"
android:taskAffinity=""
android:theme="@style/AppTheme.Launcher" />
<!-- Activity alias for the launcher Activity (must be declared after the Activity it targets) -->

View File

@ -36,6 +36,7 @@ import im.vector.app.features.notifications.NotificationDrawerManager
import im.vector.app.features.pin.PinCodeStore
import im.vector.app.features.pin.PinLocker
import im.vector.app.features.pin.UnlockedActivity
import im.vector.app.features.popup.PopupAlertManager
import im.vector.app.features.settings.VectorPreferences
import im.vector.app.features.signout.hard.SignedOutActivity
import im.vector.app.features.signout.soft.SoftLogoutActivity
@ -89,6 +90,7 @@ class MainActivity : VectorBaseActivity(), UnlockedActivity {
@Inject lateinit var shortcutsHandler: ShortcutsHandler
@Inject lateinit var pinCodeStore: PinCodeStore
@Inject lateinit var pinLocker: PinLocker
@Inject lateinit var popupAlertManager: PopupAlertManager
override fun injectWith(injector: ScreenComponent) {
injector.inject(this)
@ -115,6 +117,9 @@ class MainActivity : VectorBaseActivity(), UnlockedActivity {
// Also clear the dynamic shortcuts
shortcutsHandler.clearShortcuts()
// Also clear the alerts
popupAlertManager.cancelAll()
}
private fun parseArgs(): MainActivityArgs {

View File

@ -78,6 +78,21 @@ class PopupAlertManager @Inject constructor(private val avatarRenderer: Lazy<Ava
}
}
/**
* Cancel all alerts, after a sign out for instance
*/
fun cancelAll() {
synchronized(alertFiFo) {
alertFiFo.clear()
}
// Cancel any displayed alert
weakCurrentActivity?.get()?.runOnUiThread {
Alerter.hide()
currentIsDismissed()
}
}
fun onNewActivityDisplayed(activity: Activity) {
// we want to remove existing popup on previous activity and display it on new one
if (currentAlerter != null) {