Resolves: #1314 by replacing the old find method with a map
Resolves: #1589
Maybe resolves #1517 as the reason the app crashes when opening the search-function could be the same as in #1589
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.
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.