瀏覽代碼

ui: Prevent users from doing multiple things at once

Peter Cai 1 年之前
父節點
當前提交
4790f87b65
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt

+ 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)