This commit is contained in:
2026-05-19 00:10:38 +02:00
parent db2290ba14
commit c68787cd01
93 changed files with 5855 additions and 0 deletions
@@ -0,0 +1,35 @@
package xyz.magicalbits.smsremote.device
import androidx.compose.runtime.Immutable
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import xyz.magicalbits.smsremote.data.a14Device
import xyz.magicalbits.smsremote.data.iPhoneDevice
class DeviceViewModel : ViewModel() {
private var deviceId: String = ""
private val _deviceData = MutableLiveData<DeviceScreenState>()
val deviceData: LiveData<DeviceScreenState> = _deviceData
fun setDeviceId(newDeviceId: String?) {
if (newDeviceId != null) {
deviceId = newDeviceId
}
// placeholder since there's no API reading logic yet
_deviceData.value =
if (deviceId == "Samsung A14") {
a14Device
} else {
iPhoneDevice
}
}
}
@Immutable
data class DeviceScreenState(
val deviceId: String,
val name: String,
val phoneNumbers: List<String>
)