fix: Show toasts from main thread
All checks were successful
/ build-debug (push) Successful in 6m50s

This commit is contained in:
Peter Cai 2024-06-13 20:24:42 -04:00
parent 1536343b3f
commit 01e1b2b9a4

View file

@ -137,8 +137,13 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener,
if (!res) {
Log.d(TAG, "Failed to enable / disable profile $iccid")
Toast.makeText(context, R.string.toast_profile_enable_failed, Toast.LENGTH_LONG)
.show()
withContext(Dispatchers.Main) {
Toast.makeText(
context,
R.string.toast_profile_enable_failed,
Toast.LENGTH_LONG
).show()
}
return@beginTrackedOperation false
}