Skip to content

Commit 1f712db

Browse files
committed
Merge branch 'develop-v4'
2 parents a0dac52 + f850848 commit 1f712db

File tree

16 files changed

+73
-18
lines changed

16 files changed

+73
-18
lines changed

app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ apply from: 'git-info.gradle'
1010
android {
1111
compileSdkVersion setup.compileSdk
1212

13+
namespace 'pl.szczodrzynski.edziennik'
14+
1315
defaultConfig {
1416
applicationId 'pl.szczodrzynski.edziennik'
1517
minSdkVersion setup.minSdk

app/git-info.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
jcenter()
99
}
1010
dependencies {
11-
classpath "org.eclipse.jgit:org.eclipse.jgit:5.5.+"
11+
classpath "org.eclipse.jgit:org.eclipse.jgit:7.4.+"
1212
}
1313
}
1414

app/src/main/assets/pl-changelog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h3>Wersja 4.15, 2025-11-25</h3>
1+
<h3>Wersja 4.15.1, 2025-11-25</h3>
22
<ul>
33
<li>USOS: <b>dodano obsługę egzaminów</b>.</li>
44
<li>Dodano opcję blokowania i konfiguracji kart na stronie głównej.</li>

app/src/main/cpp/szkolny-signing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/*secret password - removed for source code publication*/
1111
static toys AES_IV[16] = {
12-
0xa3, 0x7e, 0xe4, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
12+
0xc3, 0x64, 0xb3, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
1313

1414
unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat);
1515

app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@ import android.os.Bundle
1313
import android.provider.Settings
1414
import android.view.Gravity
1515
import android.view.View
16+
import android.widget.FrameLayout
1617
import android.widget.Toast
1718
import androidx.appcompat.app.AppCompatActivity
1819
import androidx.core.app.ActivityCompat
1920
import androidx.core.content.ContextCompat
2021
import androidx.core.graphics.ColorUtils
22+
import androidx.core.view.ViewCompat
23+
import androidx.core.view.WindowInsetsCompat
2124
import androidx.core.view.isVisible
25+
import androidx.core.view.updateLayoutParams
2226
import androidx.navigation.NavOptions
2327
import com.danimahardhika.cafebar.CafeBar
2428
import com.google.android.material.dialog.MaterialAlertDialogBuilder
@@ -146,6 +150,19 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
146150

147151
setContentView(b.root)
148152

153+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
154+
ViewCompat.setOnApplyWindowInsetsListener(b.rootFrame) { view: View, insets: WindowInsetsCompat ->
155+
val bars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
156+
view.setPadding(bars.left, bars.top, bars.right, 0)
157+
b.navView.bottomSheet.setPadding(0, 0, 0, bars.bottom)
158+
b.swipeRefreshLayout.setPadding(0, 0, 0, bars.bottom)
159+
b.nightlyText.updateLayoutParams<FrameLayout.LayoutParams> {
160+
this.bottomMargin = 8.dp + bars.bottom
161+
}
162+
insets
163+
}
164+
}
165+
149166
mainSnackbar.setCoordinator(b.navView.coordinator, b.navView.bottomBar)
150167
errorSnackbar.setCoordinator(b.navView.coordinator, b.navView.bottomBar)
151168

app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/VulcanHebe.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ open class VulcanHebe(open val data: DataVulcan, open val lastSync: Long?) {
424424
HebeFilterType.BY_MESSAGEBOX -> {
425425
query["box"] = messageBox ?: data.messageBoxKey ?: ""
426426
}
427+
else -> {}
427428
}
428429

429430
if (dateFrom != null)

app/src/main/java/pl/szczodrzynski/edziennik/data/api/szkolny/interceptor/Signing.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object Signing {
2525
with(context) {
2626
try {
2727
val packageInfo: PackageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES)
28-
for (signature in packageInfo.signatures) {
28+
for (signature in packageInfo.signatures ?: arrayOf()) {
2929
val signatureBytes = signature.toByteArray()
3030
val md = MessageDigest.getInstance("SHA")
3131
md.update(signatureBytes)
@@ -46,6 +46,6 @@ object Signing {
4646

4747
/*fun provideKey(param1: String, param2: Long): ByteArray {*/
4848
fun pleaseStopRightNow(param1: String, param2: Long): ByteArray {
49-
return "$param1.MTIzNDU2Nzg5MD6Qm2vQ4e===.$param2".sha256()
49+
return "$param1.MTIzNDU2Nzg5MDkUJ74VXs===.$param2".sha256()
5050
}
5151
}

app/src/main/java/pl/szczodrzynski/edziennik/data/db/dao/ProfileDao.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ interface ProfileDao {
2828
@Query("SELECT * FROM profiles WHERE profileId = :profileId")
2929
fun getByIdNow(profileId: Int): Profile?
3030

31-
@Query("SELECT * FROM profiles WHERE profileId = :profileId")
32-
suspend fun getByIdSuspend(profileId: Int): Profile?
33-
3431
@get:Query("SELECT * FROM profiles WHERE profileId >= 0 ORDER BY profileId")
3532
val all: LiveData<List<Profile>>
3633

app/src/main/java/pl/szczodrzynski/edziennik/ext/EnumExtensions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ inline fun <reified E : Enum<E>> Int.toEnum() = when (E::class.java) {
4949
else -> enumValues<E>()[this]
5050
} as E
5151

52-
fun <E : Enum<E>> Int.toEnum(type: Class<*>) = when (type) {
52+
fun <E : Enum<E>> Int.toEnum(type: Class<*>): Enum<E> = when (type) {
5353
// this is used for Config so all enums are here
5454
FeatureType::class.java -> this.asFeatureType()
5555
LoginMethod::class.java -> this.asLoginMethod()

app/src/main/java/pl/szczodrzynski/edziennik/ext/MiscExtensions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import java.io.StringWriter
2121

2222
fun <T> LiveData<T>.observeOnce(lifecycleOwner: LifecycleOwner, observer: Observer<T>) {
2323
observe(lifecycleOwner, object : Observer<T> {
24-
override fun onChanged(t: T?) {
24+
override fun onChanged(t: T) {
2525
observer.onChanged(t)
2626
removeObserver(this)
2727
}

0 commit comments

Comments
 (0)