mirror of
https://github.com/areteruhiro/LIME-beta-hiro.git
synced 2025-02-22 02:39:34 +09:00
Update EmbedOptions.java
リストアの際の重複がしないように改良
This commit is contained in:
@ -580,10 +580,19 @@ public class EmbedOptions implements IHook {
|
|||||||
String parameter = cursor.getString(cursor.getColumnIndex("parameter"));
|
String parameter = cursor.getString(cursor.getColumnIndex("parameter"));
|
||||||
byte[] chunks = cursor.getBlob(cursor.getColumnIndex("chunks"));
|
byte[] chunks = cursor.getBlob(cursor.getColumnIndex("chunks"));
|
||||||
|
|
||||||
// server_idがnullの場合はスキップ
|
if (serverId == null) {
|
||||||
if (serverId == null) {
|
continue;
|
||||||
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を使用してデータを挿入
|
||||||
ContentValues values = new ContentValues();
|
ContentValues values = new ContentValues();
|
||||||
|
Reference in New Issue
Block a user