mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-17 08:05:51 +01:00
## Summary of Refactoring ### 1. **Common File** (`jumplist.go`) - Contains all shared structs: `JumpListItemType`, `JumpListItem`, `JumpListCategory`, and `JumpList` - Implements common methods: `AddCategory()`, `ClearCategories()`, and `Apply()` - The `Apply()` method calls the platform-specific `applyPlatform()` method ### 2. **Platform-Specific Files** - **Windows** (`jumplist_windows.go`): Contains only Windows-specific implementation - COM interface definitions and implementations - `CreateJumpList()` method for windowsApp - `applyPlatform()` method with the actual Windows jumplist logic - **macOS** (`jumplist_darwin.go`): Minimal stub implementation - `CreateJumpList()` method for darwinApp - `applyPlatform()` method that returns nil (no-op) - **Linux** (`jumplist_linux.go`): Minimal stub implementation - `CreateJumpList()` method for linuxApp - `applyPlatform()` method that returns nil (no-op) ### Benefits - **No code duplication**: All common structs and logic are in one place - **Cleaner platform files**: Platform-specific files only contain platform-specific code - **Easier maintenance**: Changes to the API only need to be made in one place - **Type safety**: The common interface ensures all platforms implement the required methods The API remains exactly the same for users, but the implementation is now much cleaner and more maintainable. |
||
|---|---|---|
| .. | ||
| application | ||
| events | ||
| icons | ||
| mac | ||
| w32 | ||