Browse Source

ui: Prevent users from doing multiple things at once

Peter Cai 1 year ago
parent
commit
4790f87b65

+ 3 - 0
app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt

@@ -254,6 +254,9 @@ 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)