Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

App crash navigation drawer fix #1594

Merged

Conversation

kunzef
Copy link
Contributor

@kunzef kunzef commented Jul 6, 2023

Issue

This fixes the following issue(s):

Description of the fix

The error source of #1589 is the difference between the System locale and the Application locale. Somehow the Campus-App fails to correctly set its own Application locale. This leads to the crash as the NavigatioDrawer causing it, tries to find the clicked NavItem with a localized String resource. For example see this part of code from the NavigationDrawer menuItem.title == activity.getString(HOME.titleRes) here menuItem.title is based in the Application locale where under certain cirqumstances activity.getString() uses the System locale. It uses the System locale after any of the NavItem.ActivityDestination has been opened.

Why this is useful for all students

While it does not solve the underlying problem it still prevents the App from crashing and thus is at least a bit.

Further todos

The main problem causing this other problems and #1585 as well as maybe others is not solved with this. In regards to this I have openend the issue #1593 See there for further details.

Copy link
Contributor

@tobiasjungmann tobiasjungmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me and I was not able to crash the app. The map init calls for loops at the first glance but every solution without the copy past I could come up with would not be that intuitive :D It is a nice solution for a lot of issues!

@tobiasjungmann tobiasjungmann merged commit 6d2c0b1 into TUM-Dev:master Jul 7, 2023
@kunzef kunzef deleted the app-crash-navigation-drawer-fix branch July 7, 2023 12:26
@kunzef kunzef mentioned this pull request Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants