1
0
mirror of https://github.com/areteruhiro/LIME-beta-hiro.git synced 2025-02-21 02:09:34 +09:00

Update EmbedOptions.java

リストアの際の重複がしないように改良
This commit is contained in:
areteruhiro
2024-10-17 20:10:24 +09:00
committed by GitHub
parent 097d7d0987
commit d4fcfd9d67

View File

@ -580,10 +580,19 @@ public class EmbedOptions implements IHook {
String parameter = cursor.getString(cursor.getColumnIndex("parameter"));
byte[] chunks = cursor.getBlob(cursor.getColumnIndex("chunks"));
// server_idがnullの場合はスキップ
if (serverId == null) {
continue;
}
if (serverId == null) {
continue;
}
Cursor existingCursor = originalDb.rawQuery("SELECT 1 FROM chat_history WHERE server_id = ?", new String[]{serverId});
boolean recordExists = existingCursor.moveToFirst();
existingCursor.close();
if (recordExists) {
continue;
}
// ContentValuesを使用してデータを挿入
ContentValues values = new ContentValues();