Compare commits

..

3 Commits

6 changed files with 20 additions and 8 deletions

View File

@ -9,7 +9,7 @@
/*secret password - removed for source code publication*/ /*secret password - removed for source code publication*/
static toys AES_IV[16] = { static toys AES_IV[16] = {
0x38, 0x9a, 0x10, 0x56, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; 0x90, 0xad, 0xe8, 0xea, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat); unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat);

View File

@ -46,6 +46,6 @@ object Signing {
/*fun provideKey(param1: String, param2: Long): ByteArray {*/ /*fun provideKey(param1: String, param2: Long): ByteArray {*/
fun pleaseStopRightNow(param1: String, param2: Long): ByteArray { fun pleaseStopRightNow(param1: String, param2: Long): ByteArray {
return "$param1.MTIzNDU2Nzg5MDKSFwSgcV===.$param2".sha256() return "$param1.MTIzNDU2Nzg5MDzsOS3K08===.$param2".sha256()
} }
} }

View File

@ -10,6 +10,7 @@ import android.app.PendingIntent
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.text.Html import android.text.Html
import android.widget.Toast
import androidx.core.app.NotificationCompat import androidx.core.app.NotificationCompat
import androidx.work.* import androidx.work.*
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
@ -79,11 +80,15 @@ class UpdateWorker(val context: Context, val params: WorkerParameters) : Worker(
val update = if (overrideUpdate == null) { val update = if (overrideUpdate == null) {
val api = SzkolnyApi(app) val api = SzkolnyApi(app)
val response = api.getUpdate("beta") val response = api.getUpdate("beta")
if (response?.success != true) if (response?.success != true) {
Toast.makeText(app, app.getString(R.string.notification_cant_check_update), Toast.LENGTH_SHORT).show()
return return
}
val updates = response.data val updates = response.data
if (updates?.isNotEmpty() != true) if (updates?.isNotEmpty() != true) {
Toast.makeText(app, app.getString(R.string.notification_no_update), Toast.LENGTH_SHORT).show()
return return
}
updates[0] updates[0]
} }
else overrideUpdate else overrideUpdate

View File

@ -4,6 +4,7 @@
package pl.szczodrzynski.edziennik.ui.dialogs.changelog package pl.szczodrzynski.edziennik.ui.dialogs.changelog
import android.os.Build
import android.text.Html import android.text.Html
import android.widget.ScrollView import android.widget.ScrollView
import android.widget.TextView import android.widget.TextView
@ -44,8 +45,13 @@ class ChangelogDialog(
val text = app.assets.open("pl-changelog.html").bufferedReader().use { val text = app.assets.open("pl-changelog.html").bufferedReader().use {
it.readText() it.readText()
}.replace("<li>", "<br><li> - ") }
textView.text = Html.fromHtml(text) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
textView.text = Html.fromHtml(text)
}
else {
textView.text = Html.fromHtml(text.replace("<li>", "<br><li> - "))
}
val scrollView = ScrollView(activity) val scrollView = ScrollView(activity)
scrollView.addView(textView) scrollView.addView(textView)

View File

@ -1165,4 +1165,5 @@
<string name="notification_type_new_shared_homework">Udostępniono zadanie domowe</string> <string name="notification_type_new_shared_homework">Udostępniono zadanie domowe</string>
<string name="notification_type_removed_shared_event">Usunięto wydarzenie</string> <string name="notification_type_removed_shared_event">Usunięto wydarzenie</string>
<string name="notification_click_to_see_all">Kliknij, aby zobaczyć wszystkie powiadomienia</string> <string name="notification_click_to_see_all">Kliknij, aby zobaczyć wszystkie powiadomienia</string>
<string name="notification_cant_check_update">Nie udało się sprawdzić aktualizacji</string>
</resources> </resources>

View File

@ -5,8 +5,8 @@ buildscript {
kotlin_version = '1.3.61' kotlin_version = '1.3.61'
release = [ release = [
versionName: "4.0-beta.4", versionName: "4.0-beta.5",
versionCode: 4000004 versionCode: 4000005
] ]
setup = [ setup = [