Finish the work
This commit is contained in:
parent
219d1383e5
commit
96e610970a
@ -58,8 +58,4 @@ class KeysBackupRestoreSuccessFragment @Inject constructor() : VectorBaseFragmen
|
||||
fun onDone() {
|
||||
sharedViewModel.importRoomKeysFinishWithResult.value = LiveEvent(sharedViewModel.importKeyResult!!)
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance() = KeysBackupRestoreSuccessFragment()
|
||||
}
|
||||
}
|
||||
|
@ -29,11 +29,7 @@ import im.vector.riotx.core.platform.VectorBaseFragment
|
||||
import im.vector.riotx.core.utils.LiveEvent
|
||||
import javax.inject.Inject
|
||||
|
||||
class KeysBackupSetupStep1Fragment @Inject constructor(): VectorBaseFragment() {
|
||||
|
||||
companion object {
|
||||
fun newInstance() = KeysBackupSetupStep1Fragment()
|
||||
}
|
||||
class KeysBackupSetupStep1Fragment @Inject constructor() : VectorBaseFragment() {
|
||||
|
||||
override fun getLayoutResId() = R.layout.fragment_keys_backup_setup_step1
|
||||
|
||||
@ -52,7 +48,7 @@ class KeysBackupSetupStep1Fragment @Inject constructor(): VectorBaseFragment() {
|
||||
ViewModelProviders.of(this, viewModelFactory).get(KeysBackupSetupSharedViewModel::class.java)
|
||||
} ?: throw Exception("Invalid Activity")
|
||||
|
||||
viewModel.showManualExport.observe(this, Observer {
|
||||
viewModel.showManualExport.observe(viewLifecycleOwner, Observer {
|
||||
val showOption = it ?: false
|
||||
// Can't use isVisible because the kotlin compiler will crash with Back-end (JVM) Internal error: wrong code generated
|
||||
advancedOptionText.visibility = if (showOption) View.VISIBLE else View.GONE
|
||||
|
@ -40,7 +40,7 @@ import kotlinx.android.synthetic.main.fragment_create_direct_room.*
|
||||
import javax.inject.Inject
|
||||
|
||||
class CreateDirectRoomKnownUsersFragment @Inject constructor(
|
||||
private val directRoomController: KnownUsersController,
|
||||
private val knownUsersController: KnownUsersController,
|
||||
private val dimensionConverter: DimensionConverter
|
||||
) : VectorBaseFragment(), KnownUsersController.Callback {
|
||||
|
||||
@ -97,8 +97,8 @@ class CreateDirectRoomKnownUsersFragment @Inject constructor(
|
||||
recyclerView.setHasFixedSize(true)
|
||||
// Don't activate animation as we might have way to much item animation when filtering
|
||||
recyclerView.itemAnimator = null
|
||||
directRoomController.callback = this
|
||||
recyclerView.setController(directRoomController)
|
||||
knownUsersController.callback = this
|
||||
recyclerView.setController(knownUsersController)
|
||||
}
|
||||
|
||||
private fun setupFilterView() {
|
||||
@ -127,7 +127,7 @@ class CreateDirectRoomKnownUsersFragment @Inject constructor(
|
||||
}
|
||||
|
||||
override fun invalidate() = withState(viewModel) {
|
||||
directRoomController.setData(it)
|
||||
knownUsersController.setData(it)
|
||||
}
|
||||
|
||||
private fun updateChipsView(data: SelectUserAction) {
|
||||
|
@ -20,12 +20,9 @@ import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import im.vector.riotx.R
|
||||
import im.vector.riotx.core.platform.VectorBaseFragment
|
||||
import javax.inject.Inject
|
||||
|
||||
class EmojiChooserFragment : VectorBaseFragment() {
|
||||
|
||||
companion object {
|
||||
fun newInstance() = EmojiChooserFragment()
|
||||
}
|
||||
class EmojiChooserFragment @Inject constructor() : VectorBaseFragment() {
|
||||
|
||||
override fun getLayoutResId() = R.layout.emoji_chooser_fragment
|
||||
|
||||
|
@ -23,6 +23,7 @@ import androidx.preference.PreferenceFragmentCompat
|
||||
import im.vector.matrix.android.api.session.Session
|
||||
import im.vector.riotx.R
|
||||
import im.vector.riotx.core.di.ScreenComponent
|
||||
import im.vector.riotx.core.extensions.replaceFragment
|
||||
import im.vector.riotx.core.platform.VectorBaseActivity
|
||||
import kotlinx.android.synthetic.main.activity_vector_settings.*
|
||||
import timber.log.Timber
|
||||
@ -52,11 +53,8 @@ class VectorSettingsActivity : VectorBaseActivity(),
|
||||
configureToolbar(settingsToolbar)
|
||||
|
||||
if (isFirstCreation()) {
|
||||
val vectorSettingsPreferencesFragment = VectorSettingsRootFragment.newInstance()
|
||||
// display the fragment
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.vector_settings_page, vectorSettingsPreferencesFragment, FRAGMENT_TAG)
|
||||
.commit()
|
||||
replaceFragment(R.id.vector_settings_page, VectorSettingsRootFragment::class.java, null, FRAGMENT_TAG)
|
||||
}
|
||||
|
||||
supportFragmentManager.addOnBackStackChangedListener(this)
|
||||
|
@ -17,9 +17,9 @@
|
||||
package im.vector.riotx.features.settings
|
||||
|
||||
import im.vector.riotx.R
|
||||
import im.vector.riotx.core.extensions.withArgs
|
||||
import javax.inject.Inject
|
||||
|
||||
class VectorSettingsRootFragment : VectorSettingsBaseFragment() {
|
||||
class VectorSettingsRootFragment @Inject constructor() : VectorSettingsBaseFragment() {
|
||||
|
||||
override var titleRes: Int = R.string.title_activity_settings
|
||||
override val preferenceXmlRes = R.xml.vector_settings_root
|
||||
@ -27,11 +27,4 @@ class VectorSettingsRootFragment : VectorSettingsBaseFragment() {
|
||||
override fun bindPref() {
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance() = VectorSettingsRootFragment()
|
||||
.withArgs {
|
||||
// putString(ARG_MATRIX_ID, matrixId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/syncStateView" />
|
||||
|
||||
<FrameLayout
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/roomListContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user