Add debug logging to _persistReaction to track API response data
This commit is contained in:
parent
558272c9a2
commit
681b5b85f9
|
|
@ -871,17 +871,23 @@ class _ThreadedConversationScreenState extends ConsumerState<ThreadedConversatio
|
|||
if (!mounted) return;
|
||||
final updatedCounts = response['reactions'] as Map<String, dynamic>?;
|
||||
final updatedMine = response['my_reactions'] as List<dynamic>?;
|
||||
|
||||
print('DEBUG: Toggle reaction response: $response');
|
||||
print('DEBUG: updatedCounts: $updatedCounts');
|
||||
print('DEBUG: updatedMine: $updatedMine');
|
||||
|
||||
if (updatedCounts != null) {
|
||||
setState(() {
|
||||
_reactionCountsByPost[postId] = updatedCounts
|
||||
.map((key, value) => MapEntry(key, value as int));
|
||||
print('DEBUG: Updated local reaction counts: ${_reactionCountsByPost[postId]}');
|
||||
});
|
||||
}
|
||||
if (updatedMine != null) {
|
||||
setState(() {
|
||||
_myReactionsByPost[postId] =
|
||||
updatedMine.map((item) => item.toString()).toSet();
|
||||
print('DEBUG: Updated local my reactions: ${_myReactionsByPost[postId]}');
|
||||
});
|
||||
}
|
||||
} catch (_) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue