Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup.rs to refactor window and view setup logic #1374

Open
wants to merge 1 commit into
base: v2-dev
Choose a base branch
from

Commits on Aug 24, 2024

  1. Update setup.rs to refactor window and view setup logic

    In this commit, significant updates were made to the `setup.rs` file to enhance its organization and maintainability. The main improvements are:
    
    - **Refactored View Setup**: The code to set up views for macOS and non-macOS platforms has been separated into distinct functions (`setup_macos_views` and `setup_non_macos_views`). This reduces code duplication and makes it easier to manage platform-specific configurations.
    
    - **Download Event Handling**: The logic for handling file downloads has been moved into a new `handle_download_event` function. This helps isolate download handling from the main setup logic and improves readability.
    
    - **Error Handling**: Improved error handling by making use of `Result` and handling potential errors gracefully. Unwrapping has been replaced with more robust error handling mechanisms.
    
    - **Comments and Documentation**: Added comments to explain complex sections of the code and provide context for future maintainers.
    
    These changes aim to improve the clarity of the code and make future modifications easier. They also address potential issues with error handling and improve the overall robustness of the application setup.
    imsharukh1994 authored Aug 24, 2024
    Configuration menu
    Copy the full SHA
    0c46120 View commit details
    Browse the repository at this point in the history