ZIm/crates/recent_projects/src
张小白 a5fe6d1e61
History manager (#26369)
While working on implementing `add_recent_documents` for Windows, I
found that the process is significantly more complex compared to macOS.
On macOS, simply registering the `add_recent_documents` function is
enough, as the system handles everything automatically.

On Windows, however, there are two cases to consider:  
- **Files opened by the app**: These appear in the "Recent" section (as
shown in the screenshot, "test.txt") and are managed automatically by
Windows (by setting windows registry), similar to macOS.

![屏幕截图 2025-03-10
230738](https://github.com/user-attachments/assets/8fc8063b-4369-43cc-aaaf-7370a7d27060)


- **Folders opened by the app**: This is more complicated because
Windows does not handle it automatically, requiring the application to
track opened folders manually.

To address this, this PR introduces a `History Manager` along with
`HistoryManagerEvent::Update` and `HistoryManagerEvent::Delete` events
to simplify the process of managing recently opened folders.



https://github.com/user-attachments/assets/a2581c15-7653-4faf-96b0-7c48ab1dcc8d



Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2025-04-11 21:34:51 +00:00
..
disconnected_overlay.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
recent_projects.rs History manager (#26369) 2025-04-11 21:34:51 +00:00
remote_servers.rs Remove references to SSH remoting beta (#28399) 2025-04-09 03:26:22 +00:00
ssh_connections.rs markdown: Don't retain MarkdownStyle in favor of using MarkdownElement directly (#28255) 2025-04-07 19:03:24 +00:00