diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt b/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt index cff6e89..96c0949 100644 --- a/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt +++ b/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt @@ -47,10 +47,6 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener, private val adapter = EuiccProfileAdapter() - // Marker for when this fragment might enter an invalid state - // e.g. after a failed enable / disable operation - private var invalid = false - override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setHasOptionsMenu(true) @@ -110,7 +106,6 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener, @SuppressLint("NotifyDataSetChanged") private fun refresh() { - if (invalid) return swipeRefresh.isRefreshing = true lifecycleScope.launch { @@ -156,8 +151,6 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener, euiccChannelManager.waitForReconnect(slotId, portId, timeoutMillis = 30 * 1000) } catch (e: TimeoutCancellationException) { withContext(Dispatchers.Main) { - // Prevent this Fragment from being used again - invalid = true // Timed out waiting for SIM to come back online, we can no longer assume that the LPA is still valid AlertDialog.Builder(requireContext()).apply { setMessage(R.string.enable_disable_timeout) @@ -254,9 +247,6 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener, } private fun showOptionsMenu() { - // Prevent users from doing multiple things at once - if (invalid || swipeRefresh.isRefreshing) return - PopupMenu(root.context, profileMenu).apply { setOnMenuItemClickListener(::onMenuItemClicked) populatePopupWithProfileActions(this, profile) diff --git a/app-common/src/main/res/values/strings.xml b/app-common/src/main/res/values/strings.xml index 2920bfa..a2424e5 100644 --- a/app-common/src/main/res/values/strings.xml +++ b/app-common/src/main/res/values/strings.xml @@ -16,7 +16,7 @@ Delete Rename - Timed out waiting for the eSIM chip to switch profiles. This may be a bug in your phone\'s modem firmware. Try toggling airplane mode, restarting the application, or rebooting the phone. + Timed out waiting for the eSIM chip to switch profiles. You might want to restart the application or even the phone. Cannot switch to new eSIM profile. Nickname cannot be longer than 64 characters