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