release version 0.5.1

This commit is contained in:
Jannik 2020-02-05 14:10:45 +01:00
parent 2cb4b72369
commit b186a2e96e
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
8 changed files with 24 additions and 14 deletions

View File

@ -11,7 +11,7 @@ android {
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 29 targetSdkVersion 29
versionCode 15 versionCode 15
versionName "0.5.190" versionName "0.5.1"
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")

View File

@ -30,6 +30,7 @@ import android.nfc.NfcAdapter
import android.nfc.NfcManager import android.nfc.NfcManager
import android.nfc.tech.NfcA import android.nfc.tech.NfcA
import android.os.Bundle import android.os.Bundle
import android.util.Log
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import androidx.appcompat.app.ActionBarDrawerToggle import androidx.appcompat.app.ActionBarDrawerToggle
@ -56,6 +57,7 @@ import kotlin.system.measureTimeMillis
class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListener { class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListener {
private var activeFragment: Fragment = HomeFragment() // the currently active fragment, home at the start private var activeFragment: Fragment = HomeFragment() // the currently active fragment, home at the start
private val className = "MainActivity"
private lateinit var adapter: NfcAdapter private lateinit var adapter: NfcAdapter
private lateinit var pendingIntent: PendingIntent private lateinit var pendingIntent: PendingIntent
@ -173,7 +175,7 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
PreferencesController.load(this) // load the settings, must be finished before doing anything else PreferencesController.load(this) // load the settings, must be finished before doing anything else
CacheController(this) // load the cache CacheController(this) // load the cache
} }
println("startup completed in $startupTime ms") Log.i(className, "startup completed in $startupTime ms")
} }
private fun initAesthetic() { private fun initAesthetic() {

View File

@ -23,6 +23,7 @@
package org.mosad.seil0.projectlaogai.controller package org.mosad.seil0.projectlaogai.controller
import android.content.Context import android.content.Context
import android.util.Log
import com.google.gson.Gson import com.google.gson.Gson
import com.google.gson.GsonBuilder import com.google.gson.GsonBuilder
import com.google.gson.JsonParser import com.google.gson.JsonParser
@ -43,6 +44,7 @@ import kotlin.collections.ArrayList
class CacheController(cont: Context) { class CacheController(cont: Context) {
private val className = "CacheController"
private val context = cont private val context = cont
init { init {
@ -56,7 +58,7 @@ class CacheController(cont: Context) {
// if a) it's monday and the last cache update was on sunday or b) the cache is older than 24hr, update blocking // if a) it's monday and the last cache update was on sunday or b) the cache is older than 24hr, update blocking
if ((currentDay == Calendar.MONDAY && cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) || (currentTime - mensaMenu.meta.updateTime) > 86400) { if ((currentDay == Calendar.MONDAY && cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) || (currentTime - mensaMenu.meta.updateTime) > 86400) {
println("update mensa blocking") Log.i(className, "update mensa blocking")
GlobalScope.launch(Dispatchers.Default) { TCoRAPIController.getMensa(context).join() } GlobalScope.launch(Dispatchers.Default) { TCoRAPIController.getMensa(context).join() }
} }
@ -66,7 +68,7 @@ class CacheController(cont: Context) {
// if a) it`s monday and the last cache update was not on a sunday or b) the cache is older than 24hr, update blocking // if a) it`s monday and the last cache update was not on a sunday or b) the cache is older than 24hr, update blocking
if ((currentDay == Calendar.MONDAY && cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) || (currentTime - timetables[0].meta.updateTime) > 86400) { if ((currentDay == Calendar.MONDAY && cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) || (currentTime - timetables[0].meta.updateTime) > 86400) {
println("updating timetable after sunday!") Log.i(className, "updating timetable after sunday!")
GlobalScope.launch(Dispatchers.Default) { GlobalScope.launch(Dispatchers.Default) {
val threads = listOf( val threads = listOf(
@ -171,7 +173,7 @@ class CacheController(cont: Context) {
* read coursesList, mensa (current and next week), timetable (current and next week) * read coursesList, mensa (current and next week), timetable (current and next week)
* @param courseName the course name (e.g AI1) * @param courseName the course name (e.g AI1)
*/ */
fun readStartCache(courseName: String) { private fun readStartCache(courseName: String) {
readCoursesList(context) readCoursesList(context)
readMensa(context) readMensa(context)
readTimetable(courseName, 0, context) readTimetable(courseName, 0, context)

View File

@ -66,7 +66,7 @@ class NFCMensaCard {
lookAtMe(context, data, settings.value).show() lookAtMe(context, data, settings.value).show()
} }
} catch (ex: Exception) { } catch (ex: Exception) {
Log.i(className,"could not connect to tag", ex) Log.w(className,"could not connect to tag", ex)
} }
} }

View File

@ -82,7 +82,7 @@ class TimeTableFragment : Fragment() {
faBtnAddLesson.setOnClickListener { faBtnAddLesson.setOnClickListener {
MaterialDialog(context!!) MaterialDialog(context!!)
.title(text = "Vorlesung hinzufügen") .title(text = resources.getString(R.string.add_lesson))
.message(text = "wähle einen Studiengang aus:\n\nWähle eine Vorlesung aus: \n\n Diese Funktion ist noch nicht verfügbar") .message(text = "wähle einen Studiengang aus:\n\nWähle eine Vorlesung aus: \n\n Diese Funktion ist noch nicht verfügbar")
.show() .show()
} }

View File

@ -18,20 +18,23 @@
<string name="no_more_food">Diese Woche keine weitere Essensausgabe</string> <string name="no_more_food">Diese Woche keine weitere Essensausgabe</string>
<string name="no_lesson_today">heute keine Vorlesung!</string> <string name="no_lesson_today">heute keine Vorlesung!</string>
<!-- fragment_timetable -->
<string name="add_lesson">Eine Vorlesung hinzufügen</string>
<!-- fragment_settings --> <!-- fragment_settings -->
<string name="info">Info</string> <string name="info">Info</string>
<string name="user">Benutzer</string> <string name="user">Benutzer</string>
<string name="course_desc">Tippen, um den Kurs zu ändern</string> <string name="course_desc">Tippe um den Kurs zu ändern</string>
<string name="about_dialog_heading">Über</string> <string name="about_dialog_heading">Über</string>
<string name="licenses">Lizenzen</string> <string name="licenses">Lizenzen</string>
<string name="theme">Design</string> <string name="theme">Design</string>
<string name="themeLight">Hell</string> <string name="themeLight">Hell</string>
<string name="themeDark">Dunkel</string> <string name="themeDark">Dunkel</string>
<string name="themeBlack">Schwarz</string> <string name="themeBlack">Schwarz</string>
<string name="primary_color">Hauptfarbe</string> <string name="primary_color">Primärfarbe</string>
<string name="primary_color_desc">Die Primärfarbe, Standard ist Schwarz.</string> <string name="primary_color_desc">Zum Ändern tippen, Standard ist Schwarz.</string>
<string name="accent_color">Akzentfarbe</string> <string name="accent_color">Akzentfarbe</string>
<string name="accent_color_desc">Die Akzentfarbe, Standard ist indigo</string> <string name="accent_color_desc">Zum Ändern tippen, Standard ist Indigo.</string>
<string name="show_buffet">Buffet immer anzeigen</string> <string name="show_buffet">Buffet immer anzeigen</string>
<!-- dialogs --> <!-- dialogs -->

View File

@ -20,6 +20,9 @@
<string name="no_more_food">No more Food this week</string> <string name="no_more_food">No more Food this week</string>
<string name="no_lesson_today">"No lecture today!"</string> <string name="no_lesson_today">"No lecture today!"</string>
<!-- fragment_timetable -->
<string name="add_lesson">Add a lesson</string>
<!-- fragment_settings --> <!-- fragment_settings -->
<string name="info">Info</string> <string name="info">Info</string>
<string name="user">User</string> <string name="user">User</string>
@ -34,9 +37,9 @@
<string name="themeDark">Dark</string> <string name="themeDark">Dark</string>
<string name="themeBlack">Black</string> <string name="themeBlack">Black</string>
<string name="primary_color">Primary color</string> <string name="primary_color">Primary color</string>
<string name="primary_color_desc">The primary color, default is black.</string> <string name="primary_color_desc">Tap to change, default is black.</string>
<string name="accent_color">Accent color</string> <string name="accent_color">Accent color</string>
<string name="accent_color_desc">The accent color, default is indigo.</string> <string name="accent_color_desc">Tap to change, default is indigo.</string>
<string name="show_buffet">Always show buffet</string> <string name="show_buffet">Always show buffet</string>
<!-- dialogs --> <!-- dialogs -->

View File

@ -2,4 +2,4 @@ This release 0.5.1 is called "artistical Apollon".
* new: it's now possible to use App shortcuts for the timetable, mensa and moodle screen * new: it's now possible to use App shortcuts for the timetable, mensa and moodle screen
* change: updated some libs, updated kotlin to 1.3.61 * change: updated some libs, updated kotlin to 1.3.61
* change: the app was updated to use kotlin coroutines instead of anko for asynchronous work loads * change: the app was updated to use kotlin coroutines instead of anko for asynchronous workloads