AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[Bug] the recent views should refresh after switching to another workspace.

Open LucasXu0 opened this issue 1 year ago • 3 comments

Bug Description

The recent views should refresh after switching to another workspace.

How to Reproduce

  • switch to another workspace

Expected Behavior

  • The recent views should refresh after switching to another workspace.

Operating System

Mobile

AppFlowy Version(s)

0.5.6

Screenshots

Screenshot 2024-04-30 at 18 56 39

Additional Context

No response

LucasXu0 avatar Apr 30 '24 10:04 LucasXu0

Because the _isInitialized flag does not reset after switching workspaces, the mobile app always uses the cached version.

LucasXu0 avatar Apr 30 '24 10:04 LucasXu0

We should call getIt<CachedRecentService>().reset() on changing workspace. That should be enough to resolve this.

Xazin avatar Apr 30 '24 10:04 Xazin

How about renaming the fetchRecentViews event to resetRecentViews and call _service.reset() in this event?

LucasXu0 avatar Apr 30 '24 11:04 LucasXu0