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

Fix crash in message composer when room is missing #7683

Merged
merged 2 commits into from
Dec 2, 2022

Conversation

jonnyandrew
Copy link
Contributor

@jonnyandrew jonnyandrew commented Dec 1, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

  • Handle a missing room safely when starting the message composer
  • Hide the message composer UI when the room is missing
  • Hide the voice recorder UI when the room is missing

Motivation and context

This error was seen before but has been reintroduced during refactoring.

Screenshots / GIFs

Before After
N/A room-error-after

Tests

  • Manually force Session.getRoom() to return null.
  • Open a room
  • Verify no crash and UI looks correct

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 13

Checklist

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 1, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@jonnyandrew jonnyandrew marked this pull request as ready for review December 1, 2022 13:54
@jonnyandrew jonnyandrew requested review from a team and onurays and removed request for a team December 1, 2022 13:54
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing (again!) this issue.

@jonnyandrew jonnyandrew merged commit 20b1eab into develop Dec 2, 2022
@jonnyandrew jonnyandrew deleted the fix/composer-room-error branch December 2, 2022 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants