Commit graph

5757 commits

Author SHA1 Message Date
Hafiz
d1f7012540 Improve handling of invalid login credentials.
Adds a check for "There is no account that uses those
credentials" to the list of error messages that trigger a logout.
2025-07-03 16:05:06 -05:00
Hafiz
f7f8bb841c Removes redundant authentication check
Removes a redundant check for "There is no account that uses
those credentials" as it's already covered by other checks,
simplifying the logic for handling invalid credentials and
preventing unnecessary code execution.
2025-07-03 15:12:06 -05:00
Hafiz
f56cecc775 Merge branch '4.7.8-dev' 2025-07-03 14:25:23 -05:00
Hafiz
a3795cd31c Merge branch 'main' into 4.7.8-dev 2025-07-03 14:25:12 -05:00
Weblate
39a33b144a Translated using Weblate (French)
Currently translated at 99.0% (1543 of 1558 strings)

Co-authored-by: Sophie LE MASLE <sophiesuff@gmail.com>
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/fr/
Translation: Habitica Android/Main Strings
2025-07-03 17:02:52 +02:00
Weblate
25fde3b123 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (1558 of 1558 strings)

Co-authored-by: Summer_GUI <heyang94@163.com>
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/zh_Hans/
Translation: Habitica Android/Main Strings
2025-07-03 02:58:31 +02:00
Hafiz
6d076888a1 Handles group plans in unauthorized error check 2025-07-02 15:50:26 -05:00
Hafiz
f544f89c3a Revert "Simplifies authentication failure check"
This reverts commit df444b4347.
2025-07-02 15:44:01 -05:00
Hafiz
df444b4347 Simplifies authentication failure check
Removes a redundant check for invalid credentials during authentication failure, streamlining the logic.
2025-07-02 15:18:12 -05:00
Hafiz
a94d9437f3 Merge branch 'fix/logout-when-unauthenticated' into 4.7.8-dev 2025-07-02 15:09:49 -05:00
Hafiz
31e58b6d16 Removes redundant authentication check 2025-07-02 14:12:59 -05:00
Weblate
61849c2d3c Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/
Translation: Habitica Android/Main Strings
2025-07-02 20:30:36 +02:00
Hafiz
e5d3ed8c99 Merge branch 'fix/logout-when-unauthenticated' 2025-07-02 13:30:04 -05:00
Hafiz
55132e0c57 Handle specific 401 errors by logging out the user
Adds logic to check the error message from the API response
when a 401 error is received. If the error indicates
invalid credentials or missing authentication headers, the
user is automatically logged out.
2025-07-02 13:29:27 -05:00
Hafiz
8de67c8416 Update UserAuthResponse to a data class
Refactors UserAuthResponse to a data class for better
data handling and immutability.
2025-07-02 11:59:28 -05:00
Weblate
b88c5be79f Translated using Weblate (German)
Currently translated at 95.1% (1465 of 1540 strings)

Translated using Weblate (German)

Currently translated at 95.1% (1465 of 1540 strings)

Translated using Weblate (German)

Currently translated at 95.1% (1465 of 1540 strings)

Co-authored-by: Fabjan Sukalia <fsukalia@gmail.com>
Co-authored-by: Oliver Jeute <ojeute@freenet.de>
Co-authored-by: Phillip Thelen <phillip@habitica.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/de/
Translation: Habitica Android/Main Strings
2025-07-02 17:36:29 +02:00
Weblate
5f421dc03d Merge branch 'main' of github.com:HabitRPG/habitica-android into main 2025-07-02 15:54:10 +02:00
Omer I.S
11734cbcbe Translated using Weblate (Hebrew)
Currently translated at 23.6% (364 of 1540 strings)

Translation: Habitica Android/Main Strings
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/he/
2025-07-02 14:45:36 +02:00
Mars K
e4a7f72c07 Translated using Weblate (German)
Currently translated at 82.7% (1274 of 1540 strings)

Translation: Habitica Android/Main Strings
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/de/
2025-07-02 14:45:36 +02:00
Fabjan Sukalia
f4bca8be4a Translated using Weblate (German)
Currently translated at 82.7% (1274 of 1540 strings)

Translation: Habitica Android/Main Strings
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/de/
2025-07-02 14:45:35 +02:00
Mars K
7505e601e0 Translated using Weblate (German)
Currently translated at 82.4% (1269 of 1540 strings)

Translation: Habitica Android/Main Strings
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/de/
2025-07-02 12:27:17 +02:00
Fabjan Sukalia
a8f0f0db4c Translated using Weblate (German)
Currently translated at 82.4% (1269 of 1540 strings)

Translation: Habitica Android/Main Strings
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/de/
2025-07-02 12:27:17 +02:00
Hafiz
28fc07d364 Handle revoked API token and displays success message
- Logs the user out if the API token has been revoked elsewhere

(also)
- Copy Token
- Show success message when password has been changed
2025-07-01 22:06:48 -05:00
Hafiz
bf5b0bc315 Improve empty state handling in inbox message list
Add logic to display an empty state in the inbox message
list when there are no messages to display. Also adds
margins to the chat intro item.
2025-07-01 13:15:07 -05:00
Hafiz
fff6e76052 Add customization shop support for animal tails/ears
handle animal ears and tails on purchase dialog.

Adds a new AvatarView layer type for back and head accessories.
2025-07-01 12:56:22 -05:00
Hafiz
2f7df36d98 Auto-populate display name setting, move About me edittext at top/start
Auto-populate account preference "Change display name" field
Make "About Me" edit text field to start at top/start.
2025-06-30 11:49:48 -05:00
Hafiz
4249220f2e Add image file format for mount
Add entries to the file format map for the new Hydra mount
assets
2025-06-27 13:35:39 -05:00
Hafiz
d83e091088 Populates settings forms with initial user data
Populates the change email, username, about me, and photo URL
settings forms with the user's current data.

 Also, prevent SettingsFormBottomSheet from appearing blank during configuration changes by retaining the instance.
2025-06-27 11:49:13 -05:00
fitria nabila
af89a21427 Translated using Weblate (Indonesian)
Currently translated at 75.1% (1158 of 1540 strings)

Translation: Habitica Android/Main Strings
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/id/
2025-06-27 11:37:37 +02:00
fitria nabila
9b4b6b9005 Translated using Weblate (Indonesian)
Currently translated at 74.3% (1145 of 1540 strings)

Translation: Habitica Android/Main Strings
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/id/
2025-06-27 06:11:54 +02:00
Hafiz
971bf37374 Use Compose bottom‐sheet forms for all account preference dialogs
Introduce SettingsFormBottomSheet to host any ConfigurableFormScreen (ChangePassword, ChangeEmail, ChangeUsername, ChangeDisplayName, AboutMe, PhotoUrl)

Replace all legacy ValidatingEditText + HabiticaAlertDialog flows with Compose screens in a full-screen bottom sheet

Wire each show…Dialog() in AccountPreferencesFragment to instantiate the sheet, assign its content lambda, invoke existing repository calls (e.g. updatePassword, updateEmail, etc.), dismiss the sheet, and update preference summaries via configurePreference(...)

Preserve keyboard dismissal, viewModel.saveTokens, and “forgot password” callbacks exactly as before
2025-06-26 16:09:32 -05:00
Hafiz
9e17ab09d6 Introduce generic ConfigurableFormScreen for all settings forms
Add FieldConfig and FormScreenConfig data models

Implement ConfigurableFormScreen and ComponentTextInput to render any settings screen with AndroidView inputs, styling, and validation

Refactor ChangePasswordScreen to use the new generic form instead of its bespoke implementation

Preserve existing theming, padding, and error behavior across all screens
2025-06-26 15:19:20 -05:00
Hafiz
4df5a62151 Merge remote-tracking branch 'origin/fix/todo-filter-bug' 2025-06-26 11:53:46 -05:00
Fiz
b8f2853e03
Merge pull request #2159 from HabitRPG/fix/single-root-prefs-fragment
Fix changing display modes in settings creates multiple instances of settings
2025-06-26 11:46:47 -05:00
Hafiz
36ddfa86b5 Fix changing display modes in settings creates multiple instances of settings
- Wrap initial fragment transaction in if (savedInstanceState == null) so if the activity recreates (theme or system UI changes), fragments don’t stack
2025-06-23 14:59:36 -05:00
Karmelkowy
a3e661332f Translated using Weblate (Polish)
Currently translated at 70.1% (1081 of 1540 strings)

Translation: Habitica Android/Main Strings
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/pl/
2025-06-23 21:49:56 +02:00
Phillip Thelen
79e6484ca6 Version bumped to v4.7.7 2025-06-23 16:24:10 +02:00
Phillip Thelen
87a2f147fc bump to 4.7.7 2025-06-23 16:01:15 +02:00
Hafiz
ce2a9df782 Fix to-do's not moving off screen when being checked off
Fix to-do's task fragment showing filter active when none were
2025-06-21 13:57:07 -05:00
Mars K
e89bcd80f6 Translated using Weblate (German)
Currently translated at 82.1% (1265 of 1540 strings)

Translation: Habitica Android/Main Strings
Translate-URL: https://translate.habitica.com/projects/habitica-android/main-strings/de/
2025-06-21 19:25:33 +02:00
Hafiz
05fbb5b359 Feedback fixes
- Change password button always in purple 400
- Fix styling of change password
- Use the existing textinputlayout (textbox) behavior
- Show error when changing password (without closing the sheet)
- Use transparent white nav bar on API token bottom sheet on day/light mode
2025-06-20 11:28:39 -05:00
Phillip Thelen
f4484ea9d1 fix merge 2025-06-19 15:12:22 +02:00
Hafiz
b568223c60 Fix crash that occurs when changing day/night mode on API Token bottom sheet 2025-06-18 17:34:09 -05:00
Hafiz
145de783fb - Update the token sheet to use the handle style/spacing from pause damage
- Update Pause/Resume damage view title/description spacings
- Update Pasue/Resume damage header font styling

(Also added a preview for pause/resume damage compose)
2025-06-18 17:25:55 -05:00
Hafiz
3268cc0b80 Update lock icon on api token bottomsheet 2025-06-18 17:02:07 -05:00
Hafiz
8660fab3e9 Unify button height to match stable
Updated pause damage and copy token buttons to match stable button height
2025-06-18 16:58:51 -05:00
Hafiz
69d39a6f54 Password reset screen feedback fixes
- Match password reset screen textbox styling
- Update styling of the explanation text to match designs
- Don't disable change password button field for now
- Transparent white bottom nav bar when on light mode
- Light mode password input text box colors
2025-06-18 16:42:04 -05:00
Hafiz
fc3f1b8ae9 UI Tweaks to api token bottom sheet
- Update handle
- Color tweaks
2025-06-18 14:36:13 +02:00
Hafiz
8b5e827274 API Token bottom sheet small UI Tweak (Button color/button text update) 2025-06-18 14:36:13 +02:00
Hafiz
0944c64e8b Updates API token bottom sheet UI
Changes the background color of the copy token button to yellow.
Dismisses the bottom sheet after copying the token.
2025-06-18 14:36:13 +02:00