mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-06-22 14:13:49 +08:00
fix(sync): resolve restore item edge cases
This commit is contained in:
+5
-4
@@ -1583,12 +1583,13 @@ const openRestoreFromAccount = async (): Promise<void> => {
|
||||
|
||||
const installCloudItems = (items: SyncedAppListItem[]): void => {
|
||||
for (const item of items) {
|
||||
const app = apps.value.find(
|
||||
const candidates = apps.value.filter(
|
||||
(candidate) =>
|
||||
candidate.pkgname === item.pkgname &&
|
||||
candidate.origin === item.origin &&
|
||||
candidate.category === item.category,
|
||||
candidate.pkgname === item.pkgname && candidate.origin === item.origin,
|
||||
);
|
||||
const app =
|
||||
candidates.find((candidate) => candidate.category === item.category) ??
|
||||
candidates[0];
|
||||
if (!app) continue;
|
||||
void onDetailInstall(app);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user