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