mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
fix portable settings.path not respected for prefs and language (#1439)
This commit is contained in:
committed by
GitHub
parent
9c3d45d084
commit
173f646e3b
@@ -80,7 +80,7 @@ fun PreferencesProvider(content: @Composable () -> Unit) {
|
||||
val preferencesFileOverride: File? = System.getProperty("processing.app.preferences.file")?.let { File(it) }
|
||||
val preferencesDebounceOverride: Long? = System.getProperty("processing.app.preferences.debounce")?.toLongOrNull()
|
||||
|
||||
val settingsFolder = Settings.getFolder()
|
||||
val settingsFolder = Base.getSettingsOverride() ?: Settings.getFolder()
|
||||
val preferencesFile = preferencesFileOverride ?: settingsFolder.resolve(PREFERENCES_FILE_NAME)
|
||||
|
||||
if (!preferencesFile.exists()) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package processing.app.ui.theme
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.platform.LocalLayoutDirection
|
||||
import androidx.compose.ui.unit.LayoutDirection
|
||||
import processing.app.Base
|
||||
import processing.app.Messages
|
||||
import processing.app.watchFile
|
||||
import processing.utils.Settings
|
||||
@@ -90,7 +91,7 @@ var LastLocaleUpdate by mutableStateOf(0L)
|
||||
*/
|
||||
@Composable
|
||||
fun LocaleProvider(content: @Composable () -> Unit) {
|
||||
val settingsFolder = Settings.getFolder()
|
||||
val settingsFolder = Base.getSettingsOverride() ?: Settings.getFolder()
|
||||
val languageFile = File(settingsFolder, "language.txt")
|
||||
watchFile(languageFile)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user