This commit is contained in:
Benoit Marty 2020-10-07 18:08:37 +02:00
parent 29d25c377b
commit a80f1538c7
3 changed files with 1 additions and 9 deletions

View file

@ -18,7 +18,6 @@ package im.vector.app.core.platform
import android.app.Activity import android.app.Activity
import android.content.Context import android.content.Context
import android.content.Intent
import android.content.res.Configuration import android.content.res.Configuration
import android.os.Bundle import android.os.Bundle
import android.os.Parcelable import android.os.Parcelable
@ -206,7 +205,7 @@ abstract class VectorBaseActivity : AppCompatActivity(), HasScreenInjector {
}) })
pinLocker.getLiveState().observeNotNull(this) { pinLocker.getLiveState().observeNotNull(this) {
if (this@VectorBaseActivity !is UnlockedActivity && it == PinLocker.State.LOCKED) { if (this@VectorBaseActivity !is UnlockedActivity && it == PinLocker.State.LOCKED) {
navigator.openPinCode(this, PinMode.AUTH, pinStartForActivityResult) navigator.openPinCode(this, pinStartForActivityResult, PinMode.AUTH)
} }
} }
sessionListener = vectorComponent.sessionListener() sessionListener = vectorComponent.sessionListener()

View file

@ -310,11 +310,6 @@ class DefaultNavigator @Inject constructor(
activityResultLauncher.launch(intent) activityResultLauncher.launch(intent)
} }
override fun openPinCode(activity: Activity, pinMode: PinMode, activityResultLauncher: ActivityResultLauncher<Intent>) {
val intent = PinActivity.newIntent(activity, PinArgs(pinMode))
activityResultLauncher.launch(intent)
}
override fun openMediaViewer(activity: Activity, override fun openMediaViewer(activity: Activity,
roomId: String, roomId: String,
mediaData: AttachmentData, mediaData: AttachmentData,

View file

@ -87,8 +87,6 @@ interface Navigator {
activityResultLauncher: ActivityResultLauncher<Intent>, activityResultLauncher: ActivityResultLauncher<Intent>,
pinMode: PinMode) pinMode: PinMode)
fun openPinCode(activity: Activity, pinMode: PinMode, activityResultLauncher: ActivityResultLauncher<Intent>)
fun openTerms(context: Context, fun openTerms(context: Context,
activityResultLauncher: ActivityResultLauncher<Intent>, activityResultLauncher: ActivityResultLauncher<Intent>,
serviceType: TermsService.ServiceType, serviceType: TermsService.ServiceType,