consistent naming

This commit is contained in:
likeazir 2024-11-13 17:52:01 +01:00
parent 6779b5cc43
commit be82274bee

View File

@ -384,7 +384,7 @@ public class AccountSessionManager{
private void readInstanceInfo(SQLiteDatabase db, Set<String> domains){ private void readInstanceInfo(SQLiteDatabase db, Set<String> domains){
for(String domain : domains){ for(String domain : domains){
final int maxEmojiLength=500000; final int maxEmojiLength=500000;
try(Cursor cursor=db.rawQuery("SELECT domain, instance_obj, substring(emojis,0,?) AS emojis, length(emojis) AS emojiLength, last_updated, version FROM instances WHERE `domain` = ?", try(Cursor cursor=db.rawQuery("SELECT domain, instance_obj, substring(emojis,0,?) AS emojis, length(emojis) AS emoji_length, last_updated, version FROM instances WHERE `domain` = ?",
new String[]{String.valueOf(maxEmojiLength) , domain})) { new String[]{String.valueOf(maxEmojiLength) , domain})) {
ContentValues values=new ContentValues(); ContentValues values=new ContentValues();
while(cursor.moveToNext()){ while(cursor.moveToNext()){
@ -398,7 +398,7 @@ public class AccountSessionManager{
StringBuilder emojiSB=new StringBuilder(); StringBuilder emojiSB=new StringBuilder();
emojiSB.append(values.getAsString("emojis")); emojiSB.append(values.getAsString("emojis"));
//get emoji in chunks of 1MB if it didn't fit in the first query //get emoji in chunks of 1MB if it didn't fit in the first query
int emojiStringLength=values.getAsInteger("emojiLength"); int emojiStringLength=values.getAsInteger("emoji_length");
if(emojiStringLength>maxEmojiLength){ if(emojiStringLength>maxEmojiLength){
final int pagesize=1000000; final int pagesize=1000000;
for(int start=maxEmojiLength; start<emojiStringLength; start+=pagesize){ for(int start=maxEmojiLength; start<emojiStringLength; start+=pagesize){