Skip to content

DROID-3763 App | Fix | Safe dismiss request to join screen #2581

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

Merged
merged 3 commits into from
Jun 27, 2025

Conversation

konstantiniiv
Copy link
Collaborator

@konstantiniiv konstantiniiv commented Jun 27, 2025


  • I understand that contributing to this repository will require me to agree with the CLA

Description

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 tech-docs
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

@konstantiniiv konstantiniiv self-assigned this Jun 27, 2025
@konstantiniiv konstantiniiv requested a review from uburoiubu as a code owner June 27, 2025 09:51
@konstantiniiv konstantiniiv requested a review from Copilot June 27, 2025 09:51
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the issue with dismissing the RequestJoinSpaceFragment in scenarios where the fragment may not be in the proper state, thereby preventing IllegalStateException crashes. Key changes include:

  • Replacing direct dismiss() calls with a safeDismiss() method.
  • Adding unit tests to verify the existence, accessibility, and correct implementation of safeDismiss().
  • Enhancing documentation for the safeDismiss() method.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
app/src/main/java/com/anytypeio/anytype/ui/multiplayer/RequestJoinSpaceFragment.kt Replaces dismiss() calls with safeDismiss() and adds its implementation.
app/src/test/java/com/anytypeio/anytype/ui/multiplayer/RequestJoinSpaceFragmentSafeDismissTest.kt Introduces tests verifying safeDismiss() existence and its access modifier, along with fragment instantiation verification.
Comments suppressed due to low confidence (1)

app/src/main/java/com/anytypeio/anytype/ui/multiplayer/RequestJoinSpaceFragment.kt:350

  • Consider adding tests for the safeDismiss behavior when the fragment is not in a valid state for dismissal, ensuring that the fallback logging occurs as expected.
    private fun safeDismiss() {

@konstantiniiv konstantiniiv merged commit 1294d88 into main Jun 27, 2025
3 checks passed
@konstantiniiv konstantiniiv deleted the droid-3763-sentry-update-73025 branch June 27, 2025 09:59
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants