marinofaggiana 4 年之前
父节点
当前提交
dbf78f0458
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      Share/NCShareExtension.swift

+ 3 - 2
Share/NCShareExtension.swift

@@ -439,10 +439,11 @@ class NCShareExtension: UIViewController, NCListCellDelegate, NCEmptyDataSetDele
                         account.active = false
                     }
                 }
-                // reorder
                 
                 vcAccountRequest.activeAccount = self.activeAccount
-                vcAccountRequest.accounts = accounts
+                vcAccountRequest.accounts = accounts.sorted { (sorg, dest) -> Bool in
+                    return sorg.active && !dest.active
+                }
                 vcAccountRequest.enableTimerProgress = false
                 vcAccountRequest.enableAddAccount = false
                 vcAccountRequest.delegate = self