From 16ca0951ca2b2a69a559a62aac50c0f607f5b6ae Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Wed, 24 Aug 2022 10:19:05 +0200 Subject: [PATCH] Move viewpager debugging visual feedback to own pref Visual feedback probably not needed for the remaining viewpager issues. Change-Id: I9931c37b9d0c79ba9fd2f27782d0c0eaa5dfd318 --- .../src/main/java/de/spiritcroc/matrixsdk/util/DbgUtil.kt | 2 ++ .../im/vector/app/features/home/room/list/RoomListFragment.kt | 2 +- .../app/features/settings/VectorSettingsScDebuggingFragment.kt | 1 + vector/src/main/res/values/strings_sc.xml | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/de/spiritcroc/matrixsdk/util/DbgUtil.kt b/matrix-sdk-android/src/main/java/de/spiritcroc/matrixsdk/util/DbgUtil.kt index 78f8127dba..5b768a12ab 100644 --- a/matrix-sdk-android/src/main/java/de/spiritcroc/matrixsdk/util/DbgUtil.kt +++ b/matrix-sdk-android/src/main/java/de/spiritcroc/matrixsdk/util/DbgUtil.kt @@ -11,6 +11,7 @@ object DbgUtil { const val DBG_TIMELINE_CHUNKS = "DBG_TIMELINE_CHUNKS" const val DBG_SHOW_DISPLAY_INDEX = "DBG_SHOW_DISPLAY_INDEX" const val DBG_VIEW_PAGER = "DBG_VIEW_PAGER" + const val DBG_VIEW_PAGER_VISUALS = "DBG_VIEW_PAGER_VISUALS" private val prefs = HashMap() @@ -20,6 +21,7 @@ object DbgUtil { DBG_TIMELINE_CHUNKS, DBG_SHOW_DISPLAY_INDEX, DBG_VIEW_PAGER, + DBG_VIEW_PAGER_VISUALS, ) fun load(context: Context) { diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt index 05e777f945..e6df436dae 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt @@ -198,7 +198,7 @@ class RoomListFragment @Inject constructor( } private fun updateDebugView() { - if (DbgUtil.isDbgEnabled(DbgUtil.DBG_VIEW_PAGER)) { + if (DbgUtil.isDbgEnabled(DbgUtil.DBG_VIEW_PAGER_VISUALS)) { views.scRoomListDebugView.isVisible = true withState(roomListViewModel) { viewPagerDimber.i { diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsScDebuggingFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsScDebuggingFragment.kt index 480f2dc46b..1a918df26c 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsScDebuggingFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsScDebuggingFragment.kt @@ -21,6 +21,7 @@ class VectorSettingsScDebuggingFragment @Inject constructor( DbgPref(DbgUtil.DBG_READ_MARKER, R.string.settings_sc_dbg_read_marker), DbgPref(DbgUtil.DBG_SHOW_READ_TRACKING, R.string.settings_sc_dbg_show_read_tracking), DbgPref(DbgUtil.DBG_VIEW_PAGER, R.string.settings_sc_dbg_view_pager), + DbgPref(DbgUtil.DBG_VIEW_PAGER_VISUALS, R.string.settings_sc_dbg_view_pager_visuals), ) override fun bindPref() { diff --git a/vector/src/main/res/values/strings_sc.xml b/vector/src/main/res/values/strings_sc.xml index f17c07c4ca..c4afadd9b6 100644 --- a/vector/src/main/res/values/strings_sc.xml +++ b/vector/src/main/res/values/strings_sc.xml @@ -163,6 +163,7 @@ Show displayIndex in timeline Show read tracking ViewPager debugging + Show ViewPager debugging information Element features