Set a maximum frequency for playing sounds #355
No reviewers
Labels
No Label
bug
build
dependencies
developers
documentation
duplicate
enhancement
formatting
invalid
legal
mobile
obsolete
packaging
performance
protocol
question
refactoring
regression
security
test
translation
usability
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Bitmessage/PyBitmessage-2024-12-16#355
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This avoids a lot of repeated "you've got mail" if you have multiple messages arrive on startup.
self.lastSoundTime = datetime.datetime.now()
should be called when the sound is actually played, not when it might be played. Otherwise, a message every 30 seconds will keep sounds from ever being played, rather than the intended result of having a sound played at maximum every 60 seconds.I think.
I wrote it deliberately that way so that the time is reset whenever a message is received. That way if you have a lot of messages being received a sound will only be played if a new message comes in 60 seconds after the last message was received. I can alter that though and make the time shorter or longer.