Refresh system Euicc cache every time our UI is refreshed

This commit is contained in:
Peter Cai 2022-05-03 19:03:50 -04:00
parent 67d03a0696
commit 3013609ff5
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,8 @@ import com.truphone.lpad.progress.Progress
import im.angry.openeuicc.R
import im.angry.openeuicc.databinding.EuiccProfileBinding
import im.angry.openeuicc.databinding.FragmentEuiccBinding
import im.angry.openeuicc.util.openEuiccApplication
import im.angry.openeuicc.util.tryRefreshCachedEuiccInfo
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@ -74,6 +76,7 @@ class EuiccManagementFragment : Fragment(), EuiccFragmentMarker, EuiccProfilesCh
lifecycleScope.launch {
val profiles = withContext(Dispatchers.IO) {
openEuiccApplication.subscriptionManager.tryRefreshCachedEuiccInfo(channel.cardId)
channel.lpa.profiles
}