-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invitation notifications are not dismissed automatically if room is joined from another client (#347) #583
Conversation
…oined from another client (#347)
ee90060
to
50a0660
Compare
interface PushRuleListener { | ||
fun onMatchRule(event: Event, actions: List<Action>) | ||
fun onRoomJoined(roomId: String) | ||
fun onRoomLeft(roomId: String) | ||
fun onEventRedacted(redactedEventId: String) | ||
fun batchFinish() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is now handling more things that events that matched a push rules, could be renamed to something else? NoteworthyEventListener? ImportantEvents? or something more related to the fact that it will be used by the notification drawer? NotificationActionsListener?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, you are right, we will rename that later
fun dispatchRoomLeft(roomId: String) { | ||
try { | ||
listeners.forEach { | ||
it.onRoomLeft(roomId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should catch inside each iteration and continue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -499,7 +507,8 @@ class NotificationDrawerManager @Inject constructor(private val context: Context | |||
companion object { | |||
private const val SUMMARY_NOTIFICATION_ID = 0 | |||
private const val ROOM_MESSAGES_NOTIFICATION_ID = 1 | |||
private const val ROOM_EVENT_NOTIFICATION_ID = 2 | |||
private const val ROOM_INVITATION_NOTIFICATION_ID = 2 | |||
private const val ROOM_EVENT_NOTIFICATION_ID = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This event was id 2 before. Maybe add the new one as 3 (potential minor migration issue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good catch, thanks
Fixes #347
Also do some cleanup
Notification for an invitation is still incomplete, this is tracked here: #582
Pull Request Checklist