Skip to content
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

feat: Small fixes #241

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion firestore.rules
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ service cloud.firestore {
allow list: if request.auth.uid in resource.data.memberIds;
allow update: if isAccessAllowed(request) && !isUpdatingSubscriptionMetadata(request, resource);
allow delete: if false;
allow create: if isAccessAllowed(request);
allow create: if false;

function isUpdatingSubscriptionMetadata(request, resource) {
return request.resource.data.diff(resource.data).affectedKeys().hasAny(['subscriptionMetadata'])
Expand Down
8 changes: 4 additions & 4 deletions src/app/error-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export class GlobalErrorHandler implements ErrorHandler {

if (chunkFailedMessage.test(errorMessage)) {
this.showErrorToast(
`There was an error while loading parts of the application. Please reload the page.`
error, `There was an error while loading parts of the application. Please reload the page.`
);
} else if (errorMessage?.includes('AppCheck')) {
this.showErrorToast(
`We couldn't verify your identity with AppCheck and therefore your access was automatically blocked. ${error.code}`
error, `We couldn't verify your identity with AppCheck and therefore your access was automatically blocked. ${error.code}`
);
return;
} else if (
Expand All @@ -30,7 +30,7 @@ export class GlobalErrorHandler implements ErrorHandler {
errorMessage?.includes('network-request-failed')
) {
this.showErrorToast(
'Network issue detected. Please check your connection and try again.'
error, 'Network issue detected. Please check your connection and try again.'
);
return;
} else {
Expand All @@ -45,7 +45,7 @@ export class GlobalErrorHandler implements ErrorHandler {
const toastMessage =
message ??
`An error occured, please try again or report this issue. ${
errorMessage ? `The error message is: ${errorMessage.slice(0, 150)}` : ''
errorMessage ? `The error message is: ${errorMessage.slice(0, 300)}` : ''
}`;

const snackbarRef = this.toastService.showMessage(
Expand Down
1 change: 1 addition & 0 deletions src/app/room/room-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ export class RoomDataService {

leaveRoom() {
this.roomSubject.next(undefined);
this.localActiveRound.next(undefined);
this.roomSubscription.unsubscribe();
}

Expand Down
Loading