Bug 1837077 - Update OnboardingRadioButton pref in background

fenix/116.0
MatthewTighe 1 year ago committed by mergify[bot]
parent 93a7554e00
commit 26d38921a4

@ -12,6 +12,9 @@ import android.widget.ImageView
import androidx.appcompat.widget.AppCompatRadioButton
import androidx.core.content.edit
import androidx.core.content.withStyledAttributes
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.setTextColor
import org.mozilla.fenix.ext.setTextSize
@ -91,8 +94,10 @@ class OnboardingRadioButton(
illustration?.let {
it.isSelected = isChecked
}
context.settings().preferences.edit {
putBoolean(context.getString(key), isChecked)
CoroutineScope(Dispatchers.IO).launch {
context.settings().preferences.edit {
putBoolean(context.getString(key), isChecked)
}
}
}

Loading…
Cancel
Save