chore: add Firebase Crashlytics settings and fix temperature unit toggle state handling

This commit is contained in:
2026-06-12 10:28:36 +01:00
parent 7653876fed
commit 6c57086f25
3 changed files with 31 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AppInsightsSettings">
<option name="tabSettings">
<map>
<entry key="Firebase Crashlytics">
<value>
<InsightsFilterSettings>
<option name="connection">
<ConnectionSetting>
<option name="appId" value="PLACEHOLDER" />
<option name="mobileSdkAppId" value="" />
<option name="projectId" value="" />
<option name="projectNumber" value="" />
</ConnectionSetting>
</option>
<option name="signal" value="SIGNAL_UNSPECIFIED" />
<option name="timeIntervalDays" value="THIRTY_DAYS" />
<option name="visibilityType" value="ALL" />
</InsightsFilterSettings>
</value>
</entry>
</map>
</option>
</component>
</project>
+1
View File
@@ -4,6 +4,7 @@
<option name="approvalStates">
<map>
<entry key="20260611-222122-a9e9a066-af5b-42dc-aff4-518967db385e" value="false" />
<entry key="736035b4-cfea-4311-a3cb-e5170b1c7e0a" value="false" />
</map>
</option>
</component>
@@ -6,7 +6,9 @@ import com.example.esp32aldldashboard.bluetooth.ConnectionState
import com.example.esp32aldldashboard.parser.ALDLFrame
import com.example.esp32aldldashboard.repository.SettingsRepository
import com.example.esp32aldldashboard.repository.TelemetryRepository
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch
class MainScreenViewModel(
@@ -24,10 +26,11 @@ class MainScreenViewModel(
val currentFrameRate: StateFlow<Int> = telemetryRepository.currentFrameRate
val isCelsius: StateFlow<Boolean> = settingsRepository.isCelsiusFlow
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5000), false)
fun toggleTemperatureUnit() {
viewModelScope.launch {
val currentValue = settingsRepository.isCelsiusFlow.value
val currentValue = isCelsius.value
settingsRepository.setIsCelsius(!currentValue)
}
}