Skip to content

DROID-3772 Navigation | Get rid of legacy isChatAllowed logic #2589

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 30, 2025

Conversation

konstantiniiv
Copy link
Collaborator

@konstantiniiv konstantiniiv commented Jun 30, 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 30, 2025
@konstantiniiv konstantiniiv requested a review from uburoiubu as a code owner June 30, 2025 08:05
@konstantiniiv konstantiniiv requested a review from Copilot June 30, 2025 08:05
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 removes the legacy ChatConfig.isChatAllowed logic used in navigation flows and simplifies chat condition checks.

  • Removed ChatConfig dependency and its usages in VaultViewModel, SplashViewModel, and SplashFragment.
  • Updated navigation logic to rely solely on the existence of a chat value and UX type checks.
  • Eliminated the legacy ChatConfig implementation from the configuration file.

Reviewed Changes

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

File Description
presentation/src/main/java/com/anytypeio/anytype/presentation/vault/VaultViewModel.kt Removed ChatConfig check and added debug logging for current space and chat details.
presentation/src/main/java/com/anytypeio/anytype/presentation/splash/SplashViewModel.kt Removed ChatConfig condition in the navigation flow and streamlined the chat logic.
presentation/src/main/java/com/anytypeio/anytype/presentation/confgs/Confgs.kt Removed legacy ChatConfig.isChatAllowed function and related configuration.
app/src/main/java/com/anytypeio/anytype/ui/splash/SplashFragment.kt Removed ChatConfig usage in navigation blocks and simplified chat null checks.
Comments suppressed due to low confidence (1)

app/src/main/java/com/anytypeio/anytype/ui/splash/SplashFragment.kt:175

  • [nitpick] Ensure that the updated navigation condition (now checking only for a null chat) aligns with the intended user flow, and update existing tests if necessary to cover this behavior.
                    val chat = command.chat

@konstantiniiv konstantiniiv merged commit 7edb7cf into main Jun 30, 2025
3 checks passed
@konstantiniiv konstantiniiv deleted the droid-3772-integrate-v0420-rc8-spaceux branch June 30, 2025 13:44
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 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