Commit 6155f941 authored by Valere's avatar Valere

Cleaning

parent 87e18b75
......@@ -18,7 +18,6 @@
package im.vector.activity
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.graphics.Color
......@@ -27,13 +26,9 @@ import androidx.core.content.ContextCompat
import androidx.lifecycle.Observer
import com.airbnb.mvrx.viewModel
import im.vector.R
import im.vector.activity.util.TERMS_REQUEST_CODE
import im.vector.contacts.ContactsManager
import im.vector.fragments.roomwidgets.*
import im.vector.ui.themes.ThemeUtils
import im.vector.widgets.Widget
import org.matrix.androidsdk.core.callback.ApiCallback
import org.matrix.androidsdk.features.terms.TermsManager
/*
* This class displays a widget
......@@ -62,7 +57,7 @@ class WidgetActivity : VectorAppCompatActivity() {
viewModel.selectSubscribe(this, RoomWidgetViewModelState::status) { ws ->
when (ws) {
WidgetState.UNKWNOWN -> {
WidgetState.UNKNOWN -> {
}
WidgetState.WIDGET_NOT_ALLOWED -> {
val dFrag = supportFragmentManager.findFragmentByTag(FRAGMENT_TAG_PERMISSION) as? RoomWidgetPermissionBottomSheet
......
......@@ -180,7 +180,7 @@ class RoomWidgetFragment : VectorBaseMvRxFragment(), HandleBackParticipant {
override fun invalidate() = withState(viewModel) { state ->
// mWidgetTypeTextView.text = it.widgetName
when (state.status) {
WidgetState.UNKWNOWN -> {
WidgetState.UNKNOWN -> {
//Hide all?
mWidgetWebView?.isVisible = false
}
......
......@@ -35,13 +35,13 @@ import org.matrix.androidsdk.features.integrationmanager.IntegrationManager
import org.matrix.androidsdk.features.terms.TermsNotSignedException
enum class WidgetState {
UNKWNOWN,
UNKNOWN,
WIDGET_NOT_ALLOWED,
WIDGET_ALLOWED
}
data class RoomWidgetViewModelState(
val status: WidgetState = WidgetState.UNKWNOWN,
val status: WidgetState = WidgetState.UNKNOWN,
val formattedURL: Async<String> = Uninitialized,
val webviewLoadedUrl: Async<String> = Uninitialized,
val widgetName: String = "",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment