[Android] Widgets: make the configuration icon visible by default

Nicolas Pomepuy git at videolan.org
Wed May 18 09:57:58 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu May 12 07:27:33 2022 +0200| [3127aa09c0284c80b76b9e1c8c63b1b085f97fd0] | committer: Duncan McNamara

Widgets: make the configuration icon visible by default

> https://code.videolan.org/videolan/vlc-android/commit/3127aa09c0284c80b76b9e1c8c63b1b085f97fd0
---

 .../src/org/videolan/vlc/gui/preferences/widgets/PreferencesWidgets.kt  | 2 +-
 .../vlc-android/src/org/videolan/vlc/repository/WidgetRepository.kt     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/preferences/widgets/PreferencesWidgets.kt b/application/vlc-android/src/org/videolan/vlc/gui/preferences/widgets/PreferencesWidgets.kt
index 60b3e70b1..d1bde4d02 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/preferences/widgets/PreferencesWidgets.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/preferences/widgets/PreferencesWidgets.kt
@@ -158,7 +158,7 @@ class PreferencesWidgets : BasePreferenceFragment(), SharedPreferences.OnSharedP
 
             }
             "widget_show_configure" -> {
-                val newValue = sharedPreferences.getBoolean(key, false)
+                val newValue = sharedPreferences.getBoolean(key, true)
                 model.widget.value?.showConfigure = newValue
 
             }
diff --git a/application/vlc-android/src/org/videolan/vlc/repository/WidgetRepository.kt b/application/vlc-android/src/org/videolan/vlc/repository/WidgetRepository.kt
index 557ae9dc3..a92a6c583 100644
--- a/application/vlc-android/src/org/videolan/vlc/repository/WidgetRepository.kt
+++ b/application/vlc-android/src/org/videolan/vlc/repository/WidgetRepository.kt
@@ -67,7 +67,7 @@ class WidgetRepository(private val widgetDao: WidgetDao) {
     }
 
     suspend fun createNew(context: Context, appWidgetId: Int): Widget {
-        val widget = Widget(appWidgetId, 0, 0, 0, true, ContextCompat.getColor(context, R.color.black), ContextCompat.getColor(context, R.color.white), 10, 10, 100, false)
+        val widget = Widget(appWidgetId, 0, 0, 0, true, ContextCompat.getColor(context, R.color.black), ContextCompat.getColor(context, R.color.white), 10, 10, 100, true)
         addWidget(widget)
         return widget
     }



More information about the Android mailing list