resolve PH flag, remove sync from NS menu
This commit is contained in:
parent
2707ff8ed3
commit
ccabee0399
|
@ -2,6 +2,7 @@ package info.nightscout.implementation.db
|
|||
|
||||
import android.content.Context
|
||||
import info.nightscout.database.entities.Bolus
|
||||
import info.nightscout.database.entities.BolusCalculatorResult
|
||||
import info.nightscout.database.entities.Carbs
|
||||
import info.nightscout.database.entities.DeviceStatus
|
||||
import info.nightscout.database.entities.EffectiveProfileSwitch
|
||||
|
@ -76,6 +77,11 @@ class CompatDBHelper @Inject constructor(
|
|||
rxBus.send(EventTreatmentChange())
|
||||
rxBus.send(EventNewHistoryData(timestamp, false))
|
||||
}
|
||||
it.filterIsInstance<BolusCalculatorResult>().minOfOrNull { t -> t.timestamp }?.let { timestamp ->
|
||||
aapsLogger.debug(LTag.DATABASE, "Firing EventTreatmentChange $timestamp")
|
||||
rxBus.send(EventTreatmentChange())
|
||||
rxBus.send(EventNewHistoryData(timestamp, false))
|
||||
}
|
||||
it.filterIsInstance<TemporaryBasal>().minOfOrNull { t -> t.timestamp }?.let { timestamp ->
|
||||
aapsLogger.debug(LTag.DATABASE, "Firing EventTempBasalChange $timestamp")
|
||||
rxBus.send(EventTempBasalChange())
|
||||
|
|
|
@ -10,6 +10,7 @@ import info.nightscout.core.extensions.plannedRemainingMinutes
|
|||
import info.nightscout.core.utils.fabric.FabricPrivacy
|
||||
import info.nightscout.core.utils.fabric.InstanceId
|
||||
import info.nightscout.interfaces.Config
|
||||
import info.nightscout.interfaces.db.PersistenceLayer
|
||||
import info.nightscout.interfaces.iob.IobCobCalculator
|
||||
import info.nightscout.interfaces.notifications.Notification
|
||||
import info.nightscout.interfaces.nsclient.ProcessedDeviceStatusData
|
||||
|
@ -64,7 +65,8 @@ open class VirtualPumpPlugin @Inject constructor(
|
|||
private val pumpSync: PumpSync,
|
||||
private val config: Config,
|
||||
private val dateUtil: DateUtil,
|
||||
private val processedDeviceStatusData: ProcessedDeviceStatusData
|
||||
private val processedDeviceStatusData: ProcessedDeviceStatusData,
|
||||
private val persistenceLayer: PersistenceLayer
|
||||
) : PumpPluginBase(
|
||||
PluginDescription()
|
||||
.mainType(PluginType.PUMP)
|
||||
|
@ -207,23 +209,19 @@ open class VirtualPumpPlugin @Inject constructor(
|
|||
aapsLogger.debug(LTag.PUMP, "Delivering treatment insulin: " + detailedBolusInfo.insulin + "U carbs: " + detailedBolusInfo.carbs + "g " + result)
|
||||
rxBus.send(EventVirtualPumpUpdateGui())
|
||||
lastDataTime = System.currentTimeMillis()
|
||||
if (detailedBolusInfo.insulin > 0)
|
||||
pumpSync.syncBolusWithPumpId(
|
||||
timestamp = detailedBolusInfo.timestamp,
|
||||
amount = detailedBolusInfo.insulin,
|
||||
type = detailedBolusInfo.bolusType,
|
||||
pumpId = dateUtil.now(),
|
||||
pumpType = pumpType ?: PumpType.GENERIC_AAPS,
|
||||
pumpSerial = serialNumber()
|
||||
)
|
||||
if (detailedBolusInfo.carbs > 0)
|
||||
pumpSync.syncCarbsWithTimestamp(
|
||||
timestamp = detailedBolusInfo.carbsTimestamp ?: detailedBolusInfo.timestamp,
|
||||
amount = detailedBolusInfo.carbs,
|
||||
pumpId = null,
|
||||
pumpType = pumpType ?: PumpType.GENERIC_AAPS,
|
||||
pumpSerial = serialNumber()
|
||||
)
|
||||
if (detailedBolusInfo.insulin > 0) {
|
||||
if (config.NSCLIENT) // do not store pump serial (record will not be marked PH)
|
||||
persistenceLayer.insertOrUpdateBolus(detailedBolusInfo.createBolus())
|
||||
else
|
||||
pumpSync.syncBolusWithPumpId(
|
||||
timestamp = detailedBolusInfo.timestamp,
|
||||
amount = detailedBolusInfo.insulin,
|
||||
type = detailedBolusInfo.bolusType,
|
||||
pumpId = dateUtil.now(),
|
||||
pumpType = pumpType ?: PumpType.GENERIC_AAPS,
|
||||
pumpSerial = serialNumber()
|
||||
)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ import info.nightscout.interfaces.plugin.ActivePlugin
|
|||
import info.nightscout.interfaces.profile.ProfileFunction
|
||||
import info.nightscout.rx.AapsSchedulers
|
||||
import info.nightscout.rx.bus.RxBus
|
||||
import info.nightscout.rx.events.EventNSClientRestart
|
||||
import info.nightscout.rx.events.EventNewHistoryData
|
||||
import info.nightscout.rx.events.EventTreatmentChange
|
||||
import info.nightscout.rx.logging.AAPSLogger
|
||||
import info.nightscout.rx.logging.LTag
|
||||
|
@ -54,10 +52,8 @@ import info.nightscout.ui.databinding.TreatmentsBolusCarbsFragmentBinding
|
|||
import info.nightscout.ui.databinding.TreatmentsBolusCarbsItemBinding
|
||||
import info.nightscout.ui.dialogs.WizardInfoDialog
|
||||
import info.nightscout.ui.extensions.isPumpHistory
|
||||
import io.reactivex.rxjava3.core.Completable
|
||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||
import io.reactivex.rxjava3.kotlin.subscribeBy
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -212,6 +208,18 @@ class TreatmentsBolusCarbsFragment : DaggerFragment(), MenuProvider {
|
|||
holder.binding.metadataLayout.visibility = (ml.bolusCalculatorResult != null && (ml.bolusCalculatorResult.isValid || showInvalidated)).toVisibility()
|
||||
ml.bolusCalculatorResult?.let { bolusCalculatorResult ->
|
||||
holder.binding.calcTime.text = dateUtil.timeString(bolusCalculatorResult.timestamp)
|
||||
holder.binding.metadataNs.visibility = (bolusCalculatorResult.interfaceIDs.nightscoutId != null).toVisibility()
|
||||
holder.binding.cbMetadataRemove.visibility = (bolusCalculatorResult.isValid && actionHelper.isRemoving).toVisibility()
|
||||
if (actionHelper.isRemoving) {
|
||||
holder.binding.cbMetadataRemove.setOnCheckedChangeListener { _, value ->
|
||||
actionHelper.updateSelection(position, ml, value)
|
||||
}
|
||||
holder.binding.root.setOnClickListener {
|
||||
holder.binding.cbMetadataRemove.toggle()
|
||||
actionHelper.updateSelection(position, ml, holder.binding.cbMetadataRemove.isChecked)
|
||||
}
|
||||
holder.binding.cbMetadataRemove.isChecked = actionHelper.isSelected(position)
|
||||
}
|
||||
}
|
||||
|
||||
// Bolus
|
||||
|
@ -310,8 +318,6 @@ class TreatmentsBolusCarbsFragment : DaggerFragment(), MenuProvider {
|
|||
this.menu = menu
|
||||
inflater.inflate(R.menu.menu_treatments_carbs_bolus, menu)
|
||||
updateMenuVisibility()
|
||||
val nsUploadOnly = !sp.getBoolean(info.nightscout.core.utils.R.string.key_ns_receive_insulin, false) || !sp.getBoolean(info.nightscout.core.utils.R.string.key_ns_receive_carbs, false) || !config.isEngineeringMode()
|
||||
menu.findItem(R.id.nav_refresh_ns)?.isVisible = !nsUploadOnly
|
||||
val hasItems = (binding.recyclerview.adapter?.itemCount ?: 0) > 0
|
||||
menu.findItem(R.id.nav_delete_future)?.isVisible = hasItems
|
||||
}
|
||||
|
@ -346,38 +352,9 @@ class TreatmentsBolusCarbsFragment : DaggerFragment(), MenuProvider {
|
|||
true
|
||||
}
|
||||
|
||||
R.id.nav_refresh_ns -> {
|
||||
refreshFromNightscout()
|
||||
true
|
||||
}
|
||||
|
||||
else -> false
|
||||
}
|
||||
|
||||
private fun refreshFromNightscout() {
|
||||
activity?.let { activity ->
|
||||
OKDialog.showConfirmation(activity, rh.gs(R.string.refresheventsfromnightscout) + "?") {
|
||||
uel.log(Action.TREATMENTS_NS_REFRESH, Sources.Treatments)
|
||||
disposable +=
|
||||
Completable.fromAction {
|
||||
repository.deleteAllBolusCalculatorResults()
|
||||
repository.deleteAllBoluses()
|
||||
repository.deleteAllCarbs()
|
||||
}
|
||||
.subscribeOn(aapsSchedulers.io)
|
||||
.observeOn(aapsSchedulers.main)
|
||||
.subscribeBy(
|
||||
onError = { aapsLogger.error("Error removing entries", it) },
|
||||
onComplete = {
|
||||
rxBus.send(EventTreatmentChange())
|
||||
rxBus.send(EventNewHistoryData(0, false))
|
||||
}
|
||||
)
|
||||
rxBus.send(EventNSClientRestart())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun deleteFutureTreatments() {
|
||||
activity?.let { activity ->
|
||||
OKDialog.showConfirmation(activity, rh.gs(info.nightscout.core.ui.R.string.overview_treatment_label), rh.gs(info.nightscout.core.ui.R.string.delete_future_treatments) + "?", Runnable {
|
||||
|
@ -476,6 +453,17 @@ class TreatmentsBolusCarbsFragment : DaggerFragment(), MenuProvider {
|
|||
{ aapsLogger.error(LTag.DATABASE, "Error while invalidating carbs", it) }
|
||||
)
|
||||
}
|
||||
ml.bolusCalculatorResult?.let { bolusCalculatorResult ->
|
||||
uel.log(
|
||||
Action.BOLUS_CALCULATOR_RESULT_REMOVED, Sources.Treatments,
|
||||
ValueWithUnit.Timestamp(bolusCalculatorResult.timestamp)
|
||||
)
|
||||
disposable += repository.runTransactionForResult(InvalidateBolusCalculatorResultTransaction(bolusCalculatorResult.id))
|
||||
.subscribe(
|
||||
{ result -> result.invalidated.forEach { aapsLogger.debug(LTag.DATABASE, "Invalidated bolusCalculatorResult $it") } },
|
||||
{ aapsLogger.error(LTag.DATABASE, "Error while invalidating bolusCalculatorResult", it) }
|
||||
)
|
||||
}
|
||||
}
|
||||
actionHelper.finish()
|
||||
})
|
||||
|
|
|
@ -30,7 +30,6 @@ import info.nightscout.interfaces.Translator
|
|||
import info.nightscout.interfaces.logging.UserEntryLogger
|
||||
import info.nightscout.rx.AapsSchedulers
|
||||
import info.nightscout.rx.bus.RxBus
|
||||
import info.nightscout.rx.events.EventNSClientRestart
|
||||
import info.nightscout.rx.events.EventTherapyEventChange
|
||||
import info.nightscout.rx.logging.AAPSLogger
|
||||
import info.nightscout.rx.logging.LTag
|
||||
|
@ -43,10 +42,8 @@ import info.nightscout.ui.R
|
|||
import info.nightscout.ui.activities.fragments.TreatmentsCareportalFragment.RecyclerViewAdapter.TherapyEventsViewHolder
|
||||
import info.nightscout.ui.databinding.TreatmentsCareportalFragmentBinding
|
||||
import info.nightscout.ui.databinding.TreatmentsCareportalItemBinding
|
||||
import io.reactivex.rxjava3.core.Completable
|
||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||
import io.reactivex.rxjava3.kotlin.subscribeBy
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -89,21 +86,6 @@ class TreatmentsCareportalFragment : DaggerFragment(), MenuProvider {
|
|||
requireActivity().addMenuProvider(this, viewLifecycleOwner, Lifecycle.State.RESUMED)
|
||||
}
|
||||
|
||||
private fun refreshFromNightscout() {
|
||||
activity?.let { activity ->
|
||||
OKDialog.showConfirmation(activity, rh.gs(info.nightscout.core.ui.R.string.careportal), rh.gs(R.string.refresheventsfromnightscout) + " ?", Runnable {
|
||||
uel.log(Action.CAREPORTAL_NS_REFRESH, Sources.Treatments)
|
||||
disposable += Completable.fromAction { repository.deleteAllTherapyEventsEntries() }
|
||||
.subscribeOn(aapsSchedulers.io)
|
||||
.subscribeBy(
|
||||
onError = { aapsLogger.error("Error removing entries", it) },
|
||||
onComplete = { rxBus.send(EventTherapyEventChange()) }
|
||||
)
|
||||
rxBus.send(EventNSClientRestart())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun removeStartedEvents() {
|
||||
activity?.let { activity ->
|
||||
OKDialog.showConfirmation(activity, rh.gs(info.nightscout.core.ui.R.string.careportal), rh.gs(R.string.careportal_remove_started_events), Runnable {
|
||||
|
@ -200,8 +182,6 @@ class TreatmentsCareportalFragment : DaggerFragment(), MenuProvider {
|
|||
this.menu = menu
|
||||
inflater.inflate(R.menu.menu_treatments_careportal, menu)
|
||||
updateMenuVisibility()
|
||||
val nsUploadOnly = !sp.getBoolean(info.nightscout.core.utils.R.string.key_ns_receive_therapy_events, false) || !config.isEngineeringMode()
|
||||
menu.findItem(R.id.nav_refresh_ns)?.isVisible = !nsUploadOnly
|
||||
}
|
||||
|
||||
private fun updateMenuVisibility() {
|
||||
|
@ -234,11 +214,6 @@ class TreatmentsCareportalFragment : DaggerFragment(), MenuProvider {
|
|||
true
|
||||
}
|
||||
|
||||
R.id.nav_refresh_ns -> {
|
||||
refreshFromNightscout()
|
||||
true
|
||||
}
|
||||
|
||||
else -> false
|
||||
}
|
||||
|
||||
|
|
|
@ -36,8 +36,6 @@ import info.nightscout.rx.AapsSchedulers
|
|||
import info.nightscout.rx.bus.RxBus
|
||||
import info.nightscout.rx.events.EventEffectiveProfileSwitchChanged
|
||||
import info.nightscout.rx.events.EventLocalProfileChanged
|
||||
import info.nightscout.rx.events.EventNSClientRestart
|
||||
import info.nightscout.rx.events.EventNewHistoryData
|
||||
import info.nightscout.rx.events.EventProfileSwitchChanged
|
||||
import info.nightscout.rx.logging.AAPSLogger
|
||||
import info.nightscout.rx.logging.LTag
|
||||
|
@ -51,10 +49,8 @@ import info.nightscout.ui.activities.fragments.TreatmentsProfileSwitchFragment.R
|
|||
import info.nightscout.ui.databinding.TreatmentsProfileswitchFragmentBinding
|
||||
import info.nightscout.ui.databinding.TreatmentsProfileswitchItemBinding
|
||||
import info.nightscout.ui.dialogs.ProfileViewerDialog
|
||||
import io.reactivex.rxjava3.core.Completable
|
||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||
import io.reactivex.rxjava3.kotlin.subscribeBy
|
||||
import javax.inject.Inject
|
||||
|
||||
class TreatmentsProfileSwitchFragment : DaggerFragment(), MenuProvider {
|
||||
|
@ -98,30 +94,6 @@ class TreatmentsProfileSwitchFragment : DaggerFragment(), MenuProvider {
|
|||
requireActivity().addMenuProvider(this, viewLifecycleOwner, Lifecycle.State.RESUMED)
|
||||
}
|
||||
|
||||
private fun refreshFromNightscout() {
|
||||
activity?.let { activity ->
|
||||
OKDialog.showConfirmation(activity, rh.gs(R.string.refresheventsfromnightscout) + "?") {
|
||||
uel.log(Action.TREATMENTS_NS_REFRESH, Sources.Treatments)
|
||||
disposable +=
|
||||
Completable.fromAction {
|
||||
repository.deleteAllEffectiveProfileSwitches()
|
||||
repository.deleteAllProfileSwitches()
|
||||
}
|
||||
.subscribeOn(aapsSchedulers.io)
|
||||
.observeOn(aapsSchedulers.main)
|
||||
.subscribeBy(
|
||||
onError = { aapsLogger.error("Error removing entries", it) },
|
||||
onComplete = {
|
||||
rxBus.send(EventProfileSwitchChanged())
|
||||
rxBus.send(EventEffectiveProfileSwitchChanged(0L))
|
||||
rxBus.send(EventNewHistoryData(0, false))
|
||||
}
|
||||
)
|
||||
rxBus.send(EventNSClientRestart())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun profileSwitchWithInvalid(now: Long) = repository
|
||||
.getProfileSwitchDataIncludingInvalidFromTime(now - millsToThePast, false)
|
||||
.map { bolus -> bolus.map { ProfileSealed.PS(it) } }
|
||||
|
@ -286,8 +258,6 @@ class TreatmentsProfileSwitchFragment : DaggerFragment(), MenuProvider {
|
|||
this.menu = menu
|
||||
inflater.inflate(R.menu.menu_treatments_profile_switch, menu)
|
||||
updateMenuVisibility()
|
||||
val nsUploadOnly = !sp.getBoolean(info.nightscout.core.utils.R.string.key_ns_receive_profile_switch, false) || !config.isEngineeringMode()
|
||||
menu.findItem(R.id.nav_refresh_ns)?.isVisible = !nsUploadOnly
|
||||
}
|
||||
|
||||
private fun updateMenuVisibility() {
|
||||
|
@ -315,18 +285,15 @@ class TreatmentsProfileSwitchFragment : DaggerFragment(), MenuProvider {
|
|||
true
|
||||
}
|
||||
|
||||
R.id.nav_refresh_ns -> {
|
||||
refreshFromNightscout()
|
||||
true
|
||||
}
|
||||
|
||||
else -> false
|
||||
}
|
||||
|
||||
private fun getConfirmationText(selectedItems: SparseArray<ProfileSealed>): String {
|
||||
if (selectedItems.size() == 1) {
|
||||
val profileSwitch = selectedItems.valueAt(0)
|
||||
return rh.gs(info.nightscout.core.ui.R.string.careportal_profileswitch) + ": " + profileSwitch.profileName + "\n" + rh.gs(info.nightscout.core.ui.R.string.date) + ": " + dateUtil.dateAndTimeString(profileSwitch.timestamp)
|
||||
return rh.gs(info.nightscout.core.ui.R.string.careportal_profileswitch) + ": " + profileSwitch.profileName + "\n" + rh.gs(info.nightscout.core.ui.R.string.date) + ": " + dateUtil.dateAndTimeString(
|
||||
profileSwitch.timestamp
|
||||
)
|
||||
}
|
||||
return rh.gs(info.nightscout.core.ui.R.string.confirm_remove_multiple_items, selectedItems.size())
|
||||
}
|
||||
|
|
|
@ -36,10 +36,6 @@ import info.nightscout.interfaces.logging.UserEntryLogger
|
|||
import info.nightscout.interfaces.utils.DecimalFormatter
|
||||
import info.nightscout.rx.AapsSchedulers
|
||||
import info.nightscout.rx.bus.RxBus
|
||||
import info.nightscout.rx.events.EventEffectiveProfileSwitchChanged
|
||||
import info.nightscout.rx.events.EventNSClientRestart
|
||||
import info.nightscout.rx.events.EventNewHistoryData
|
||||
import info.nightscout.rx.events.EventProfileSwitchChanged
|
||||
import info.nightscout.rx.events.EventTempTargetChange
|
||||
import info.nightscout.rx.logging.AAPSLogger
|
||||
import info.nightscout.rx.logging.LTag
|
||||
|
@ -53,10 +49,8 @@ import info.nightscout.ui.R
|
|||
import info.nightscout.ui.activities.fragments.TreatmentsTempTargetFragment.RecyclerViewAdapter.TempTargetsViewHolder
|
||||
import info.nightscout.ui.databinding.TreatmentsTemptargetFragmentBinding
|
||||
import info.nightscout.ui.databinding.TreatmentsTemptargetItemBinding
|
||||
import io.reactivex.rxjava3.core.Completable
|
||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||
import io.reactivex.rxjava3.kotlin.subscribeBy
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -101,29 +95,6 @@ class TreatmentsTempTargetFragment : DaggerFragment(), MenuProvider {
|
|||
requireActivity().addMenuProvider(this, viewLifecycleOwner, Lifecycle.State.RESUMED)
|
||||
}
|
||||
|
||||
private fun refreshFromNightscout() {
|
||||
activity?.let { activity ->
|
||||
OKDialog.showConfirmation(activity, rh.gs(R.string.refresheventsfromnightscout) + "?") {
|
||||
uel.log(Action.TREATMENTS_NS_REFRESH, Sources.Treatments)
|
||||
disposable +=
|
||||
Completable.fromAction {
|
||||
repository.deleteAllTempTargetEntries()
|
||||
}
|
||||
.subscribeOn(aapsSchedulers.io)
|
||||
.observeOn(aapsSchedulers.main)
|
||||
.subscribeBy(
|
||||
onError = { aapsLogger.error("Error removing entries", it) },
|
||||
onComplete = {
|
||||
rxBus.send(EventProfileSwitchChanged())
|
||||
rxBus.send(EventEffectiveProfileSwitchChanged(0L))
|
||||
rxBus.send(EventNewHistoryData(0, false))
|
||||
}
|
||||
)
|
||||
rxBus.send(EventNSClientRestart())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun swapAdapter() {
|
||||
val now = System.currentTimeMillis()
|
||||
binding.recyclerview.isLoading = true
|
||||
|
@ -220,8 +191,6 @@ class TreatmentsTempTargetFragment : DaggerFragment(), MenuProvider {
|
|||
this.menu = menu
|
||||
inflater.inflate(R.menu.menu_treatments_temp_target, menu)
|
||||
updateMenuVisibility()
|
||||
val nsUploadOnly = !sp.getBoolean(info.nightscout.core.utils.R.string.key_ns_receive_temp_target, false) || !config.isEngineeringMode()
|
||||
menu.findItem(R.id.nav_refresh_ns)?.isVisible = !nsUploadOnly
|
||||
}
|
||||
|
||||
private fun updateMenuVisibility() {
|
||||
|
@ -249,11 +218,6 @@ class TreatmentsTempTargetFragment : DaggerFragment(), MenuProvider {
|
|||
true
|
||||
}
|
||||
|
||||
R.id.nav_refresh_ns -> {
|
||||
refreshFromNightscout()
|
||||
true
|
||||
}
|
||||
|
||||
else -> false
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
|
@ -66,12 +65,33 @@
|
|||
android:id="@+id/calculation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/calculation_short"
|
||||
android:textAlignment="viewEnd"
|
||||
android:textColor="@color/colorCalculatorButton"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/metadata_ns"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:textColor="?attr/setTempButton"
|
||||
android:text="NS"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_metadata_remove"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:contentDescription="@string/select_for_removal"
|
||||
android:minWidth="0dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -23,10 +23,4 @@
|
|||
android:id="@+id/nav_delete_future"
|
||||
android:title="@string/delete_future_treatments"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/nav_refresh_ns"
|
||||
android:title="@string/refresh_from_nightscout"
|
||||
app:showAsAction="never" />
|
||||
|
||||
</menu>
|
||||
|
|
|
@ -19,11 +19,6 @@
|
|||
android:title="@string/hide_invalidated"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/nav_refresh_ns"
|
||||
android:title="@string/refresh_from_nightscout"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/nav_remove_started_events"
|
||||
android:title="@string/careportal_remove_started_events"
|
||||
|
|
|
@ -19,9 +19,4 @@
|
|||
android:icon="@drawable/ic_visibility_off"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/nav_refresh_ns"
|
||||
android:title="@string/refresh_from_nightscout"
|
||||
app:showAsAction="never" />
|
||||
|
||||
</menu>
|
||||
|
|
Loading…
Reference in a new issue