fix no meal info showing if first weeks meals are empty
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
f40c0503c0
commit
1162ec73e5
|
@ -14,8 +14,8 @@ android {
|
|||
applicationId "org.mosad.seil0.projectlaogai"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 30
|
||||
versionCode 6090 // 00.06.090
|
||||
versionName "0.6.1-beta1"
|
||||
versionCode 6091 // 00.06.091
|
||||
versionName "0.6.1-beta2"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
resValue "string", "build_time", buildTime()
|
||||
setProperty("archivesBaseName", "projectlaogai-$versionName")
|
||||
|
@ -63,8 +63,8 @@ android {
|
|||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8'
|
||||
implementation 'androidx.core:core:1.3.1'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
|
||||
implementation 'androidx.core:core:1.3.2'
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
|
||||
|
|
|
@ -61,11 +61,10 @@ class MensaFragment : Fragment() {
|
|||
|
||||
GlobalScope.launch(Dispatchers.Default) {
|
||||
val dayCurrent = if(NotRetardedCalendar.getDayOfWeekIndex() == 6) 0 else NotRetardedCalendar.getDayOfWeekIndex()
|
||||
addWeek(mensaMenu.currentWeek, dayCurrent).join()
|
||||
|
||||
// add the next week
|
||||
addWeek(mensaMenu.nextWeek, 0)
|
||||
}
|
||||
// add the current and next week
|
||||
addWeek(mensaMenu.currentWeek, dayCurrent).join()
|
||||
addWeek(mensaMenu.nextWeek, 0).join()
|
||||
|
||||
// show a info if there are no more menus
|
||||
if (linLayout_Mensa.childCount == 0) {
|
||||
|
@ -75,6 +74,7 @@ class MensaFragment : Fragment() {
|
|||
linLayout_Mensa.addView(txtViewInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* add all menus from dayStart to Friday for a given week
|
||||
|
@ -133,10 +133,10 @@ class MensaFragment : Fragment() {
|
|||
|
||||
// add the refreshed menus
|
||||
val dayCurrent = if (NotRetardedCalendar.getDayOfWeekIndex() == 6) 0 else NotRetardedCalendar.getDayOfWeekIndex()
|
||||
addWeek(mensaMenu.currentWeek, dayCurrent).join()
|
||||
|
||||
// add the next week
|
||||
addWeek(mensaMenu.nextWeek, 0)
|
||||
// add the current and next week
|
||||
addWeek(mensaMenu.currentWeek, dayCurrent).join()
|
||||
addWeek(mensaMenu.nextWeek, 0).join()
|
||||
|
||||
refreshLayout_Mensa.isRefreshing = false
|
||||
|
||||
|
|
Loading…
Reference in New Issue