release 0.5.0 #35

Manually merged
Seil0 merged 38 commits from develop into master 2019-09-30 21:28:54 +02:00
2 changed files with 4 additions and 6 deletions
Showing only changes of commit b240beacc9 - Show all commits

View File

@ -150,8 +150,8 @@ class HomeFragment : Fragment() {
for (dayIndex in dayIndexSearch..5) {
dayTimetable = timetables[weekIndexSearch].timetable.days[dayIndex]
// some wired calendar magic, calculate the correct date to be shown ((timetable week - current week * 7) + days of calendar week + 1)
val daysToAdd = (timetables[weekIndexSearch].meta.weekNumberYear - NotRetardedCalendar.getWeekOfYear() - 1) * 7 + dayIndex +1
// some wired calendar magic, calculate the correct date to be shown ((timetable week - current week * 7) + (dayIndex - dayIndex of current week)
val daysToAdd =(timetables[weekIndexSearch].meta.weekNumberYear - NotRetardedCalendar.getWeekOfYear()) * 7 + (dayIndex - NotRetardedCalendar.getDayOfWeekIndex())
dayCardView.addTimetableDay(dayTimetable, daysToAdd)
// if there are no lessons don't show the dayCardView

View File

@ -40,8 +40,6 @@ import org.mosad.seil0.projectlaogai.controller.PreferencesController.Companion.
import org.mosad.seil0.projectlaogai.controller.TCoRAPIController
import org.mosad.seil0.projectlaogai.hsoparser.NotRetardedCalendar
import org.mosad.seil0.projectlaogai.uicomponents.DayCardView
import java.text.SimpleDateFormat
import java.util.*
/**
* The timetable controller class
@ -122,8 +120,8 @@ class TimeTableFragment : Fragment() {
for (dayIndex in startDayIndex..dayEndIndex) {
val dayCardView = DayCardView(context!!)
// some wired calendar magic, calculate the correct date to be shown ((timetable week - current week * 7) + days of calendar week + 1)
val daysToAdd = (timetableMeta.weekNumberYear - NotRetardedCalendar.getWeekOfYear() - 1) * 7 + dayIndex +1
// some wired calendar magic, calculate the correct date to be shown ((timetable week - current week * 7) + (dayIndex - dayIndex of current week)
val daysToAdd =(timetableMeta.weekNumberYear - NotRetardedCalendar.getWeekOfYear()) * 7 + (dayIndex - NotRetardedCalendar.getDayOfWeekIndex())
dayCardView.addTimetableDay(timetable.days[dayIndex], daysToAdd)
// if there are no lessons don't show the dayCardView