Bimba.git

commit b3ed2a4684de4853eb1b744d88ff684c454c9067

Author: Adam Pioterek <adam.pioterek@protonmail.ch>

no caching old etag when timetable download breaks

 .gitignore | 1 
 app/src/main/java/ml/adamsprogs/bimba/activities/NoDbActivity.kt | 5 ++
 converter/local/converter.py | 0 


diff --git a/.gitignore b/.gitignore
index ed8d2dc9b4c0c3278e42a3643b770da815b0193c..c816d5dac08e2ac289dc082b7440f28d622a7b40 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,6 +49,7 @@ app/release/
 research/localonly
 database/timetable*
 converter/local/*.gz
+converter/local/*.db
 converter/local/metadata.yml
 converter/local/__pycache__
 converter/local/config.py




diff --git a/app/src/main/java/ml/adamsprogs/bimba/activities/NoDbActivity.kt b/app/src/main/java/ml/adamsprogs/bimba/activities/NoDbActivity.kt
index fa109fc9da1d81f858ddb6b1231f1dd153ad6cff..12157af53cd4f527780038c4c7495da4cb8c1c92 100644
--- a/app/src/main/java/ml/adamsprogs/bimba/activities/NoDbActivity.kt
+++ b/app/src/main/java/ml/adamsprogs/bimba/activities/NoDbActivity.kt
@@ -1,5 +1,6 @@
 package ml.adamsprogs.bimba.activities
 
+import android.content.Context
 import android.content.Intent
 import android.support.v7.app.AppCompatActivity
 import android.os.Bundle
@@ -18,6 +19,10 @@
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         setContentView(R.layout.activity_nodb)
+        val editor = getSharedPreferences("ml.adamsprogs.bimba.prefs", Context.MODE_PRIVATE).edit()
+        editor.putString("etag", "")
+        editor.apply()
+
         var filter = IntentFilter(TimetableDownloader.ACTION_DOWNLOADED)
         filter.addCategory(Intent.CATEGORY_DEFAULT)
         registerReceiver(timetableDownloadReceiver, filter)




diff --git a/converter/local/converter.py b/converter/local/converter.py
old mode 100644
new mode 100755