mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Add debug logging and lower threshold for testing push reminders
- Reduced MESSAGE_THRESHOLD from 5 to 2 for easier testing - Added console.log statements to track: - Message counter increments - shouldShowReminder checks and conditions - Git status (uncommitted changes, commits ahead, remotes) - Added useEffect to watch shouldShowReminder changes - Fixed async state update issue by watching effect dependency This will help debug why the reminder dialog may not be appearing.
This commit is contained in:
1 parent
5de01c6130
commit
66a37ec92c
2 files changed
+37
-11
No files matched your search
@@ -113,12 +113,14 @@ export function ProjectView() {
|
||||
// Handle message sent - increment push reminder counter
|
||||
const handleMessageSent = useCallback(() => {
|
||||
pushReminder.incrementMessages();
|
||||
}, [pushReminder]);
|
||||
|
||||
// Check if we should show the reminder
|
||||
if (pushReminder.shouldShowReminder) {
|
||||
// Watch for when we should show the reminder (after state updates)
|
||||
useEffect(() => {
|
||||
if (pushReminder.shouldShowReminder && !isPushReminderOpen) {
|
||||
setIsPushReminderOpen(true);
|
||||
}
|
||||
}, [pushReminder]);
|
||||
}, [pushReminder.shouldShowReminder, isPushReminderOpen]);
|
||||
|
||||
// Handle first user interaction to enable audio context
|
||||
const handleFirstInteraction = () => {
|
||||
|
||||
Reference in new issue
Block a user