diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerEpoxyController.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerEpoxyController.kt index 1ff35f5005..9c48a137da 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerEpoxyController.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerEpoxyController.kt @@ -237,7 +237,6 @@ internal class JSonViewerEpoxyController(private val context: Context) : ) itemClickListener(View.OnClickListener { host.itemClicked(composed) }) } - } private fun itemClicked(model: JSonViewerModel) { diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerFragment.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerFragment.kt index a8aa2493d2..51e2797958 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerFragment.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerFragment.kt @@ -38,7 +38,6 @@ internal data class JSonViewerFragmentArgs( val styleProvider: JSonViewerStyleProvider? ) : Parcelable - class JSonViewerFragment : Fragment(), MavericksView { private val viewModel: JSonViewerViewModel by fragmentViewModel() diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerModel.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerModel.kt index 3850044880..3d1f8dd3e2 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerModel.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerModel.kt @@ -38,7 +38,6 @@ internal class JSonViewerObject(key: String?, index: Int?, jObject: JSONObject) override fun addChild(model: JSonViewerModel) { keys[model.key!!] = model } - } internal class JSonViewerArray(key: String?, index: Int?, jObject: JSONArray) : @@ -53,7 +52,6 @@ internal class JSonViewerArray(key: String?, index: Int?, jObject: JSONArray) : internal class JSonViewerLeaf(key: String?, index: Int?, val stringRes: String, val type: JSONType) : JSonViewerModel(key, index, stringRes) - internal enum class JSONType { STRING, NUMBER, diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerStyleProvider.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerStyleProvider.kt index 956e585f80..4fc04c91e4 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerStyleProvider.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerStyleProvider.kt @@ -43,4 +43,3 @@ data class JSonViewerStyleProvider( ) } } - diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerViewModel.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerViewModel.kt index d978573a64..bc3f022cfa 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerViewModel.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerViewModel.kt @@ -16,7 +16,15 @@ package org.billcarsonfr.jsonviewer -import com.airbnb.mvrx.* +import com.airbnb.mvrx.Async +import com.airbnb.mvrx.Fail +import com.airbnb.mvrx.Loading +import com.airbnb.mvrx.MavericksState +import com.airbnb.mvrx.MavericksViewModel +import com.airbnb.mvrx.MavericksViewModelFactory +import com.airbnb.mvrx.Success +import com.airbnb.mvrx.Uninitialized +import com.airbnb.mvrx.ViewModelContext import kotlinx.coroutines.launch internal data class JSonViewerState( @@ -61,7 +69,6 @@ internal class JSonViewerViewModel(initialState: JSonViewerState) : } catch (failure: Throwable) { JSonViewerState(Fail(failure)) } - } } } diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt index 5c003c97e9..9193a20ab2 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt @@ -75,7 +75,6 @@ internal abstract class ValueItem : EpoxyModelWithHolder() { v: View?, menuInfo: ContextMenu.ContextMenuInfo? ) { - if (copyValue != null) { val menuItem = menu?.add( Menu.NONE, R.id.copy_value, diff --git a/library/jsonviewer/src/test/java/org/billcarsonfr/jsonviewer/ModelParseTest.kt b/library/jsonviewer/src/test/java/org/billcarsonfr/jsonviewer/ModelParseTest.kt index 4caf9ce958..b2d80911f1 100644 --- a/library/jsonviewer/src/test/java/org/billcarsonfr/jsonviewer/ModelParseTest.kt +++ b/library/jsonviewer/src/test/java/org/billcarsonfr/jsonviewer/ModelParseTest.kt @@ -69,28 +69,23 @@ class ModelParseTest { Assert.assertEquals(JSONType.STRING, it.type) } - Assert.assertTrue(glossary.keys["GlossDiv"] is JSonViewerObject) val glossDiv = glossary.keys["GlossDiv"] as JSonViewerObject - Assert.assertTrue(glossDiv.keys["GlossList"] is JSonViewerObject) val glossList = glossDiv.keys["GlossList"] as JSonViewerObject - Assert.assertTrue(glossList.keys["GlossEntry"] is JSonViewerObject) val glossEntry = glossList.keys["GlossEntry"] as JSonViewerObject Assert.assertTrue(glossEntry.keys["GlossDef"] is JSonViewerObject) val glossDef = glossEntry.keys["GlossDef"] as JSonViewerObject - Assert.assertTrue(glossDef.keys["GlossSeeAlso"] is JSonViewerArray) val glossSeeAlso = glossDef.keys["GlossSeeAlso"] as JSonViewerArray Assert.assertEquals(2, glossSeeAlso.items.size) Assert.assertEquals("0", glossSeeAlso.items.first().key) Assert.assertEquals("GML", (glossSeeAlso.items.first() as JSonViewerLeaf).stringRes) - } } diff --git a/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt b/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt index ec11702054..18fec37c62 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt @@ -18,8 +18,8 @@ package im.vector.app.features.analytics import im.vector.app.core.flow.tickerFlow import im.vector.app.core.time.Clock -import im.vector.app.features.analytics.plan.Error import im.vector.app.core.utils.compat.removeIfCompat +import im.vector.app.features.analytics.plan.Error import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob diff --git a/vector/src/main/java/im/vector/app/features/reactions/EmojiRecyclerAdapter.kt b/vector/src/main/java/im/vector/app/features/reactions/EmojiRecyclerAdapter.kt index 6abbbe29af..06d8a0bf88 100644 --- a/vector/src/main/java/im/vector/app/features/reactions/EmojiRecyclerAdapter.kt +++ b/vector/src/main/java/im/vector/app/features/reactions/EmojiRecyclerAdapter.kt @@ -31,8 +31,8 @@ import androidx.recyclerview.widget.RecyclerView import androidx.transition.AutoTransition import androidx.transition.TransitionManager import im.vector.app.R -import im.vector.app.features.reactions.data.EmojiData import im.vector.app.core.utils.compat.removeIfCompat +import im.vector.app.features.reactions.data.EmojiData import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch