Move viewpager debugging visual feedback to own pref

Visual feedback probably not needed for the remaining viewpager issues.

Change-Id: I9931c37b9d0c79ba9fd2f27782d0c0eaa5dfd318
This commit is contained in:
SpiritCroc 2022-08-24 10:19:05 +02:00
parent a3786cde1b
commit 16ca0951ca
4 changed files with 5 additions and 1 deletions

View File

@ -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<String, Boolean>()
@ -20,6 +21,7 @@ object DbgUtil {
DBG_TIMELINE_CHUNKS,
DBG_SHOW_DISPLAY_INDEX,
DBG_VIEW_PAGER,
DBG_VIEW_PAGER_VISUALS,
)
fun load(context: Context) {

View File

@ -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 {

View File

@ -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() {

View File

@ -163,6 +163,7 @@
<string name="settings_sc_dbg_show_display_index">Show displayIndex in timeline</string>
<string name="settings_sc_dbg_show_read_tracking">Show read tracking</string>
<string name="settings_sc_dbg_view_pager">ViewPager debugging</string>
<string name="settings_sc_dbg_view_pager_visuals">Show ViewPager debugging information</string>
<!-- SC labs -->
<string name="settings_upstream_labs">Element features</string>