michael-mosler / Pius-App-for-Android

GNU General Public License v3.0
1 stars 0 forks source link

[BUG] App crashes when clicking a staff email #53

Open Th3Ph4nt0m opened 3 years ago

Th3Ph4nt0m commented 3 years ago

Describe the bug The App crashes when clicking on a staff email in the staff popover.

To Reproduce Steps to reproduce the behavior:

  1. Go to the Vertretungsplan
  2. Long-click on a teachers short name
  3. Click on the email field
  4. See error

Expected behavior The default email app should open with the address set.

Screenshots /

Smartphone (please complete the following information):

Additional context /

Christoph309 commented 3 years ago

The app crashes only when clicking the email in the staff popover of the Dashboard.

michael-mosler commented 2 years ago

Fixed the issue. DashboardFragment passed app context to dashboard list adapter. App context is not an activity. Instead getActivity() must be passed.

mDashboardListAdapter = new DashboardListAdapter(pius_app_for_android.getAppContext(), listDataHeader, listDataChild);

replaced by

mDashboardListAdapter = new DashboardListAdapter(getActivity(), listDataHeader, listDataChild);

Will push this directly to develop, update patch level and then release.