Summary
The General Settings & Profile module serves as the control center for the ScrollLess application. It allows users to customize the app’s appearance (like themes and dark mode), manage essential privacy permissions, and configure how the digital coach interacts with them. Additionally, it provides access to support resources, the developer’s story, and a unique interactive feedback mechanism.How It Works
The settings screen acts as a bridge between the user’s preferences and the app’s internal storage. When a user changes a setting, the app immediately saves this preference and updates the interface to reflect the change.Loading Preferences
When the user opens the Settings screen, the ViewModel retrieves the current configuration from the Repository. This includes visual settings (like Dark Mode), functional settings (like Haptics), and the status of system permissions (like Accessibility access).
Managing Permissions
The app relies on specific Android permissions to function. The settings screen displays a “traffic light” system for these permissions. If a permission is missing (Red), clicking it triggers a system intent to open the specific Android settings page. When the user returns, the app automatically re-checks and updates the status to Granted (Green).
Customizing Appearance
Users can select from various color themes (e.g., Calm Lavender) or use their device’s dynamic colors. When a theme is selected, the ViewModel updates the stored preference, and the entire app redraws itself with the new color palette instantly.
Data Stored
This feature manages a wide variety of user preferences stored locally on the device.| Field | Type | Description |
|---|---|---|
selectedTheme | Enum | The color palette chosen by the user (e.g., CalmLavender). |
isDarkMode | Boolean | Whether the app should force dark mode, light mode, or follow the system. |
hapticsEnabled | Boolean | Controls if the phone vibrates during interactions. |
coachSuggestionsEnabled | Boolean | Determines if the AI coach should offer proactive advice. |
notificationsRetentionDays | Integer | How long notification history is kept before deletion. |
onboardingCompleted | Boolean | Flags if the user has finished the initial setup tutorial. |
Key Components
Settings Screen
The main list displaying all configuration categories, including Appearance, Tracking, and Permissions.
Settings ViewModel
The logic center that holds the current state of switches and handles the logic for exporting/importing data.
Permission Manager
A utility that checks if the app has the necessary Android rights (Accessibility, Usage Stats) to function correctly.
About Screen
A storytelling screen that explains the “Pledge” and the philosophy behind the app, featuring a rotating star animation.