mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
Verification popup won't show
This commit is contained in:
parent
f6c7f3eed1
commit
254eb26211
3 changed files with 12 additions and 4 deletions
|
@ -23,6 +23,7 @@ Bugfix 🐛:
|
|||
- Can't handle ongoing call events in background (#1992)
|
||||
- Crash / Attachment viewer: Cannot draw a recycled Bitmap #2034
|
||||
- Login with Matrix-Id | Autodiscovery fails if identity server is invalid and Homeserver ok (#2027)
|
||||
- Verification popup won't show
|
||||
|
||||
Translations 🗣:
|
||||
-
|
||||
|
|
|
@ -254,6 +254,6 @@ class PopupAlertManager @Inject constructor(private val avatarRenderer: Lazy<Ava
|
|||
return alert != null
|
||||
&& activity !is PinActivity
|
||||
&& activity is VectorBaseActivity
|
||||
&& alert.shouldBeDisplayedIn?.invoke(activity) == true
|
||||
&& alert.shouldBeDisplayedIn.invoke(activity)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ interface VectorAlert {
|
|||
val title: String
|
||||
val description: String
|
||||
val iconId: Int?
|
||||
val shouldBeDisplayedIn: ((Activity) -> Boolean)?
|
||||
val shouldBeDisplayedIn: ((Activity) -> Boolean)
|
||||
|
||||
data class Button(val title: String, val action: Runnable, val autoClose: Boolean)
|
||||
|
||||
|
@ -59,7 +59,11 @@ open class DefaultVectorAlert(override val uid: String,
|
|||
override val title: String,
|
||||
override val description: String,
|
||||
@DrawableRes override val iconId: Int?,
|
||||
override val shouldBeDisplayedIn: ((Activity) -> Boolean)? = null) : VectorAlert {
|
||||
/**
|
||||
* Alert are displayed by default, but let this lambda return false to prevent displaying
|
||||
*/
|
||||
override val shouldBeDisplayedIn: ((Activity) -> Boolean) = { true }
|
||||
) : VectorAlert {
|
||||
|
||||
// will be set by manager, and accessible by actions at runtime
|
||||
override var weakCurrentActivity: WeakReference<Activity>? = null
|
||||
|
@ -87,7 +91,10 @@ class VerificationVectorAlert(uid: String,
|
|||
title: String,
|
||||
override val description: String,
|
||||
@DrawableRes override val iconId: Int?,
|
||||
override val shouldBeDisplayedIn: ((Activity) -> Boolean)? = null
|
||||
/**
|
||||
* Alert are displayed by default, but let this lambda return false to prevent displaying
|
||||
*/
|
||||
override val shouldBeDisplayedIn: ((Activity) -> Boolean) = { true }
|
||||
) : DefaultVectorAlert(
|
||||
uid, title, description, iconId, shouldBeDisplayedIn
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue