Merge pull request #5951 from element-hq/fix/crash-on-nightly-incorrect-di-cast
Fix crash when changing the push provider in nightlies
This commit is contained in:
commit
5303e81fa3
3 changed files with 4 additions and 6 deletions
3
app/proguard-rules.pro
vendored
3
app/proguard-rules.pro
vendored
|
|
@ -70,3 +70,6 @@
|
||||||
-keep class uniffi.** { *;}
|
-keep class uniffi.** { *;}
|
||||||
-keep class io.element.android.x.di.** { *; }
|
-keep class io.element.android.x.di.** { *; }
|
||||||
-keepclasseswithmembernames,allowoptimization,allowshrinking class io.element.android.** { *; }
|
-keepclasseswithmembernames,allowoptimization,allowshrinking class io.element.android.** { *; }
|
||||||
|
|
||||||
|
# Keep Metro classes
|
||||||
|
-keep class dev.zacsweers.metro.** { *; }
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import kotlinx.serialization.json.Json
|
||||||
/**
|
/**
|
||||||
* Provides a Json instance configured to ignore unknown keys.
|
* Provides a Json instance configured to ignore unknown keys.
|
||||||
*/
|
*/
|
||||||
fun interface JsonProvider : Provider<Json>
|
typealias JsonProvider = Provider<Json>
|
||||||
|
|
||||||
@ContributesBinding(AppScope::class)
|
@ContributesBinding(AppScope::class)
|
||||||
@SingleIn(AppScope::class)
|
@SingleIn(AppScope::class)
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,9 @@
|
||||||
package io.element.android.libraries.pushproviders.unifiedpush
|
package io.element.android.libraries.pushproviders.unifiedpush
|
||||||
|
|
||||||
import dev.zacsweers.metro.AppScope
|
import dev.zacsweers.metro.AppScope
|
||||||
import dev.zacsweers.metro.Binds
|
|
||||||
import dev.zacsweers.metro.ContributesTo
|
import dev.zacsweers.metro.ContributesTo
|
||||||
import org.unifiedpush.android.connector.MessagingReceiver
|
|
||||||
|
|
||||||
@ContributesTo(AppScope::class)
|
@ContributesTo(AppScope::class)
|
||||||
interface VectorUnifiedPushMessagingReceiverBindings {
|
interface VectorUnifiedPushMessagingReceiverBindings {
|
||||||
fun inject(receiver: VectorUnifiedPushMessagingReceiver)
|
fun inject(receiver: VectorUnifiedPushMessagingReceiver)
|
||||||
|
|
||||||
@Binds
|
|
||||||
fun bindsMessagingReceiver(vectorUnifiedPushMessagingReceiver: VectorUnifiedPushMessagingReceiver): MessagingReceiver
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue