Skip to content

Commit

Permalink
update;
Browse files Browse the repository at this point in the history
  • Loading branch information
koiNoCirculation committed Aug 23, 2024
1 parent 1a83fbd commit 5205d9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions AEItemView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -894,11 +894,15 @@ function AEItemView({ route, navigation }) {
})
//console.log(JSON.stringify(fluidInfo));
//[r.item_name, r.amount, r.meta];
let in_query_1 = itemList.map(i => '\'' + i.item_name + '\'');
let querySet = new Set()
itemList.forEach(i => querySet.add('\'' + i.item_name.replace('\'', "''") + '\''));
Object.keys(fluidInfo).forEach((k) => {
in_query_1.push('\'' + fluidInfo[k][0] + '\'');
querySet.add('\'' + fluidInfo[k][0] + '\'');
})
let sql = `select concat(item_name, ':', item_meta) as key, icon, dname from item_panel where item_name in (${in_query_1.join(",")});`;
let tojoin = [];
querySet.forEach(i => tojoin.push(i));
let sql = `select concat(item_name, ':', item_meta) as key, icon, dname from item_panel where item_name in (${tojoin.join(",")});`;
console.log(sql);
db.getAllAsync<{ key: string, icon: Uint8Array, dname: string }>(sql).then(
data => {
setLoadedItem(prevState => {
Expand All @@ -909,7 +913,9 @@ function AEItemView({ route, navigation }) {
return newState;
})
}
);
).catch(e => {
console.log(e);
});
setRawItems(itemList);
console.log("物品页-连接")
setIsConnected(true)
Expand Down Expand Up @@ -1032,7 +1038,7 @@ export default function AEView({ route, navigation }) {
})
setFluidMapping(m);
setReady(true);
})
}).catch(e => console.log(e));
}, [])

function scrOptions({ route }) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aemobile",
"version": "1.0.0",
"version": "1.0.2",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
Expand Down

0 comments on commit 5205d9c

Please sign in to comment.