fix(actually this time): widget displaying wrong day at the top when there are no lessons

This commit is contained in:
pml68 2024-03-04 21:46:24 +01:00
parent f099d3012e
commit 48f6a23a9b

View File

@ -224,6 +224,10 @@ public class WidgetTimetable extends HomeWidgetProvider {
dbManager.close(); dbManager.close();
// get the date of the first lesson
DateTime dt = new DateTime(s.get(retday).getJSONObject(0).getString("Datum"));
retday = dt.getDayOfWeek() - 1;
return retday; return retday;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();