fix actions fragment
This commit is contained in:
parent
c0f9184f7b
commit
99c232a2e5
2 changed files with 5 additions and 4 deletions
|
@ -4,6 +4,7 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.annotation.RawRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import info.nightscout.androidaps.MainActivity
|
||||
import info.nightscout.androidaps.activities.HistoryBrowseActivity
|
||||
|
@ -91,7 +92,7 @@ class ActivityNamesImpl @Inject constructor() : ActivityNames {
|
|||
.show(fragmentManager, "ProfileViewer")
|
||||
}
|
||||
|
||||
override fun runCareDialog(fragmentManager: FragmentManager, options: ActivityNames.EventType, event: Int) {
|
||||
override fun runCareDialog(fragmentManager: FragmentManager, options: ActivityNames.EventType, @StringRes event: Int) {
|
||||
CareDialog()
|
||||
.also {
|
||||
it.arguments = Bundle().also { bundle ->
|
||||
|
|
|
@ -85,9 +85,9 @@ class CareDialog : DialogFragmentWithDate() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
savedInstanceState?.let {
|
||||
event = savedInstanceState.getInt("event", R.string.error)
|
||||
options = ActivityNames.EventType.values()[savedInstanceState.getInt("options", 0)]
|
||||
(savedInstanceState ?: arguments)?.let {
|
||||
event = it.getInt("event", R.string.error)
|
||||
options = ActivityNames.EventType.values()[it.getInt("options", 0)]
|
||||
}
|
||||
|
||||
binding.icon.setImageResource(
|
||||
|
|
Loading…
Reference in a new issue