mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Fix test + lint
This commit is contained in:
parent
a8b5a5227f
commit
bcd86977d2
3 changed files with 4 additions and 3 deletions
|
@ -310,7 +310,10 @@ class UiAllScreensSanityTest {
|
|||
clickOn(R.id.createChatRoomButton)
|
||||
|
||||
withIdlingResource(activityIdlingResource(CreateDirectRoomActivity::class.java)) {
|
||||
assertDisplayed(R.id.addByMatrixId)
|
||||
onView(withId(R.id.userListRecyclerView))
|
||||
.perform(waitForView(withText(R.string.qr_code)))
|
||||
onView(withId(R.id.userListRecyclerView))
|
||||
.perform(waitForView(withText(R.string.invite_friends)))
|
||||
}
|
||||
|
||||
closeSoftKeyboard()
|
||||
|
|
|
@ -47,7 +47,6 @@ class UserCodeSharedViewModel @AssistedInject constructor(
|
|||
|
||||
companion object : MvRxViewModelFactory<UserCodeSharedViewModel, UserCodeState> {
|
||||
override fun create(viewModelContext: ViewModelContext, state: UserCodeState): UserCodeSharedViewModel? {
|
||||
val args = viewModelContext.args<UserCodeActivity.Args>()
|
||||
val factory = when (viewModelContext) {
|
||||
is FragmentViewModelContext -> viewModelContext.fragment as? Factory
|
||||
is ActivityViewModelContext -> viewModelContext.activity as? Factory
|
||||
|
|
|
@ -63,7 +63,6 @@ class UserListViewModel @AssistedInject constructor(@Assisted initialState: User
|
|||
is FragmentViewModelContext -> viewModelContext.fragment as? Factory
|
||||
is ActivityViewModelContext -> viewModelContext.activity as? Factory
|
||||
}
|
||||
val args = viewModelContext.args<UserListFragmentArgs>()
|
||||
return factory?.create(state) ?: error("You should let your activity/fragment implements Factory interface")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue