[PR #6629] [MERGED] fix: crash on delete button press caused by GoRouter #7497

Closed
opened 2026-03-23 23:19:53 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/6629
Author: @rensawamo
Created: 10/27/2024
Status: Merged
Merged: 10/28/2024
Merged by: @LucasXu0

Base: mainHead: main


📝 Commits (2)

  • 98557a2 fix: crash on delete button press caused by GoRouter
  • ccf193c fix: gorouter pop

📊 Changes

2 files changed (+67 additions, -60 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/mobile/presentation/base/view_page/more_bottom_sheet.dart (+65 -60)
📝 frontend/appflowy_flutter/lib/workspace/application/view/view_bloc.dart (+2 -0)

📄 Description

I identified an issue where the iOS app would crash due to a GoRouter error when attempting to return to the home screen after deleting a workspace. This pull request includes a fix for the bloc to handle the navigation correctly, ensuring a smooth transition back to the home screen without errors.

IOS app is being released and needs to be resolved as soon as possible!

https://github.com/user-attachments/assets/2b3c793f-5033-4c84-946f-6cf4d24bb42c

FlutterError (Looking up a deactivated widget's ancestor is unsafe.
At this point the state of the widget's element tree is no longer stable.
To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method.)

Fixes:

https://github.com/user-attachments/assets/16c0cb45-1549-44f8-83fd-75b244241bd8

Resolved GoRouter crash by updating the bloc logic to manage navigation properly upon workspace deletion.

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/6629 **Author:** [@rensawamo](https://github.com/rensawamo) **Created:** 10/27/2024 **Status:** ✅ Merged **Merged:** 10/28/2024 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`98557a2`](https://github.com/AppFlowy-IO/AppFlowy/commit/98557a23d6fcdc7a99ac455c9bd74613967180be) fix: crash on delete button press caused by GoRouter - [`ccf193c`](https://github.com/AppFlowy-IO/AppFlowy/commit/ccf193c77096bef083926d93061d60f278c6e44c) fix: gorouter pop ### 📊 Changes **2 files changed** (+67 additions, -60 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/mobile/presentation/base/view_page/more_bottom_sheet.dart` (+65 -60) 📝 `frontend/appflowy_flutter/lib/workspace/application/view/view_bloc.dart` (+2 -0) </details> ### 📄 Description I identified an issue where the iOS app would crash due to a GoRouter error when attempting to return to the home screen after deleting a workspace. This pull request includes a fix for the bloc to handle the navigation correctly, ensuring a smooth transition back to the home screen without errors. IOS app is being released and needs to be resolved as soon as possible! https://github.com/user-attachments/assets/2b3c793f-5033-4c84-946f-6cf4d24bb42c ```sh FlutterError (Looking up a deactivated widget's ancestor is unsafe. At this point the state of the widget's element tree is no longer stable. To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method.) ``` ## Fixes: https://github.com/user-attachments/assets/16c0cb45-1549-44f8-83fd-75b244241bd8 Resolved GoRouter crash by updating the bloc logic to manage navigation properly upon workspace deletion. #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [x] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [x] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:19:53 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#7497
No description provided.