Closed hcavarsan closed 3 months ago
The recent changes in src/window.rs
for the kftray-tauri
project introduce a validation mechanism for window position coordinates. This ensures that any invalid window positions are reset to a default value. The code has been refactored to separate the validation logic and the reset functionality into distinct functions for better modularity and readability.
Files | Change Summary |
---|---|
crates/kftray-tauri/src/window.rs |
Introduced validation for window position coordinates and refactored the logic into separate functions. Added is_valid_position and reset_to_default_position functions. |
sequenceDiagram
participant User
participant TauriApp
participant Window
User->>TauriApp: Request to set window position
TauriApp->>Window: Validate position (is_valid_position)
alt Position is valid
Window-->>TauriApp: Position is valid
TauriApp->>Window: Set window position
else Position is invalid
Window-->>TauriApp: Position is invalid
TauriApp->>Window: Reset to default position (reset_to_default_position)
end
[!TIP]
Early Access Features
- `gpt-4o` model for chat
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
fix: don't close the app window when the position is invalid.