Add more logging for chat folders during storage sync.

This commit is contained in:
Michelle Tang
2025-04-25 16:11:21 -04:00
parent 9163c0ca4d
commit b6cc702107
2 changed files with 3 additions and 2 deletions

View File

@@ -171,6 +171,7 @@ class ChatFolderTables(context: Context?, databaseHelper: SignalDatabase?) : Dat
*/
fun getChatFolder(id: Long?): ChatFolderRecord? {
if (id == null) {
Log.w(TAG, "Chat folder id was null")
return null
}
val includedChats: Map<Long, List<Long>> = getIncludedChats(id)
@@ -495,7 +496,7 @@ class ChatFolderTables(context: Context?, databaseHelper: SignalDatabase?) : Dat
val encodedKey = cursor.requireNonNullString(ChatFolderTable.STORAGE_SERVICE_ID)
val key = Base64.decodeOrThrow(encodedKey)
StorageId.forChatFolder(key)
}
}.also { Log.i(TAG, "${it.size} folders have storage ids.") }
}
/**

View File

@@ -529,7 +529,7 @@ class StorageSyncJob private constructor(parameters: Parameters, private var loc
if (chatFolderRecord?.chatFolderId != null) {
records.add(StorageSyncModels.localToRemoteRecord(chatFolderRecord, id.raw))
} else {
throw MissingChatFolderModelError("Missing local chat folder model!")
throw MissingChatFolderModelError("Missing local chat folder model! Type: " + id.type)
}
}