mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-01-28 16:09:33 +01:00
Fix prefs
This commit is contained in:
parent
b6e890b26c
commit
dda86b42c7
@ -74,9 +74,6 @@ class SettingsFragment :
|
|||||||
private var chatRefreshInterval: ListPreference? = null
|
private var chatRefreshInterval: ListPreference? = null
|
||||||
private var directoryCacheTime: ListPreference? = null
|
private var directoryCacheTime: ListPreference? = null
|
||||||
private var mediaButtonsEnabled: CheckBoxPreference? = null
|
private var mediaButtonsEnabled: CheckBoxPreference? = null
|
||||||
private var lockScreenEnabled: CheckBoxPreference? = null
|
|
||||||
private var sendBluetoothNotifications: CheckBoxPreference? = null
|
|
||||||
private var sendBluetoothAlbumArt: CheckBoxPreference? = null
|
|
||||||
private var showArtistPicture: CheckBoxPreference? = null
|
private var showArtistPicture: CheckBoxPreference? = null
|
||||||
private var sharingDefaultDescription: EditTextPreference? = null
|
private var sharingDefaultDescription: EditTextPreference? = null
|
||||||
private var sharingDefaultGreeting: EditTextPreference? = null
|
private var sharingDefaultGreeting: EditTextPreference? = null
|
||||||
@ -120,7 +117,7 @@ class SettingsFragment :
|
|||||||
showArtistPicture = findPreference(Constants.PREFERENCES_KEY_SHOW_ARTIST_PICTURE)
|
showArtistPicture = findPreference(Constants.PREFERENCES_KEY_SHOW_ARTIST_PICTURE)
|
||||||
customCacheLocation = findPreference(Constants.PREFERENCES_KEY_CUSTOM_CACHE_LOCATION)
|
customCacheLocation = findPreference(Constants.PREFERENCES_KEY_CUSTOM_CACHE_LOCATION)
|
||||||
|
|
||||||
sharingDefaultGreeting!!.text = shareGreeting
|
sharingDefaultGreeting?.text = shareGreeting
|
||||||
setupClearSearchPreference()
|
setupClearSearchPreference()
|
||||||
setupCacheLocationPreference()
|
setupCacheLocationPreference()
|
||||||
}
|
}
|
||||||
@ -294,23 +291,16 @@ class SettingsFragment :
|
|||||||
sharingDefaultExpiration!!.summary = sharingDefaultExpiration!!.text
|
sharingDefaultExpiration!!.summary = sharingDefaultExpiration!!.text
|
||||||
sharingDefaultDescription!!.summary = sharingDefaultDescription!!.text
|
sharingDefaultDescription!!.summary = sharingDefaultDescription!!.text
|
||||||
sharingDefaultGreeting!!.summary = sharingDefaultGreeting!!.text
|
sharingDefaultGreeting!!.summary = sharingDefaultGreeting!!.text
|
||||||
if (!mediaButtonsEnabled!!.isChecked) {
|
|
||||||
lockScreenEnabled!!.isChecked = false
|
if (debugLogToFile?.isChecked == true) {
|
||||||
lockScreenEnabled!!.isEnabled = false
|
debugLogToFile?.summary = getString(
|
||||||
}
|
|
||||||
if (!sendBluetoothNotifications!!.isChecked) {
|
|
||||||
sendBluetoothAlbumArt!!.isChecked = false
|
|
||||||
sendBluetoothAlbumArt!!.isEnabled = false
|
|
||||||
}
|
|
||||||
if (debugLogToFile!!.isChecked) {
|
|
||||||
debugLogToFile!!.summary = getString(
|
|
||||||
R.string.settings_debug_log_path,
|
R.string.settings_debug_log_path,
|
||||||
ultrasonicDirectory, FileLoggerTree.FILENAME
|
ultrasonicDirectory, FileLoggerTree.FILENAME
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
debugLogToFile!!.summary = ""
|
debugLogToFile?.summary = ""
|
||||||
}
|
}
|
||||||
showArtistPicture!!.isEnabled = shouldUseId3Tags
|
showArtistPicture?.isEnabled = shouldUseId3Tags
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setHideMedia(hide: Boolean) {
|
private fun setHideMedia(hide: Boolean) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user