mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Add more logging for chat folders during storage sync.
This commit is contained in:
@@ -171,6 +171,7 @@ class ChatFolderTables(context: Context?, databaseHelper: SignalDatabase?) : Dat
|
|||||||
*/
|
*/
|
||||||
fun getChatFolder(id: Long?): ChatFolderRecord? {
|
fun getChatFolder(id: Long?): ChatFolderRecord? {
|
||||||
if (id == null) {
|
if (id == null) {
|
||||||
|
Log.w(TAG, "Chat folder id was null")
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
val includedChats: Map<Long, List<Long>> = getIncludedChats(id)
|
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 encodedKey = cursor.requireNonNullString(ChatFolderTable.STORAGE_SERVICE_ID)
|
||||||
val key = Base64.decodeOrThrow(encodedKey)
|
val key = Base64.decodeOrThrow(encodedKey)
|
||||||
StorageId.forChatFolder(key)
|
StorageId.forChatFolder(key)
|
||||||
}
|
}.also { Log.i(TAG, "${it.size} folders have storage ids.") }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -529,7 +529,7 @@ class StorageSyncJob private constructor(parameters: Parameters, private var loc
|
|||||||
if (chatFolderRecord?.chatFolderId != null) {
|
if (chatFolderRecord?.chatFolderId != null) {
|
||||||
records.add(StorageSyncModels.localToRemoteRecord(chatFolderRecord, id.raw))
|
records.add(StorageSyncModels.localToRemoteRecord(chatFolderRecord, id.raw))
|
||||||
} else {
|
} else {
|
||||||
throw MissingChatFolderModelError("Missing local chat folder model!")
|
throw MissingChatFolderModelError("Missing local chat folder model! Type: " + id.type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user