Fix notifications arriving on foreground after accepting invite (#361)
* fix: notifications arriving on foreground * docs: update changelog
This commit is contained in:
@@ -95,5 +95,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Sanitize malformed UTF-16 in user metadata to prevent rendering crashes [PR #234](https://github.com/marmot-protocol/whitenoise/pull/234)
|
||||
- Lock app orientation to portrait mode [PR #235](https://github.com/marmot-protocol/whitenoise/pull/235)
|
||||
- Fix camera permission flow [PR #194](https://github.com/marmot-protocol/sloth/pull/194)
|
||||
- Fix notifications arriving on foreground after accepting invite [PR #361](https://github.com/marmot-protocol/whitenoise/pull/361)
|
||||
|
||||
### Security
|
||||
|
||||
@@ -14,7 +14,7 @@ void useActiveChat({
|
||||
setActiveChat(groupId);
|
||||
cancelGroupNotifications(groupId);
|
||||
});
|
||||
return () => Future.microtask(clearActiveChat);
|
||||
return null;
|
||||
}, [groupId]);
|
||||
|
||||
useOnAppLifecycleStateChange((previous, current) {
|
||||
|
||||
@@ -151,7 +151,9 @@ void main() {
|
||||
expect(cancelNotificationsCalls, ['group123']);
|
||||
});
|
||||
|
||||
testWidgets('clears active chat on unmount', (tester) async {
|
||||
testWidgets('does not clear active chat on unmount to prevent navigation race condition', (
|
||||
tester,
|
||||
) async {
|
||||
await mountHook(tester, () {
|
||||
useActiveChat(
|
||||
groupId: 'group123',
|
||||
@@ -169,7 +171,7 @@ void main() {
|
||||
await tester.pump();
|
||||
|
||||
expect(setActiveChatCalls, isEmpty);
|
||||
expect(clearActiveChatCallCount, 1);
|
||||
expect(clearActiveChatCallCount, 0);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user