More strings can be struck through, optimised strikethrough method, added "_TESTURLS" debug flag, version bump to name 2.1.3, code 20

This commit is contained in:
Deniz Düzgören
2019-08-09 09:52:05 +02:00
parent d2274f20b0
commit c2561b8354
5 changed files with 23 additions and 16 deletions
@@ -41,11 +41,15 @@ class DataFetcher(isplan: Boolean, ismenu: Boolean, isjobservice: Boolean, conte
private val edit = prefs.edit()
private var currentTime = ""
private var currentFoodTime = ""
private val substUrl = "https://djd4rkn355.github.io/subst.html"
private val foodUrl = "https://djd4rkn355.github.io/food.html"
private var substUrl = "https://djd4rkn355.github.io/subst.html"
private var foodUrl = "https://djd4rkn355.github.io/food.html"
override fun doInBackground(vararg params: Void?): Void? {
try {
if (prefs.getBoolean("testUrls", false)) {
substUrl = "https://djd4rkn355.github.io/subst_test.html"
foodUrl = "https://djd4rkn355.github.io/food_test.html"
}
if (menu) {
val docFood = Jsoup.connect(foodUrl).get()
currentFoodTime = docFood.select("h1")[0].text()