Fix build
This commit is contained in:
parent
04c654c8c6
commit
d5c533469f
4 changed files with 4 additions and 8 deletions
|
@ -1,6 +1,7 @@
|
||||||
package info.nightscout.rx.weardata
|
package info.nightscout.rx.weardata
|
||||||
|
|
||||||
import info.nightscout.rx.events.Event
|
import info.nightscout.rx.events.Event
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.protobuf.ProtoBuf
|
import kotlinx.serialization.protobuf.ProtoBuf
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="24dp"
|
android:width="48dp"
|
||||||
android:height="24dp"
|
android:height="48dp"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
|
|
|
@ -65,9 +65,6 @@ class WearFragment : DaggerFragment() {
|
||||||
rxBus.send(EventMobileToWear(EventData.ActionrequestSetDefaultWatchface(dateUtil.now())))
|
rxBus.send(EventMobileToWear(EventData.ActionrequestSetDefaultWatchface(dateUtil.now())))
|
||||||
updateGui()
|
updateGui()
|
||||||
}
|
}
|
||||||
binding.sendCustom.setOnClickListener {
|
|
||||||
wearPlugin.savedCustomWatchface?.let { cwf -> rxBus.send(EventMobileDataToWear(EventData.ActionSetCustomWatchface(cwf))) }
|
|
||||||
}
|
|
||||||
binding.exportCustom.setOnClickListener {
|
binding.exportCustom.setOnClickListener {
|
||||||
wearPlugin.savedCustomWatchface?.let { importExportPrefs.exportCustomWatchface(it) }
|
wearPlugin.savedCustomWatchface?.let { importExportPrefs.exportCustomWatchface(it) }
|
||||||
?: apply { rxBus.send(EventMobileToWear(EventData.ActionrequestCustomWatchface(true)))}
|
?: apply { rxBus.send(EventMobileToWear(EventData.ActionrequestCustomWatchface(true)))}
|
||||||
|
@ -106,11 +103,9 @@ class WearFragment : DaggerFragment() {
|
||||||
_binding ?: return
|
_binding ?: return
|
||||||
wearPlugin.savedCustomWatchface?.let {
|
wearPlugin.savedCustomWatchface?.let {
|
||||||
binding.customName.text = rh.gs(R.string.wear_custom_watchface, it.metadata[CustomWatchfaceMetadataKey.CWF_NAME])
|
binding.customName.text = rh.gs(R.string.wear_custom_watchface, it.metadata[CustomWatchfaceMetadataKey.CWF_NAME])
|
||||||
binding.sendCustom.visibility = View.VISIBLE
|
|
||||||
binding.coverChart.setImageDrawable(it.drawableDatas[CustomWatchfaceDrawableDataKey.CUSTOM_WATCHFACE]?.toDrawable(resources))
|
binding.coverChart.setImageDrawable(it.drawableDatas[CustomWatchfaceDrawableDataKey.CUSTOM_WATCHFACE]?.toDrawable(resources))
|
||||||
} ?:apply {
|
} ?:apply {
|
||||||
binding.customName.text = rh.gs(R.string.wear_custom_watchface, rh.gs(info.nightscout.shared.R.string.wear_default_watchface))
|
binding.customName.text = rh.gs(R.string.wear_custom_watchface, rh.gs(info.nightscout.shared.R.string.wear_default_watchface))
|
||||||
binding.sendCustom.visibility = View.INVISIBLE
|
|
||||||
binding.coverChart.setImageDrawable(null)
|
binding.coverChart.setImageDrawable(null)
|
||||||
}
|
}
|
||||||
binding.connectedDevice.text = wearPlugin.connectedDevice
|
binding.connectedDevice.text = wearPlugin.connectedDevice
|
||||||
|
|
|
@ -186,7 +186,7 @@ class CustomWatchface : BaseWatchFace() {
|
||||||
private fun defaultWatchface(): EventData.ActionSetCustomWatchface {
|
private fun defaultWatchface(): EventData.ActionSetCustomWatchface {
|
||||||
val metadata = JSONObject()
|
val metadata = JSONObject()
|
||||||
.put(CustomWatchfaceMetadataKey.CWF_NAME.key, getString(info.nightscout.shared.R.string.wear_default_watchface))
|
.put(CustomWatchfaceMetadataKey.CWF_NAME.key, getString(info.nightscout.shared.R.string.wear_default_watchface))
|
||||||
.put(CustomWatchfaceMetadataKey.CWF_FILENAME.key, getString(R.string.wear_default_watchface))
|
.put(CustomWatchfaceMetadataKey.CWF_FILENAME.key, getString(info.nightscout.shared.R.string.wear_default_watchface))
|
||||||
.put(CustomWatchfaceMetadataKey.CWF_AUTHOR.key, "Philoul")
|
.put(CustomWatchfaceMetadataKey.CWF_AUTHOR.key, "Philoul")
|
||||||
.put(CustomWatchfaceMetadataKey.CWF_CREATED_AT.key, dateUtil.dateString(dateUtil.now()))
|
.put(CustomWatchfaceMetadataKey.CWF_CREATED_AT.key, dateUtil.dateString(dateUtil.now()))
|
||||||
.put(CustomWatchfaceMetadataKey.CWF_VERSION.key, CUSTOM_VERSION)
|
.put(CustomWatchfaceMetadataKey.CWF_VERSION.key, CUSTOM_VERSION)
|
||||||
|
|
Loading…
Reference in a new issue