Remove unused code

This commit is contained in:
Philoul 2021-03-30 23:29:43 +02:00
parent 348c260d3d
commit 21f382f0ae
5 changed files with 12 additions and 12 deletions

View file

@ -9,6 +9,8 @@ import dagger.android.support.DaggerFragment
import info.nightscout.androidaps.R import info.nightscout.androidaps.R
import info.nightscout.androidaps.database.AppRepository import info.nightscout.androidaps.database.AppRepository
import info.nightscout.androidaps.database.entities.UserEntry.Action import info.nightscout.androidaps.database.entities.UserEntry.Action
import info.nightscout.androidaps.database.entities.UserEntry.Sources
import info.nightscout.androidaps.database.entities.UserEntry.ValueWithUnit
import info.nightscout.androidaps.databinding.MaintenanceFragmentBinding import info.nightscout.androidaps.databinding.MaintenanceFragmentBinding
import info.nightscout.androidaps.events.EventNewBG import info.nightscout.androidaps.events.EventNewBG
import info.nightscout.androidaps.interfaces.DatabaseHelperInterface import info.nightscout.androidaps.interfaces.DatabaseHelperInterface

View file

@ -293,7 +293,6 @@ class LocalProfilePlugin @Inject constructor(
fun cloneProfile() { fun cloneProfile() {
val p = profiles[currentProfileIndex].deepClone() val p = profiles[currentProfileIndex].deepClone()
val sourceName = p.name
p.name = p.name + " copy" p.name = p.name + " copy"
profiles.add(p) profiles.add(p)
currentProfileIndex = profiles.size - 1 currentProfileIndex = profiles.size - 1

View file

@ -182,7 +182,7 @@ class TreatmentsCareportalFragment : DaggerFragment() {
binding.remove.setOnClickListener { v: View -> binding.remove.setOnClickListener { v: View ->
val therapyEvent = v.tag as TherapyEvent val therapyEvent = v.tag as TherapyEvent
activity?.let { activity -> activity?.let { activity ->
val text = resourceHelper.gs(R.string.eventtype) + ": " + translator.translate(therapyEvent.type.text) + "\n" + val text = resourceHelper.gs(R.string.eventtype) + ": " + translator.translate(therapyEvent.type) + "\n" +
resourceHelper.gs(R.string.notes_label) + ": " + (therapyEvent.note resourceHelper.gs(R.string.notes_label) + ": " + (therapyEvent.note
?: "") + "\n" + ?: "") + "\n" +
resourceHelper.gs(R.string.date) + ": " + dateUtil.dateAndTimeString(therapyEvent.timestamp) resourceHelper.gs(R.string.date) + ": " + dateUtil.dateAndTimeString(therapyEvent.timestamp)

View file

@ -154,14 +154,14 @@ class Translator @Inject internal constructor(
} }
fun translate(source: Sources): String = when(source) { fun translate(source: Sources): String = when(source) {
Sources.Automation -> resourceHelper.gs(R.string.automation) Sources.Automation -> resourceHelper.gs(R.string.automation)
Sources.Loop -> resourceHelper.gs(R.string.loop) Sources.Loop -> resourceHelper.gs(R.string.loop)
Sources.NSClient -> resourceHelper.gs(R.string.ns) Sources.NSClient -> resourceHelper.gs(R.string.ns)
Sources.Pump -> resourceHelper.gs(R.string.pump) Sources.Pump -> resourceHelper.gs(R.string.pump)
Sources.SMS -> resourceHelper.gs(R.string.smb_shortname) Sources.SMS -> resourceHelper.gs(R.string.smb_shortname)
Sources.Wear -> resourceHelper.gs(R.string.wear) Sources.Wear -> resourceHelper.gs(R.string.wear)
Sources.Unknown -> resourceHelper.gs(R.string.unknown) Sources.Unknown -> resourceHelper.gs(R.string.unknown)
else -> source.name else -> source.name
} }
} }

View file

@ -481,7 +481,6 @@
<string name="ue_none">No Unit</string> <string name="ue_none">No Unit</string>
<string name="ue_export_to_csv">Export User Entries to Excel (csv)</string> <string name="ue_export_to_csv">Export User Entries to Excel (csv)</string>
<string name="ue_csv_header">"%1$s;%2$s;%3$s;%4$s;%5$s;%6$s;%7$s;%8$s;%9$s;%10$s;%11$s;%12$s;%13$s;%14$s;%15$s;%16$s;%17$s"</string> <string name="ue_csv_header">"%1$s;%2$s;%3$s;%4$s;%5$s;%6$s;%7$s;%8$s;%9$s;%10$s;%11$s;%12$s;%13$s;%14$s;%15$s;%16$s;%17$s"</string>
<string name="ue_quickwizard_ID" translatable="false">L!DujFNpR?D5TY9EH1DJ</string>
<plurals name="days"> <plurals name="days">
<item quantity="one">%1$d day</item> <item quantity="one">%1$d day</item>