Skip to content

Conversation

Abdirahmanslaa
Copy link

This pull request introduces a "Confirm Password" step in the Anti-Uninstall setup process for enhanced user experience and includes several string resource fixes for improved localization and build stability. Its purpose is to help prevent typos and errors by having users enter their chosen password twice, ensuring the typed versions match before setting up Anti-install mode.

Key Features & Changes:

  1. Implemented Confirm Password Functionality:
    •Modified nethical/digipaws/ui/fragments/anti_uninstall/SetupPasswordModeFragment.kt:
    •Added logic to handle a new "Confirm Password" input field.
    •Implemented validation to ensure:
    •Password is not empty.
    •Confirm Password is not empty.
    •Password and Confirm Password match.
    •Updated UI interactions to display error messages for the new validation rules
    •Modified layout/fragment_setup_password_mode.xml:
    •Added a TextInputLayout and TextInputEditText for the "Confirm Password" field.
    •Added New String Resources to values/strings.xml (and presumably their translations would be needed):
    •confirm_password: For the "Confirm Password" hint/label.
    •password_cannot_be_empty: Error message.
    •confirm_password_cannot_be_empty: Error message.
    •passwords_do_not_match: Error message.
    •block_making_changes_to_blockers_during_this_period: For the checkbox in SetupPasswordModeFragment.

  2. Corrected String Formatting for end_time and start_time_02d_02d:
    •Added proper positional argument indexing (e.g., %1$02d:%2$02d) to these strings in:•app/src/main/res/values/strings.xml (Default English)
    •app/src/main/res/values-tr/strings.xml (Turkish)
    •app/src/main/res/values-zh-rCN/strings.xml (Chinese - Simplified)
    •This ensures the correct display of times across different languages.

  3. Resolved Build Error for todays_stats in values/strings.xml:
    •The string "Today's Stats" was causing an "Invalid unicode escape sequence" build error.
    •The string was changed to "Todays Stats" (apostrophe removed) which resolved the build failure.

  4. Updated Farsi Translations (values-fa/strings.xml):
    •Added the missing Farsi translation for if_you_enable_this_you_won_t_be_able_to_change_configurations_such_as_adding_blocked_apps_keywords_and_more.•Confirmed existing translations for todays_stats, end_time, and start_time_02d_02d were correctly formatted.

Reasoning for Changes:
•The "Confirm Password" feature significantly improves the usability and error-prevention of the Anti-Uninstall setup.
•The string formatting corrections are crucial for proper localization.
•The fix for todays_stats was necessary for a successful application build.
•The Farsi translation update enhances localization.
•Defining all UI strings in resource files makes the codebase more robust.
These changes enhance a key security feature and improve the overall quality and stability of the app.

 Its purpose is to help prevent typos and errors by having users enter their chosen password twice, ensuring the typed versions match before setting up Anti-install mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant