onActivityCreated() is deprecated (not tested)
This commit is contained in:
parent
7e3acaa987
commit
32434703d8
@ -19,6 +19,7 @@ import android.app.Activity
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.Editable
|
import android.text.Editable
|
||||||
|
import android.view.View
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import android.widget.EditText
|
import android.widget.EditText
|
||||||
import androidx.lifecycle.Observer
|
import androidx.lifecycle.Observer
|
||||||
@ -50,8 +51,8 @@ class KeysBackupRestoreFromKeyFragment @Inject constructor()
|
|||||||
@BindView(R.id.keys_restore_key_enter_edittext)
|
@BindView(R.id.keys_restore_key_enter_edittext)
|
||||||
lateinit var mKeyTextEdit: EditText
|
lateinit var mKeyTextEdit: EditText
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
viewModel = fragmentViewModelProvider.get(KeysBackupRestoreFromKeyViewModel::class.java)
|
viewModel = fragmentViewModelProvider.get(KeysBackupRestoreFromKeyViewModel::class.java)
|
||||||
sharedViewModel = activityViewModelProvider.get(KeysBackupRestoreSharedViewModel::class.java)
|
sharedViewModel = activityViewModelProvider.get(KeysBackupRestoreSharedViewModel::class.java)
|
||||||
mKeyTextEdit.setText(viewModel.recoveryCode.value)
|
mKeyTextEdit.setText(viewModel.recoveryCode.value)
|
||||||
|
@ -59,8 +59,8 @@ class KeysBackupRestoreFromPassphraseFragment @Inject constructor() : VectorBase
|
|||||||
viewModel.showPasswordMode.value = !(viewModel.showPasswordMode.value ?: false)
|
viewModel.showPasswordMode.value = !(viewModel.showPasswordMode.value ?: false)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
viewModel = fragmentViewModelProvider.get(KeysBackupRestoreFromPassphraseViewModel::class.java)
|
viewModel = fragmentViewModelProvider.get(KeysBackupRestoreFromPassphraseViewModel::class.java)
|
||||||
sharedViewModel = activityViewModelProvider.get(KeysBackupRestoreSharedViewModel::class.java)
|
sharedViewModel = activityViewModelProvider.get(KeysBackupRestoreSharedViewModel::class.java)
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
package im.vector.app.features.crypto.keysbackup.restore
|
package im.vector.app.features.crypto.keysbackup.restore
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import butterknife.BindView
|
import butterknife.BindView
|
||||||
@ -36,8 +37,8 @@ class KeysBackupRestoreSuccessFragment @Inject constructor() : VectorBaseFragmen
|
|||||||
|
|
||||||
private lateinit var sharedViewModel: KeysBackupRestoreSharedViewModel
|
private lateinit var sharedViewModel: KeysBackupRestoreSharedViewModel
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
sharedViewModel = activityViewModelProvider.get(KeysBackupRestoreSharedViewModel::class.java)
|
sharedViewModel = activityViewModelProvider.get(KeysBackupRestoreSharedViewModel::class.java)
|
||||||
|
|
||||||
if (compareValues(sharedViewModel.importKeyResult?.totalNumberOfKeys, 0) > 0) {
|
if (compareValues(sharedViewModel.importKeyResult?.totalNumberOfKeys, 0) > 0) {
|
||||||
|
@ -40,8 +40,8 @@ class KeysBackupSetupStep1Fragment @Inject constructor() : VectorBaseFragment()
|
|||||||
@BindView(R.id.keys_backup_setup_step1_manualExport)
|
@BindView(R.id.keys_backup_setup_step1_manualExport)
|
||||||
lateinit var manualExportButton: Button
|
lateinit var manualExportButton: Button
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
viewModel = activityViewModelProvider.get(KeysBackupSetupSharedViewModel::class.java)
|
viewModel = activityViewModelProvider.get(KeysBackupSetupSharedViewModel::class.java)
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
package im.vector.app.features.crypto.keysbackup.setup
|
package im.vector.app.features.crypto.keysbackup.setup
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import android.widget.EditText
|
import android.widget.EditText
|
||||||
@ -77,8 +78,8 @@ class KeysBackupSetupStep2Fragment @Inject constructor() : VectorBaseFragment()
|
|||||||
|
|
||||||
private lateinit var viewModel: KeysBackupSetupSharedViewModel
|
private lateinit var viewModel: KeysBackupSetupSharedViewModel
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
viewModel = activityViewModelProvider.get(KeysBackupSetupSharedViewModel::class.java)
|
viewModel = activityViewModelProvider.get(KeysBackupSetupSharedViewModel::class.java)
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@ class KeysBackupSetupStep3Fragment @Inject constructor() : VectorBaseFragment()
|
|||||||
|
|
||||||
private lateinit var viewModel: KeysBackupSetupSharedViewModel
|
private lateinit var viewModel: KeysBackupSetupSharedViewModel
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
viewModel = activityViewModelProvider.get(KeysBackupSetupSharedViewModel::class.java)
|
viewModel = activityViewModelProvider.get(KeysBackupSetupSharedViewModel::class.java)
|
||||||
|
|
||||||
viewModel.shouldPromptOnBack = false
|
viewModel.shouldPromptOnBack = false
|
||||||
|
@ -371,6 +371,10 @@ class RoomDetailFragment @Inject constructor(
|
|||||||
is RoomDetailViewEvents.RequestNativeWidgetPermission -> requestNativeWidgetPermission(it)
|
is RoomDetailViewEvents.RequestNativeWidgetPermission -> requestNativeWidgetPermission(it)
|
||||||
}.exhaustive
|
}.exhaustive
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(savedInstanceState == null) {
|
||||||
|
handleShareData()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun requestNativeWidgetPermission(it: RoomDetailViewEvents.RequestNativeWidgetPermission) {
|
private fun requestNativeWidgetPermission(it: RoomDetailViewEvents.RequestNativeWidgetPermission) {
|
||||||
@ -480,20 +484,17 @@ class RoomDetailFragment @Inject constructor(
|
|||||||
navigator.openRoom(vectorBaseActivity, action.roomId)
|
navigator.openRoom(vectorBaseActivity, action.roomId)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
private fun handleShareData() {
|
||||||
super.onActivityCreated(savedInstanceState)
|
when (val sharedData = roomDetailArgs.sharedData) {
|
||||||
if (savedInstanceState == null) {
|
is SharedData.Text -> {
|
||||||
when (val sharedData = roomDetailArgs.sharedData) {
|
roomDetailViewModel.handle(RoomDetailAction.EnterRegularMode(sharedData.text, fromSharing = true))
|
||||||
is SharedData.Text -> {
|
}
|
||||||
roomDetailViewModel.handle(RoomDetailAction.EnterRegularMode(sharedData.text, fromSharing = true))
|
is SharedData.Attachments -> {
|
||||||
}
|
// open share edition
|
||||||
is SharedData.Attachments -> {
|
onContentAttachmentsReady(sharedData.attachmentData)
|
||||||
// open share edition
|
}
|
||||||
onContentAttachmentsReady(sharedData.attachmentData)
|
null -> Timber.v("No share data to process")
|
||||||
}
|
}.exhaustive
|
||||||
null -> Timber.v("No share data to process")
|
|
||||||
}.exhaustive
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
|
@ -18,6 +18,7 @@ package im.vector.app.features.home.room.detail.readreceipts
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
|
import android.view.View
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import butterknife.BindView
|
import butterknife.BindView
|
||||||
import com.airbnb.mvrx.MvRx
|
import com.airbnb.mvrx.MvRx
|
||||||
@ -59,8 +60,8 @@ class DisplayReadReceiptsBottomSheet : VectorBaseBottomSheetDialogFragment(), Di
|
|||||||
|
|
||||||
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list_with_title
|
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list_with_title
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
sharedActionViewModel = activityViewModelProvider.get(MessageSharedActionViewModel::class.java)
|
sharedActionViewModel = activityViewModelProvider.get(MessageSharedActionViewModel::class.java)
|
||||||
recyclerView.configureWith(epoxyController, hasFixedSize = false)
|
recyclerView.configureWith(epoxyController, hasFixedSize = false)
|
||||||
bottomSheetTitle.text = getString(R.string.seen_by)
|
bottomSheetTitle.text = getString(R.string.seen_by)
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
package im.vector.app.features.home.room.detail.timeline.action
|
package im.vector.app.features.home.room.detail.timeline.action
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import butterknife.BindView
|
import butterknife.BindView
|
||||||
import com.airbnb.mvrx.fragmentViewModel
|
import com.airbnb.mvrx.fragmentViewModel
|
||||||
@ -51,8 +52,8 @@ class MessageActionsBottomSheet : VectorBaseBottomSheetDialogFragment(), Message
|
|||||||
|
|
||||||
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list
|
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
sharedActionViewModel = activityViewModelProvider.get(MessageSharedActionViewModel::class.java)
|
sharedActionViewModel = activityViewModelProvider.get(MessageSharedActionViewModel::class.java)
|
||||||
recyclerView.configureWith(messageActionsEpoxyController, hasFixedSize = false, disableItemAnimation = true)
|
recyclerView.configureWith(messageActionsEpoxyController, hasFixedSize = false, disableItemAnimation = true)
|
||||||
messageActionsEpoxyController.listener = this
|
messageActionsEpoxyController.listener = this
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
package im.vector.app.features.home.room.detail.timeline.edithistory
|
package im.vector.app.features.home.room.detail.timeline.edithistory
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import butterknife.BindView
|
import butterknife.BindView
|
||||||
import com.airbnb.mvrx.MvRx
|
import com.airbnb.mvrx.MvRx
|
||||||
@ -55,8 +56,8 @@ class ViewEditHistoryBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
|||||||
|
|
||||||
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list_with_title
|
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list_with_title
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
recyclerView.configureWith(
|
recyclerView.configureWith(
|
||||||
epoxyController,
|
epoxyController,
|
||||||
showDivider = true,
|
showDivider = true,
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package im.vector.app.features.home.room.detail.timeline.reactions
|
package im.vector.app.features.home.room.detail.timeline.reactions
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import butterknife.BindView
|
import butterknife.BindView
|
||||||
import com.airbnb.mvrx.MvRx
|
import com.airbnb.mvrx.MvRx
|
||||||
@ -55,8 +56,8 @@ class ViewReactionsBottomSheet : VectorBaseBottomSheetDialogFragment(), ViewReac
|
|||||||
|
|
||||||
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list_with_title
|
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list_with_title
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
sharedActionViewModel = activityViewModelProvider.get(MessageSharedActionViewModel::class.java)
|
sharedActionViewModel = activityViewModelProvider.get(MessageSharedActionViewModel::class.java)
|
||||||
recyclerView.configureWith(epoxyController, hasFixedSize = false, showDivider = true)
|
recyclerView.configureWith(epoxyController, hasFixedSize = false, showDivider = true)
|
||||||
bottomSheetTitle.text = context?.getString(R.string.reactions)
|
bottomSheetTitle.text = context?.getString(R.string.reactions)
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package im.vector.app.features.home.room.detail.widget
|
package im.vector.app.features.home.room.detail.widget
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import butterknife.BindView
|
import butterknife.BindView
|
||||||
import com.airbnb.mvrx.parentFragmentViewModel
|
import com.airbnb.mvrx.parentFragmentViewModel
|
||||||
@ -55,8 +56,8 @@ class RoomWidgetsBottomSheet : VectorBaseBottomSheetDialogFragment(), RoomWidget
|
|||||||
|
|
||||||
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list_with_title
|
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list_with_title
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
recyclerView.configureWith(epoxyController, hasFixedSize = false)
|
recyclerView.configureWith(epoxyController, hasFixedSize = false)
|
||||||
bottomSheetTitle.text = getString(R.string.active_widgets_title)
|
bottomSheetTitle.text = getString(R.string.active_widgets_title)
|
||||||
bottomSheetTitle.textSize = 20f
|
bottomSheetTitle.textSize = 20f
|
||||||
|
@ -18,6 +18,7 @@ package im.vector.app.features.home.room.list.actions
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
|
import android.view.View
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import butterknife.BindView
|
import butterknife.BindView
|
||||||
import com.airbnb.mvrx.fragmentViewModel
|
import com.airbnb.mvrx.fragmentViewModel
|
||||||
@ -67,8 +68,8 @@ class RoomListQuickActionsBottomSheet : VectorBaseBottomSheetDialogFragment(), R
|
|||||||
|
|
||||||
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list
|
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
sharedActionViewModel = activityViewModelProvider.get(RoomListQuickActionsSharedActionViewModel::class.java)
|
sharedActionViewModel = activityViewModelProvider.get(RoomListQuickActionsSharedActionViewModel::class.java)
|
||||||
recyclerView.configureWith(roomListActionsEpoxyController, viewPool = sharedViewPool, hasFixedSize = false, disableItemAnimation = true)
|
recyclerView.configureWith(roomListActionsEpoxyController, viewPool = sharedViewPool, hasFixedSize = false, disableItemAnimation = true)
|
||||||
roomListActionsEpoxyController.listener = this
|
roomListActionsEpoxyController.listener = this
|
||||||
|
@ -20,6 +20,7 @@ import android.content.DialogInterface
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import android.view.KeyEvent
|
import android.view.KeyEvent
|
||||||
|
import android.view.View
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import com.airbnb.mvrx.MvRx
|
import com.airbnb.mvrx.MvRx
|
||||||
import com.airbnb.mvrx.fragmentViewModel
|
import com.airbnb.mvrx.fragmentViewModel
|
||||||
@ -46,8 +47,8 @@ class DeviceListBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
|||||||
injector.inject(this)
|
injector.inject(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
viewModel.observeViewEvents {
|
viewModel.observeViewEvents {
|
||||||
when (it) {
|
when (it) {
|
||||||
is DeviceListBottomSheetViewEvents.Verify -> {
|
is DeviceListBottomSheetViewEvents.Verify -> {
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package im.vector.app.features.roommemberprofile.devices
|
package im.vector.app.features.roommemberprofile.devices
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import butterknife.BindView
|
import butterknife.BindView
|
||||||
import com.airbnb.mvrx.parentFragmentViewModel
|
import com.airbnb.mvrx.parentFragmentViewModel
|
||||||
@ -41,8 +42,8 @@ class DeviceListFragment @Inject constructor(
|
|||||||
@BindView(R.id.bottomSheetRecyclerView)
|
@BindView(R.id.bottomSheetRecyclerView)
|
||||||
lateinit var recyclerView: RecyclerView
|
lateinit var recyclerView: RecyclerView
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
recyclerView.setPadding(0, dimensionConverter.dpToPx(16), 0, dimensionConverter.dpToPx(16))
|
recyclerView.setPadding(0, dimensionConverter.dpToPx(16), 0, dimensionConverter.dpToPx(16))
|
||||||
recyclerView.configureWith(
|
recyclerView.configureWith(
|
||||||
epoxyController,
|
epoxyController,
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package im.vector.app.features.roommemberprofile.devices
|
package im.vector.app.features.roommemberprofile.devices
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import butterknife.BindView
|
import butterknife.BindView
|
||||||
import com.airbnb.mvrx.parentFragmentViewModel
|
import com.airbnb.mvrx.parentFragmentViewModel
|
||||||
@ -41,8 +42,8 @@ class DeviceTrustInfoActionFragment @Inject constructor(
|
|||||||
@BindView(R.id.bottomSheetRecyclerView)
|
@BindView(R.id.bottomSheetRecyclerView)
|
||||||
lateinit var recyclerView: RecyclerView
|
lateinit var recyclerView: RecyclerView
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
recyclerView.setPadding(0, dimensionConverter.dpToPx(16), 0, dimensionConverter.dpToPx(16))
|
recyclerView.setPadding(0, dimensionConverter.dpToPx(16), 0, dimensionConverter.dpToPx(16))
|
||||||
recyclerView.configureWith(
|
recyclerView.configureWith(
|
||||||
epoxyController,
|
epoxyController,
|
||||||
|
@ -41,8 +41,9 @@ class CrossSigningSettingsFragment @Inject constructor(
|
|||||||
|
|
||||||
private val viewModel: CrossSigningSettingsViewModel by fragmentViewModel()
|
private val viewModel: CrossSigningSettingsViewModel by fragmentViewModel()
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
setupRecyclerView()
|
||||||
viewModel.observeViewEvents {
|
viewModel.observeViewEvents {
|
||||||
when (it) {
|
when (it) {
|
||||||
is CrossSigningSettingsViewEvents.Failure -> {
|
is CrossSigningSettingsViewEvents.Failure -> {
|
||||||
@ -62,11 +63,6 @@ class CrossSigningSettingsFragment @Inject constructor(
|
|||||||
(activity as? VectorBaseActivity)?.supportActionBar?.setTitle(R.string.encryption_information_cross_signing_state)
|
(activity as? VectorBaseActivity)?.supportActionBar?.setTitle(R.string.encryption_information_cross_signing_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
|
||||||
super.onViewCreated(view, savedInstanceState)
|
|
||||||
setupRecyclerView()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun invalidate() = withState(viewModel) { state ->
|
override fun invalidate() = withState(viewModel) { state ->
|
||||||
controller.setData(state)
|
controller.setData(state)
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ package im.vector.app.features.settings.devices
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
|
import android.view.View
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import butterknife.BindView
|
import butterknife.BindView
|
||||||
@ -58,8 +59,8 @@ class DeviceVerificationInfoBottomSheet : VectorBaseBottomSheetDialogFragment(),
|
|||||||
|
|
||||||
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list_with_title
|
override fun getLayoutResId() = R.layout.bottom_sheet_generic_list_with_title
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
recyclerView.configureWith(
|
recyclerView.configureWith(
|
||||||
controller,
|
controller,
|
||||||
showDivider = false,
|
showDivider = false,
|
||||||
|
@ -104,8 +104,8 @@ class SignOutBottomSheetDialogFragment : VectorBaseBottomSheetDialogFragment(),
|
|||||||
viewModel.refreshRemoteStateIfNeeded()
|
viewModel.refreshRemoteStateIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
setupRecoveryButton.action = {
|
setupRecoveryButton.action = {
|
||||||
BootstrapBottomSheet.show(parentFragmentManager, SetupMode.NORMAL)
|
BootstrapBottomSheet.show(parentFragmentManager, SetupMode.NORMAL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user