Skip to content

Commit

Permalink
Update devInternalSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
alanjhughes committed Oct 15, 2024
1 parent 6271e6b commit 35bbb95
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.facebook.react.packagerconnection.PackagerConnectionSettings
* [com.facebook.react.devsupport]. For accessing some of the settings by external modules this
* class implements an external interface [DeveloperSettings].
*/
internal class DevInternalSettings(applicationContext: Context, private val listener: Listener?) :
public class DevInternalSettings(applicationContext: Context, private val listener: Listener?) :
DeveloperSettings, OnSharedPreferenceChangeListener {
private val preferences: SharedPreferences =
PreferenceManager.getDefaultSharedPreferences(applicationContext)
Expand Down Expand Up @@ -86,19 +86,19 @@ internal class DevInternalSettings(applicationContext: Context, private val list
override var isStartSamplingProfilerOnInit: Boolean = false

// Not supported.
override fun addMenuItem(title: String) = Unit
override fun addMenuItem(title: String): Unit = Unit

override var isHotModuleReplacementEnabled: Boolean
get() = preferences.getBoolean(PREFS_HOT_MODULE_REPLACEMENT_KEY, true)
set(enabled) {
preferences.edit().putBoolean(PREFS_HOT_MODULE_REPLACEMENT_KEY, enabled).apply()
}

interface Listener {
fun onInternalSettingsChanged()
public interface Listener {
public fun onInternalSettingsChanged()
}

companion object {
public companion object {
private const val PREFS_FPS_DEBUG_KEY = "fps_debug"
private const val PREFS_JS_DEV_MODE_DEBUG_KEY = "js_dev_mode_debug"
private const val PREFS_JS_MINIFY_DEBUG_KEY = "js_minify_debug"
Expand Down

0 comments on commit 35bbb95

Please sign in to comment.