Mavericks: continue removing reference to old MvRx API

This commit is contained in:
ganfra 2021-10-01 18:27:36 +02:00
parent 43c75bdae7
commit 0e01c64f69
37 changed files with 114 additions and 113 deletions

View File

@ -19,7 +19,6 @@ package im.vector.app.core.extensions
import android.os.Bundle
import android.os.Parcelable
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.MvRx
fun Parcelable?.toMvRxBundle(): Bundle? {
return this?.let { Bundle().apply { putParcelable(Mavericks.KEY_ARG, it) } }

View File

@ -27,7 +27,8 @@ import android.widget.FrameLayout
import androidx.annotation.CallSuper
import androidx.lifecycle.ViewModelProvider
import androidx.viewbinding.ViewBinding
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.MavericksView
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.MvRxView
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
@ -43,9 +44,9 @@ import timber.log.Timber
import java.util.concurrent.TimeUnit
/**
* Add MvRx capabilities to bottomsheetdialog (like BaseMvRxFragment)
* Add Mavericks capabilities, handle DI and bindings.
*/
abstract class VectorBaseBottomSheetDialogFragment<VB : ViewBinding> : BottomSheetDialogFragment(), MvRxView {
abstract class VectorBaseBottomSheetDialogFragment<VB : ViewBinding> : BottomSheetDialogFragment(), MavericksView {
private lateinit var screenComponent: ScreenComponent
@ -166,7 +167,7 @@ abstract class VectorBaseBottomSheetDialogFragment<VB : ViewBinding> : BottomShe
}
protected fun setArguments(args: Parcelable? = null) {
arguments = args?.let { Bundle().apply { putParcelable(MvRx.KEY_ARG, it) } }
arguments = args?.let { Bundle().apply { putParcelable(Mavericks.KEY_ARG, it) } }
}
/* ==========================================================================================

View File

@ -27,9 +27,10 @@ import android.view.ViewGroup
import androidx.annotation.CallSuper
import androidx.annotation.MainThread
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
import androidx.viewbinding.ViewBinding
import com.airbnb.mvrx.BaseMvRxFragment
import com.airbnb.mvrx.MvRxView
import com.bumptech.glide.util.Util.assertMainThread
import com.google.android.material.appbar.MaterialToolbar
import com.google.android.material.dialog.MaterialAlertDialogBuilder
@ -49,7 +50,7 @@ import io.reactivex.disposables.Disposable
import timber.log.Timber
import java.util.concurrent.TimeUnit
abstract class VectorBaseFragment<VB : ViewBinding> : BaseMvRxFragment(), HasScreenInjector {
abstract class VectorBaseFragment<VB : ViewBinding> : Fragment(), MvRxView, HasScreenInjector {
protected val vectorBaseActivity: VectorBaseActivity<*> by lazy {
activity as VectorBaseActivity<*>

View File

@ -25,7 +25,7 @@ import android.view.KeyEvent
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat
import androidx.media.session.MediaButtonReceiver
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import im.vector.app.core.extensions.vectorComponent
import im.vector.app.features.call.CallArgs
import im.vector.app.features.call.VectorCallActivity
@ -165,7 +165,7 @@ class CallService : VectorService() {
val incomingCallAlert = IncomingCallAlert(callId,
shouldBeDisplayedIn = { activity ->
if (activity is VectorCallActivity) {
activity.intent.getParcelableExtra<CallArgs>(MvRx.KEY_ARG)?.callId != call.callId
activity.intent.getParcelableExtra<CallArgs>(Mavericks.KEY_ARG)?.callId != call.callId
} else true
}
).apply {

View File

@ -26,7 +26,7 @@ import androidx.browser.customtabs.CustomTabsCallback
import androidx.browser.customtabs.CustomTabsClient
import androidx.browser.customtabs.CustomTabsServiceConnection
import androidx.browser.customtabs.CustomTabsSession
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import com.airbnb.mvrx.withState
import im.vector.app.R
@ -78,7 +78,7 @@ class ReAuthActivity : SimpleFragmentActivity(), ReAuthViewModel.Factory {
val title = intent.extras?.getString(EXTRA_REASON_TITLE) ?: getString(R.string.re_authentication_activity_title)
supportActionBar?.setTitle(title) ?: run { setTitle(title) }
// val authArgs = intent.getParcelableExtra<Args>(MvRx.KEY_ARG)
// val authArgs = intent.getParcelableExtra<Args>(Mavericks.KEY_ARG)
// For the sso flow we can for now only rely on the fallback flow, that handles all
// the UI, due to the sandbox nature of CCT (chrome custom tab) we cannot get much information
@ -221,7 +221,7 @@ class ReAuthActivity : SimpleFragmentActivity(), ReAuthViewModel.Factory {
}
}
return Intent(context, ReAuthActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, Args(authType, reasonTitle, fromError.session, lastErrorCode, resultKeyStoreAlias))
putExtra(Mavericks.KEY_ARG, Args(authType, reasonTitle, fromError.session, lastErrorCode, resultKeyStoreAlias))
}
}
}

View File

@ -36,7 +36,7 @@ import androidx.core.content.getSystemService
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import com.airbnb.mvrx.withState
import com.google.android.material.card.MaterialCardView
@ -167,8 +167,8 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
intent?.takeIf { it.hasExtra(MvRx.KEY_ARG) }
?.let { intent.getParcelableExtra<CallArgs>(MvRx.KEY_ARG) }
intent?.takeIf { it.hasExtra(Mavericks.KEY_ARG) }
?.let { intent.getParcelableExtra<CallArgs>(Mavericks.KEY_ARG) }
?.let {
callViewModel.handle(VectorCallViewActions.SwitchCall(it))
}
@ -633,7 +633,7 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
return Intent(context, VectorCallActivity::class.java).apply {
// what could be the best flags?
flags = Intent.FLAG_ACTIVITY_NEW_TASK
putExtra(MvRx.KEY_ARG, CallArgs(call.nativeRoomId, call.callId, call.mxCall.opponentUserId, !call.mxCall.isOutgoing, call.mxCall.isVideoCall))
putExtra(Mavericks.KEY_ARG, CallArgs(call.nativeRoomId, call.callId, call.mxCall.opponentUserId, !call.mxCall.isOutgoing, call.mxCall.isVideoCall))
putExtra(EXTRA_MODE, mode)
}
}
@ -648,7 +648,7 @@ class VectorCallActivity : VectorBaseActivity<ActivityCallBinding>(), CallContro
return Intent(context, VectorCallActivity::class.java).apply {
// what could be the best flags?
flags = Intent.FLAG_ACTIVITY_NEW_TASK
putExtra(MvRx.KEY_ARG, CallArgs(signalingRoomId, callId, otherUserId, isIncomingCall, isVideoCall))
putExtra(Mavericks.KEY_ARG, CallArgs(signalingRoomId, callId, otherUserId, isIncomingCall, isVideoCall))
putExtra(EXTRA_MODE, mode)
}
}

View File

@ -28,7 +28,7 @@ import android.widget.Toast
import androidx.core.view.isVisible
import androidx.lifecycle.Lifecycle
import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.Success
import com.airbnb.mvrx.viewModel
import com.facebook.react.modules.core.PermissionListener
@ -205,8 +205,8 @@ class VectorJitsiActivity : VectorBaseActivity<ActivityJitsiBinding>(), JitsiMee
JitsiMeetActivityDelegate.onNewIntent(intent)
// Is it a switch to another conf?
intent?.takeIf { it.hasExtra(MvRx.KEY_ARG) }
?.let { intent.getParcelableExtra<Args>(MvRx.KEY_ARG) }
intent?.takeIf { it.hasExtra(Mavericks.KEY_ARG) }
?.let { intent.getParcelableExtra<Args>(Mavericks.KEY_ARG) }
?.let {
jitsiViewModel.handle(JitsiCallViewActions.SwitchTo(it, true))
}
@ -242,7 +242,7 @@ class VectorJitsiActivity : VectorBaseActivity<ActivityJitsiBinding>(), JitsiMee
companion object {
fun newIntent(context: Context, roomId: String, widgetId: String, enableVideo: Boolean): Intent {
return Intent(context, VectorJitsiActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, Args(roomId, widgetId, enableVideo))
putExtra(Mavericks.KEY_ARG, Args(roomId, widgetId, enableVideo))
}
}
}

View File

@ -20,7 +20,7 @@ import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.os.Parcelable
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import com.google.android.material.tabs.TabLayoutMediator
import im.vector.app.R
@ -121,7 +121,7 @@ class CallTransferActivity : VectorBaseActivity<ActivityCallTransferBinding>(),
fun newIntent(context: Context, callId: String): Intent {
return Intent(context, CallTransferActivity::class.java).also {
it.putExtra(MvRx.KEY_ARG, CallTransferArgs(callId))
it.putExtra(Mavericks.KEY_ARG, CallTransferArgs(callId))
}
}
}

View File

@ -25,7 +25,7 @@ import android.view.View
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentOnAttachListener
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import im.vector.app.R
@ -159,7 +159,7 @@ class SharedSecureStorageActivity :
resultKeyStoreAlias: String = DEFAULT_RESULT_KEYSTORE_ALIAS): Intent {
require(requestedSecrets.isNotEmpty())
return Intent(context, SharedSecureStorageActivity::class.java).also {
it.putExtra(MvRx.KEY_ARG, Args(
it.putExtra(Mavericks.KEY_ARG, Args(
keyId,
requestedSecrets,
resultKeyStoreAlias

View File

@ -20,7 +20,7 @@ import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.Async
import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.MavericksState
import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.Success
@ -327,7 +327,7 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
@JvmStatic
override fun create(viewModelContext: ViewModelContext, state: SharedSecureStorageViewState): SharedSecureStorageViewModel? {
val activity: SharedSecureStorageActivity = viewModelContext.activity()
val args: SharedSecureStorageActivity.Args = activity.intent.getParcelableExtra(MvRx.KEY_ARG) ?: error("Missing args")
val args: SharedSecureStorageActivity.Args = activity.intent.getParcelableExtra(Mavericks.KEY_ARG) ?: error("Missing args")
return activity.viewModelFactory.create(state, args)
}
}

View File

@ -24,7 +24,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.withState
import com.google.android.material.dialog.MaterialAlertDialogBuilder
@ -184,7 +184,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
if (state.quadSHasBeenReset) {
showFragment(VerificationConclusionFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(
putParcelable(Mavericks.KEY_ARG, VerificationConclusionFragment.Args(
isSuccessFull = true,
isMe = true,
cancelReason = null
@ -211,7 +211,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
}
if (state.selfVerificationMode && state.verifiedFromPrivateKeys) {
showFragment(VerificationConclusionFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(true, null, state.isMe))
putParcelable(Mavericks.KEY_ARG, VerificationConclusionFragment.Args(true, null, state.isMe))
})
return@withState
}
@ -235,7 +235,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
is VerificationTxState.MacSent,
is VerificationTxState.Verifying -> {
showFragment(VerificationEmojiCodeFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationArgs(
putParcelable(Mavericks.KEY_ARG, VerificationArgs(
state.otherUserMxItem?.id ?: "",
// If it was outgoing it.transaction id would be null, but the pending request
// would be updated (from localId to txId)
@ -244,12 +244,12 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
}
is VerificationTxState.Verified -> {
showFragment(VerificationConclusionFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(true, null, state.isMe))
putParcelable(Mavericks.KEY_ARG, VerificationConclusionFragment.Args(true, null, state.isMe))
})
}
is VerificationTxState.Cancelled -> {
showFragment(VerificationConclusionFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(false, state.sasTransactionState.cancelCode.value, state.isMe))
putParcelable(Mavericks.KEY_ARG, VerificationConclusionFragment.Args(false, state.sasTransactionState.cancelCode.value, state.isMe))
})
}
}
@ -265,7 +265,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
is VerificationTxState.Started,
is VerificationTxState.WaitingOtherReciprocateConfirm -> {
showFragment(VerificationQRWaitingFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationQRWaitingFragment.Args(
putParcelable(Mavericks.KEY_ARG, VerificationQRWaitingFragment.Args(
isMe = state.isMe,
otherUserName = state.otherUserMxItem?.getBestName() ?: ""
))
@ -274,13 +274,13 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
}
is VerificationTxState.Verified -> {
showFragment(VerificationConclusionFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(true, null, state.isMe))
putParcelable(Mavericks.KEY_ARG, VerificationConclusionFragment.Args(true, null, state.isMe))
})
return@withState
}
is VerificationTxState.Cancelled -> {
showFragment(VerificationConclusionFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(false, state.qrTransactionState.cancelCode.value, state.isMe))
putParcelable(Mavericks.KEY_ARG, VerificationConclusionFragment.Args(false, state.qrTransactionState.cancelCode.value, state.isMe))
})
return@withState
}
@ -294,7 +294,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
// The request has been declined, we should dismiss
views.otherUserNameText.text = getString(R.string.verification_cancelled)
showFragment(VerificationConclusionFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationConclusionFragment.Args(
putParcelable(Mavericks.KEY_ARG, VerificationConclusionFragment.Args(
false,
state.pendingRequest.invoke()?.cancelConclusion?.value ?: CancelCode.User.value,
state.isMe))
@ -309,13 +309,13 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
Timber.v("## SAS show bottom sheet for outgoing and ready request")
// Show choose method fragment with waiting
showFragment(VerificationChooseMethodFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationArgs(state.otherUserMxItem?.id
putParcelable(Mavericks.KEY_ARG, VerificationArgs(state.otherUserMxItem?.id
?: "", state.pendingRequest.invoke()?.transactionId))
})
} else {
// Stay on the start fragment
showFragment(VerificationRequestFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationArgs(
putParcelable(Mavericks.KEY_ARG, VerificationArgs(
state.otherUserMxItem?.id ?: "",
state.pendingRequest.invoke()?.transactionId,
state.roomId))
@ -325,7 +325,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
Timber.v("## SAS show bottom sheet for Incoming request")
// For incoming we can switch to choose method because ready is being sent or already sent
showFragment(VerificationChooseMethodFragment::class, Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationArgs(state.otherUserMxItem?.id
putParcelable(Mavericks.KEY_ARG, VerificationArgs(state.otherUserMxItem?.id
?: "", state.pendingRequest.invoke()?.transactionId))
})
}
@ -348,7 +348,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
fun withArgs(roomId: String?, otherUserId: String, transactionId: String? = null): VerificationBottomSheet {
return VerificationBottomSheet().apply {
arguments = Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationArgs(
putParcelable(Mavericks.KEY_ARG, VerificationArgs(
otherUserId = otherUserId,
roomId = roomId,
verificationId = transactionId,
@ -361,7 +361,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
fun forSelfVerification(session: Session): VerificationBottomSheet {
return VerificationBottomSheet().apply {
arguments = Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationArgs(
putParcelable(Mavericks.KEY_ARG, VerificationArgs(
otherUserId = session.myUserId,
selfVerificationMode = true
))
@ -372,7 +372,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
fun forSelfVerification(session: Session, outgoingRequest: String): VerificationBottomSheet {
return VerificationBottomSheet().apply {
arguments = Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationArgs(
putParcelable(Mavericks.KEY_ARG, VerificationArgs(
otherUserId = session.myUserId,
selfVerificationMode = true,
verificationId = outgoingRequest

View File

@ -21,7 +21,7 @@ import android.os.Parcelable
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import im.vector.app.core.extensions.cleanup
import im.vector.app.core.extensions.configureWith
import im.vector.app.core.platform.VectorBaseFragment
@ -46,7 +46,7 @@ class VerificationQRWaitingFragment @Inject constructor(
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
setupRecyclerView()
(arguments?.getParcelable(MvRx.KEY_ARG) as? Args)?.let {
(arguments?.getParcelable(Mavericks.KEY_ARG) as? Args)?.let {
controller.update(it)
}
}

View File

@ -27,7 +27,7 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.viewModel
@ -208,7 +208,7 @@ class RoomDevToolActivity : SimpleFragmentActivity(), RoomDevToolViewModel.Facto
fun intent(context: Context, roomId: String): Intent {
return Intent(context, RoomDevToolActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, Args(roomId))
putExtra(Mavericks.KEY_ARG, Args(roomId))
}
}
}

View File

@ -27,7 +27,7 @@ import android.view.MenuItem
import androidx.core.view.GravityCompat
import androidx.core.view.isVisible
import androidx.drawerlayout.widget.DrawerLayout
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import com.google.android.material.appbar.MaterialToolbar
import com.google.android.material.dialog.MaterialAlertDialogBuilder
@ -228,7 +228,7 @@ class HomeActivity :
}
.disposeOnDestroy()
val args = intent.getParcelableExtra<HomeActivityArgs>(MvRx.KEY_ARG)
val args = intent.getParcelableExtra<HomeActivityArgs>(Mavericks.KEY_ARG)
if (args?.clearNotification == true) {
notificationDrawerManager.clearAllEvents()
@ -433,7 +433,7 @@ class HomeActivity :
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
val parcelableExtra = intent?.getParcelableExtra<HomeActivityArgs>(MvRx.KEY_ARG)
val parcelableExtra = intent?.getParcelableExtra<HomeActivityArgs>(Mavericks.KEY_ARG)
if (parcelableExtra?.clearNotification == true) {
notificationDrawerManager.clearAllEvents()
}
@ -580,7 +580,7 @@ class HomeActivity :
return Intent(context, HomeActivity::class.java)
.apply {
putExtra(MvRx.KEY_ARG, args)
putExtra(Mavericks.KEY_ARG, args)
}
}
}

View File

@ -17,7 +17,7 @@
package im.vector.app.features.home
import androidx.lifecycle.viewModelScope
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.MavericksViewModelFactory
import com.airbnb.mvrx.ViewModelContext
import dagger.assisted.Assisted
@ -72,7 +72,7 @@ class HomeActivityViewModel @AssistedInject constructor(
@JvmStatic
override fun create(viewModelContext: ViewModelContext, state: HomeActivityViewState): HomeActivityViewModel? {
val activity: HomeActivity = viewModelContext.activity()
val args: HomeActivityArgs? = activity.intent.getParcelableExtra(MvRx.KEY_ARG)
val args: HomeActivityArgs? = activity.intent.getParcelableExtra(Mavericks.KEY_ARG)
return activity.viewModelFactory.create(state, args ?: HomeActivityArgs(clearNotification = false, accountCreation = false))
}
}

View File

@ -61,7 +61,7 @@ import com.airbnb.epoxy.EpoxyModel
import com.airbnb.epoxy.OnModelBuildFinishedListener
import com.airbnb.epoxy.addGlidePreloader
import com.airbnb.epoxy.glidePreloader
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.args
import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.withState
@ -1582,7 +1582,7 @@ class RoomDetailFragment @Inject constructor(
val otherUserId = data.otherUserId ?: return
VerificationBottomSheet().apply {
arguments = Bundle().apply {
putParcelable(MvRx.KEY_ARG, VerificationBottomSheet.VerificationArgs(
putParcelable(Mavericks.KEY_ARG, VerificationBottomSheet.VerificationArgs(
otherUserId, data.transactionId, roomId = roomDetailArgs.roomId))
}
}.show(parentFragmentManager, "REQ")

View File

@ -21,7 +21,7 @@ import android.os.Parcelable
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.args
import im.vector.app.R
import im.vector.app.core.di.ScreenComponent
@ -88,7 +88,7 @@ class DisplayReadReceiptsBottomSheet :
val parcelableArgs = DisplayReadReceiptArgs(
readReceipts
)
args.putParcelable(MvRx.KEY_ARG, parcelableArgs)
args.putParcelable(Mavericks.KEY_ARG, parcelableArgs)
return DisplayReadReceiptsBottomSheet().apply { arguments = args }
}
}

View File

@ -20,7 +20,7 @@ import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.widget.SearchView
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import im.vector.app.R
import im.vector.app.core.di.ScreenComponent
import im.vector.app.core.extensions.addFragment
@ -49,7 +49,7 @@ class SearchActivity : VectorBaseActivity<ActivitySearchBinding>() {
override fun initUiAndData() {
if (isFirstCreation()) {
val fragmentArgs: SearchArgs = intent?.extras?.getParcelable(MvRx.KEY_ARG) ?: return
val fragmentArgs: SearchArgs = intent?.extras?.getParcelable(Mavericks.KEY_ARG) ?: return
addFragment(R.id.searchFragmentContainer, SearchFragment::class.java, fragmentArgs, FRAGMENT_TAG)
}
views.searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener {
@ -73,7 +73,7 @@ class SearchActivity : VectorBaseActivity<ActivitySearchBinding>() {
return Intent(context, SearchActivity::class.java).apply {
// If we do that we will have the same room two times on the stack. Let's allow infinite stack for the moment.
// flags = Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
putExtra(MvRx.KEY_ARG, args)
putExtra(Mavericks.KEY_ARG, args)
}
}
}

View File

@ -19,7 +19,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.withState
import im.vector.app.R
@ -79,7 +79,7 @@ class ViewEditHistoryBottomSheet:
roomId,
informationData
)
args.putParcelable(MvRx.KEY_ARG, parcelableArgs)
args.putParcelable(Mavericks.KEY_ARG, parcelableArgs)
return ViewEditHistoryBottomSheet().apply { arguments = args }
}
}

View File

@ -20,7 +20,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.withState
import im.vector.app.R
@ -93,7 +93,7 @@ class ViewReactionsBottomSheet :
roomId,
informationData
)
args.putParcelable(MvRx.KEY_ARG, parcelableArgs)
args.putParcelable(Mavericks.KEY_ARG, parcelableArgs)
return ViewReactionsBottomSheet().apply { arguments = args }
}
}

View File

@ -21,7 +21,7 @@ import android.content.Intent
import android.os.Bundle
import android.os.Parcelable
import android.view.View
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import im.vector.app.R
@ -165,7 +165,7 @@ class InviteUsersToRoomActivity : SimpleFragmentActivity(), UserListViewModel.Fa
fun getIntent(context: Context, roomId: String): Intent {
return Intent(context, InviteUsersToRoomActivity::class.java).also {
it.putExtra(MvRx.KEY_ARG, InviteUsersToRoomArgs(roomId))
it.putExtra(Mavericks.KEY_ARG, InviteUsersToRoomArgs(roomId))
}
}
}

View File

@ -24,7 +24,7 @@ import android.view.ViewGroup
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import com.airbnb.mvrx.Incomplete
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.withState
import com.google.android.material.dialog.MaterialAlertDialogBuilder
@ -134,7 +134,7 @@ class MatrixToBottomSheet :
fun withLink(matrixToLink: String, listener: InteractionListener?): MatrixToBottomSheet {
return MatrixToBottomSheet().apply {
arguments = Bundle().apply {
putParcelable(MvRx.KEY_ARG, MatrixToArgs(
putParcelable(Mavericks.KEY_ARG, MatrixToArgs(
matrixToLink = matrixToLink
))
}

View File

@ -19,7 +19,7 @@ package im.vector.app.features.pin
import android.content.Context
import android.content.Intent
import com.google.android.material.appbar.MaterialToolbar
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import im.vector.app.R
import im.vector.app.core.extensions.addFragment
import im.vector.app.core.platform.ToolbarConfigurable
@ -31,7 +31,7 @@ class PinActivity : VectorBaseActivity<ActivitySimpleBinding>(), ToolbarConfigur
companion object {
fun newIntent(context: Context, args: PinArgs): Intent {
return Intent(context, PinActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, args)
putExtra(Mavericks.KEY_ARG, args)
}
}
}
@ -42,7 +42,7 @@ class PinActivity : VectorBaseActivity<ActivitySimpleBinding>(), ToolbarConfigur
override fun initUiAndData() {
if (isFirstCreation()) {
val fragmentArgs: PinArgs = intent?.extras?.getParcelable(MvRx.KEY_ARG) ?: return
val fragmentArgs: PinArgs = intent?.extras?.getParcelable(Mavericks.KEY_ARG) ?: return
addFragment(R.id.simpleFragmentContainer, PinFragment::class.java, fragmentArgs)
}
}

View File

@ -21,7 +21,7 @@ import android.content.Context
import android.content.Intent
import android.widget.Toast
import com.google.android.material.appbar.MaterialToolbar
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import im.vector.app.R
import im.vector.app.core.di.ScreenComponent
@ -42,7 +42,7 @@ class RoomMemberProfileActivity :
companion object {
fun newIntent(context: Context, args: RoomMemberProfileArgs): Intent {
return Intent(context, RoomMemberProfileActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, args)
putExtra(Mavericks.KEY_ARG, args)
}
}
}
@ -66,7 +66,7 @@ class RoomMemberProfileActivity :
override fun initUiAndData() {
if (isFirstCreation()) {
val fragmentArgs: RoomMemberProfileArgs = intent?.extras?.getParcelable(MvRx.KEY_ARG) ?: return
val fragmentArgs: RoomMemberProfileArgs = intent?.extras?.getParcelable(Mavericks.KEY_ARG) ?: return
addFragment(R.id.simpleFragmentContainer, RoomMemberProfileFragment::class.java, fragmentArgs)
}

View File

@ -24,7 +24,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.withState
import im.vector.app.R
@ -122,7 +122,7 @@ class DeviceListBottomSheet :
companion object {
fun newInstance(userId: String, allowDeviceAction: Boolean = true): DeviceListBottomSheet {
val args = Bundle()
args.putParcelable(MvRx.KEY_ARG, Args(userId, allowDeviceAction))
args.putParcelable(Mavericks.KEY_ARG, Args(userId, allowDeviceAction))
return DeviceListBottomSheet().apply { arguments = args }
}
}

View File

@ -21,7 +21,7 @@ import android.content.Context
import android.content.Intent
import android.widget.Toast
import com.google.android.material.appbar.MaterialToolbar
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import im.vector.app.R
import im.vector.app.core.di.ScreenComponent
@ -60,7 +60,7 @@ class RoomProfileActivity :
fun newIntent(context: Context, roomId: String, directAccess: Int?): Intent {
val roomProfileArgs = RoomProfileArgs(roomId)
return Intent(context, RoomProfileActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, roomProfileArgs)
putExtra(Mavericks.KEY_ARG, roomProfileArgs)
putExtra(EXTRA_DIRECT_ACCESS, directAccess)
}
}
@ -91,7 +91,7 @@ class RoomProfileActivity :
override fun initUiAndData() {
sharedActionViewModel = viewModelProvider.get(RoomProfileSharedActionViewModel::class.java)
roomProfileArgs = intent?.extras?.getParcelable(MvRx.KEY_ARG) ?: return
roomProfileArgs = intent?.extras?.getParcelable(Mavericks.KEY_ARG) ?: return
if (isFirstCreation()) {
when (intent?.extras?.getInt(EXTRA_DIRECT_ACCESS, EXTRA_DIRECT_ACCESS_ROOM_ROOT)) {
EXTRA_DIRECT_ACCESS_ROOM_SETTINGS -> {

View File

@ -22,7 +22,7 @@ import android.os.Bundle
import androidx.core.view.isVisible
import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.Success
import com.airbnb.mvrx.Uninitialized
import com.airbnb.mvrx.viewModel
@ -66,7 +66,7 @@ class RoomJoinRuleActivity : VectorBaseActivity<ActivitySimpleBinding>(),
}
override fun initUiAndData() {
roomProfileArgs = intent?.extras?.getParcelable(MvRx.KEY_ARG) ?: return
roomProfileArgs = intent?.extras?.getParcelable(Mavericks.KEY_ARG) ?: return
if (isFirstCreation()) {
addFragment(
R.id.simpleFragmentContainer,
@ -142,7 +142,7 @@ class RoomJoinRuleActivity : VectorBaseActivity<ActivitySimpleBinding>(),
fun newIntent(context: Context, roomId: String): Intent {
val roomProfileArgs = RoomProfileArgs(roomId)
return Intent(context, RoomJoinRuleActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, roomProfileArgs)
putExtra(Mavericks.KEY_ARG, roomProfileArgs)
}
}
}

View File

@ -21,7 +21,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.view.isVisible
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.fragmentViewModel
import com.airbnb.mvrx.parentFragmentViewModel
import com.airbnb.mvrx.withState
@ -83,7 +83,7 @@ class DeviceVerificationInfoBottomSheet :
fun newInstance(userId: String, deviceId: String): DeviceVerificationInfoBottomSheet {
val args = Bundle()
val parcelableArgs = DeviceVerificationInfoArgs(userId, deviceId)
args.putParcelable(MvRx.KEY_ARG, parcelableArgs)
args.putParcelable(Mavericks.KEY_ARG, parcelableArgs)
return DeviceVerificationInfoBottomSheet().apply { arguments = args }
}
}

View File

@ -171,7 +171,7 @@ class SpaceCreationActivity : SimpleFragmentActivity(), CreateSpaceViewModel.Fac
fun newIntent(context: Context): Intent {
return Intent(context, SpaceCreationActivity::class.java).apply {
// putExtra(MvRx.KEY_ARG, SpaceDirectoryArgs(spaceId))
// putExtra(Mavericks.KEY_ARG, SpaceDirectoryArgs(spaceId))
}
}

View File

@ -21,7 +21,7 @@ import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import im.vector.app.R
import im.vector.app.core.di.ScreenComponent
@ -72,12 +72,12 @@ class SpaceExploreActivity : VectorBaseActivity<ActivitySimpleBinding>(), SpaceD
if (isFirstCreation()) {
val simpleName = SpaceDirectoryFragment::class.java.simpleName
val args = intent?.getParcelableExtra<SpaceDirectoryArgs>(MvRx.KEY_ARG)
val args = intent?.getParcelableExtra<SpaceDirectoryArgs>(Mavericks.KEY_ARG)
if (supportFragmentManager.findFragmentByTag(simpleName) == null) {
supportFragmentManager.commitTransaction {
replace(R.id.simpleFragmentContainer,
SpaceDirectoryFragment::class.java,
Bundle().apply { this.putParcelable(MvRx.KEY_ARG, args) },
Bundle().apply { this.putParcelable(Mavericks.KEY_ARG, args) },
simpleName
)
}
@ -107,7 +107,7 @@ class SpaceExploreActivity : VectorBaseActivity<ActivitySimpleBinding>(), SpaceD
companion object {
fun newIntent(context: Context, spaceId: String): Intent {
return Intent(context, SpaceExploreActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, SpaceDirectoryArgs(spaceId))
putExtra(Mavericks.KEY_ARG, SpaceDirectoryArgs(spaceId))
}
}
}

View File

@ -19,7 +19,7 @@ package im.vector.app.features.spaces
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import im.vector.app.R
import im.vector.app.core.extensions.commitTransaction
import im.vector.app.core.platform.VectorBaseActivity
@ -50,12 +50,12 @@ class SpacePreviewActivity : VectorBaseActivity<ActivitySimpleBinding>() {
if (isFirstCreation()) {
val simpleName = SpacePreviewFragment::class.java.simpleName
val args = intent?.getParcelableExtra<SpacePreviewArgs>(MvRx.KEY_ARG)
val args = intent?.getParcelableExtra<SpacePreviewArgs>(Mavericks.KEY_ARG)
if (supportFragmentManager.findFragmentByTag(simpleName) == null) {
supportFragmentManager.commitTransaction {
replace(R.id.simpleFragmentContainer,
SpacePreviewFragment::class.java,
Bundle().apply { this.putParcelable(MvRx.KEY_ARG, args) },
Bundle().apply { this.putParcelable(Mavericks.KEY_ARG, args) },
simpleName
)
}
@ -66,7 +66,7 @@ class SpacePreviewActivity : VectorBaseActivity<ActivitySimpleBinding>() {
companion object {
fun newIntent(context: Context, spaceIdOrAlias: String): Intent {
return Intent(context, SpacePreviewActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, SpacePreviewArgs(spaceIdOrAlias))
putExtra(Mavericks.KEY_ARG, SpacePreviewArgs(spaceIdOrAlias))
}
}
}

View File

@ -23,7 +23,7 @@ import androidx.core.view.isGone
import androidx.core.view.isVisible
import com.airbnb.mvrx.Fail
import com.airbnb.mvrx.Loading
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.Success
import com.airbnb.mvrx.viewModel
import com.google.android.material.appbar.MaterialToolbar
@ -74,7 +74,7 @@ class SpaceLeaveAdvancedActivity : VectorBaseActivity<ActivitySimpleLoadingBindi
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val args = intent?.getParcelableExtra<SpaceBottomSheetSettingsArgs>(MvRx.KEY_ARG)
val args = intent?.getParcelableExtra<SpaceBottomSheetSettingsArgs>(Mavericks.KEY_ARG)
if (isFirstCreation()) {
val simpleName = SpaceLeaveAdvancedFragment::class.java.simpleName
@ -83,7 +83,7 @@ class SpaceLeaveAdvancedActivity : VectorBaseActivity<ActivitySimpleLoadingBindi
replace(
R.id.simpleFragmentContainer,
SpaceLeaveAdvancedFragment::class.java,
Bundle().apply { this.putParcelable(MvRx.KEY_ARG, args) },
Bundle().apply { this.putParcelable(Mavericks.KEY_ARG, args) },
simpleName
)
}
@ -123,7 +123,7 @@ class SpaceLeaveAdvancedActivity : VectorBaseActivity<ActivitySimpleLoadingBindi
companion object {
fun newIntent(context: Context, spaceId: String): Intent {
return Intent(context, SpaceLeaveAdvancedActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, SpaceBottomSheetSettingsArgs(spaceId))
putExtra(Mavericks.KEY_ARG, SpaceBottomSheetSettingsArgs(spaceId))
}
}
}

View File

@ -22,7 +22,7 @@ import android.os.Bundle
import android.os.Parcelable
import androidx.core.view.isGone
import androidx.core.view.isVisible
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import com.airbnb.mvrx.withState
import com.google.android.material.appbar.MaterialToolbar
@ -95,7 +95,7 @@ class SpaceManageActivity : VectorBaseActivity<ActivitySimpleLoadingBinding>(),
}
.disposeOnDestroy()
val args = intent?.getParcelableExtra<SpaceManageArgs>(MvRx.KEY_ARG)
val args = intent?.getParcelableExtra<SpaceManageArgs>(Mavericks.KEY_ARG)
if (isFirstCreation()) {
withState(sharedViewModel) {
when (it.manageType) {
@ -106,7 +106,7 @@ class SpaceManageActivity : VectorBaseActivity<ActivitySimpleLoadingBinding>(),
supportFragmentManager.commitTransaction {
replace(R.id.simpleFragmentContainer,
SpaceAddRoomFragment::class.java,
Bundle().apply { this.putParcelable(MvRx.KEY_ARG, args) },
Bundle().apply { this.putParcelable(Mavericks.KEY_ARG, args) },
simpleName
)
}
@ -118,7 +118,7 @@ class SpaceManageActivity : VectorBaseActivity<ActivitySimpleLoadingBinding>(),
supportFragmentManager.commitTransaction {
replace(R.id.simpleFragmentContainer,
SpaceSettingsFragment::class.java,
Bundle().apply { this.putParcelable(MvRx.KEY_ARG, RoomProfileArgs(args.spaceId)) },
Bundle().apply { this.putParcelable(Mavericks.KEY_ARG, RoomProfileArgs(args.spaceId)) },
simpleName
)
}
@ -189,7 +189,7 @@ class SpaceManageActivity : VectorBaseActivity<ActivitySimpleLoadingBinding>(),
companion object {
fun newIntent(context: Context, spaceId: String, manageType: ManageType): Intent {
return Intent(context, SpaceManageActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, SpaceManageArgs(spaceId, manageType))
putExtra(Mavericks.KEY_ARG, SpaceManageArgs(spaceId, manageType))
}
}
}

View File

@ -21,7 +21,7 @@ import android.content.Intent
import android.os.Bundle
import androidx.core.view.isGone
import androidx.core.view.isVisible
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import im.vector.app.R
import im.vector.app.core.extensions.commitTransaction
import im.vector.app.core.extensions.hideKeyboard
@ -57,14 +57,14 @@ class SpacePeopleActivity : VectorBaseActivity<ActivitySimpleLoadingBinding>() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val args = intent?.getParcelableExtra<GenericIdArgs>(MvRx.KEY_ARG)
val args = intent?.getParcelableExtra<GenericIdArgs>(Mavericks.KEY_ARG)
if (isFirstCreation()) {
val simpleName = SpacePeopleFragment::class.java.simpleName
if (supportFragmentManager.findFragmentByTag(simpleName) == null) {
supportFragmentManager.commitTransaction {
replace(R.id.simpleFragmentContainer,
SpacePeopleFragment::class.java,
Bundle().apply { this.putParcelable(MvRx.KEY_ARG, args) },
Bundle().apply { this.putParcelable(Mavericks.KEY_ARG, args) },
simpleName
)
}
@ -97,7 +97,7 @@ class SpacePeopleActivity : VectorBaseActivity<ActivitySimpleLoadingBinding>() {
companion object {
fun newIntent(context: Context, spaceId: String): Intent {
return Intent(context, SpacePeopleActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, GenericIdArgs(spaceId))
putExtra(Mavericks.KEY_ARG, GenericIdArgs(spaceId))
}
}
}

View File

@ -24,7 +24,7 @@ import android.widget.Toast
import androidx.core.app.ActivityCompat
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import com.airbnb.mvrx.withState
import im.vector.app.R
@ -128,7 +128,7 @@ class UserCodeActivity : VectorBaseActivity<ActivitySimpleBinding>(),
companion object {
fun newIntent(context: Context, userId: String): Intent {
return Intent(context, UserCodeActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, Args(userId))
putExtra(Mavericks.KEY_ARG, Args(userId))
}
}
}

View File

@ -20,7 +20,7 @@ import android.app.Activity
import android.content.Context
import android.content.Intent
import androidx.core.view.isVisible
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.viewModel
import com.google.android.material.appbar.MaterialToolbar
import im.vector.app.R
@ -50,7 +50,7 @@ class WidgetActivity : VectorBaseActivity<ActivityWidgetBinding>(),
fun newIntent(context: Context, args: WidgetArgs): Intent {
return Intent(context, WidgetActivity::class.java).apply {
putExtra(MvRx.KEY_ARG, args)
putExtra(Mavericks.KEY_ARG, args)
}
}
@ -83,7 +83,7 @@ class WidgetActivity : VectorBaseActivity<ActivityWidgetBinding>(),
}
override fun initUiAndData() {
val widgetArgs: WidgetArgs? = intent?.extras?.getParcelable(MvRx.KEY_ARG)
val widgetArgs: WidgetArgs? = intent?.extras?.getParcelable(Mavericks.KEY_ARG)
if (widgetArgs == null) {
finish()
return

View File

@ -23,7 +23,7 @@ import android.text.style.BulletSpan
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.airbnb.mvrx.MvRx
import com.airbnb.mvrx.Mavericks
import com.airbnb.mvrx.activityViewModel
import com.airbnb.mvrx.withState
import im.vector.app.R
@ -116,7 +116,7 @@ class RoomWidgetPermissionBottomSheet :
companion object {
fun newInstance(widgetArgs: WidgetArgs) = RoomWidgetPermissionBottomSheet().withArgs {
putParcelable(MvRx.KEY_ARG, widgetArgs)
putParcelable(Mavericks.KEY_ARG, widgetArgs)
}
}
}