Browse Source

refactor: include enabled profiles in operational list filter (#255)

Reviewed-on: https://gitea.angry.im/PeterCxy/OpenEUICC/pulls/255
Co-authored-by: septs <github@septs.pw>
Co-committed-by: septs <github@septs.pw>
septs 2 months ago
parent
commit
8f51abe1af
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app-common/src/main/java/im/angry/openeuicc/util/LPAUtils.kt

+ 1 - 1
app-common/src/main/java/im/angry/openeuicc/util/LPAUtils.kt

@@ -16,7 +16,7 @@ val LocalProfileInfo.isEnabled: Boolean
     get() = state == LocalProfileInfo.State.Enabled
     get() = state == LocalProfileInfo.State.Enabled
 
 
 val List<LocalProfileInfo>.operational: List<LocalProfileInfo>
 val List<LocalProfileInfo>.operational: List<LocalProfileInfo>
-    get() = filter { it.profileClass == LocalProfileInfo.Clazz.Operational }
+    get() = filter { it.profileClass == LocalProfileInfo.Clazz.Operational || it.isEnabled }
 
 
 val List<LocalProfileInfo>.enabled: LocalProfileInfo?
 val List<LocalProfileInfo>.enabled: LocalProfileInfo?
     get() = find { it.isEnabled }
     get() = find { it.isEnabled }