@@ -117,14 +117,21 @@ object SentryDebug {
117
117
// region Send Sentry
118
118
// TODO: Added the 04/09/23. It's not supposed to be possible, but we never know…
119
119
// If this doesn't trigger after a certain amount of time, you can remove it.
120
- fun sendEmptyThread (thread : Thread ) {
120
+ //
121
+ // Also added in ThreadListAdapter the 31/05/24.
122
+ fun sendEmptyThread (thread : Thread , message : String ) = with (thread) {
121
123
Sentry .withScope { scope ->
122
124
scope.setExtra(" currentUserId" , " [${AccountUtils .currentUserId} ]" )
123
125
scope.setExtra(" currentMailboxEmail" , " [${AccountUtils .currentMailboxEmail} ]" )
124
- scope.setExtra(" folder.role" , thread.folder.role?.name.toString())
125
- scope.setExtra(" folder.id" , thread.folder.id)
126
- scope.setExtra(" thread.uid" , " [${thread.uid} ]" )
127
- Sentry .captureMessage(" No Message in the Thread when opening it" , SentryLevel .ERROR )
126
+ scope.setExtra(" folderId" , folderId)
127
+ scope.setExtra(" folder.id" , folder.id)
128
+ scope.setExtra(" folder.role" , folder.role?.name.toString())
129
+ scope.setExtra(" uid" , " [${uid} ]" )
130
+ scope.setExtra(" messages.count" , " ${messages.count()} " )
131
+ scope.setExtra(" duplicates.count" , " ${duplicates.count()} " )
132
+ scope.setExtra(" isFromSearch" , " $isFromSearch " )
133
+ scope.setExtra(" hasDrafts" , " $hasDrafts " )
134
+ Sentry .captureMessage(message, SentryLevel .ERROR )
128
135
}
129
136
}
130
137
0 commit comments