1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2024-09-19 22:59:08 -05:00

Merge branch 'release/2.6.16'

This commit is contained in:
Mikołaj Pich 2024-06-10 19:05:02 +02:00
commit 1c485d6578
No known key found for this signature in database
13 changed files with 583 additions and 554 deletions

1
.gitignore vendored
View File

@ -71,6 +71,7 @@ captures/
.idea/deploymentTargetDropDown.xml
.idea/deploymentTargetSelector.xml
.idea/kotlinc.xml
.idea/studiobot.xml
# Keystore files
*.jks

View File

@ -27,8 +27,8 @@ android {
testApplicationId "io.github.tests.wulkanowy"
minSdkVersion 21
targetSdkVersion 34
versionCode 175
versionName "2.6.15"
versionCode 176
versionName "2.6.16"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resValue "string", "app_name", "Wulkanowy"
@ -161,7 +161,7 @@ play {
track = 'production'
releaseStatus = ReleaseStatus.IN_PROGRESS
userFraction = 0.99d
updatePriority = 3
updatePriority = 2
enabled.set(false)
}
@ -191,7 +191,7 @@ ext {
}
dependencies {
implementation 'io.github.wulkanowy:sdk:2.6.13'
implementation 'io.github.wulkanowy:sdk:2.6.14'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
@ -256,7 +256,7 @@ dependencies {
playImplementation 'com.google.firebase:firebase-crashlytics:'
playImplementation 'com.google.firebase:firebase-config'
playImplementation 'com.google.android.gms:play-services-ads:23.1.0'
playImplementation 'com.google.android.gms:play-services-ads:22.6.0'
playImplementation "com.google.android.play:integrity:1.3.0"
playImplementation 'com.google.android.play:app-update-ktx:2.1.0'
playImplementation 'com.google.android.play:review-ktx:2.0.1'

View File

@ -1,14 +1,32 @@
package io.github.wulkanowy.utils
import java.text.SimpleDateFormat
import java.time.*
import java.time.DayOfWeek.*
import java.time.DayOfWeek.FRIDAY
import java.time.DayOfWeek.MONDAY
import java.time.DayOfWeek.SATURDAY
import java.time.DayOfWeek.SUNDAY
import java.time.Instant
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.Month
import java.time.ZoneId
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
import java.time.temporal.TemporalAdjusters.*
import java.util.*
import java.time.temporal.TemporalAdjusters.firstInMonth
import java.time.temporal.TemporalAdjusters.next
import java.time.temporal.TemporalAdjusters.previous
import java.util.Locale
private const val DEFAULT_DATE_PATTERN = "dd.MM.yyyy"
fun getDefaultLocaleWithFallback(): Locale {
val locale = Locale.getDefault()
if (locale.language == "csb") {
return Locale.forLanguageTag("pl")
}
return locale
}
fun LocalDate.toTimestamp(): Long = atStartOfDay()
.toInstant(ZoneOffset.UTC)
.toEpochMilli()
@ -23,7 +41,7 @@ fun String.toLocalDate(format: String = DEFAULT_DATE_PATTERN): LocalDate =
LocalDate.parse(this, DateTimeFormatter.ofPattern(format))
fun LocalDate.toFormattedString(pattern: String = DEFAULT_DATE_PATTERN): String =
format(DateTimeFormatter.ofPattern(pattern))
format(DateTimeFormatter.ofPattern(pattern, getDefaultLocaleWithFallback()))
fun Instant.toFormattedString(
pattern: String = DEFAULT_DATE_PATTERN,
@ -31,7 +49,7 @@ fun Instant.toFormattedString(
): String = atZone(tz).format(DateTimeFormatter.ofPattern(pattern))
fun Month.getFormattedName(): String {
val formatter = SimpleDateFormat("LLLL", Locale.getDefault())
val formatter = SimpleDateFormat("LLLL", getDefaultLocaleWithFallback())
val date = LocalDateTime.now().withMonth(value)
return formatter.format(date.toInstant(ZoneOffset.UTC).toEpochMilli()).capitalise()
@ -76,7 +94,7 @@ inline val LocalDate.previousOrSameSchoolDay: LocalDate
}
inline val LocalDate.weekDayName: String
get() = format(DateTimeFormatter.ofPattern("EEEE", Locale.getDefault()))
get() = format(DateTimeFormatter.ofPattern("EEEE", getDefaultLocaleWithFallback()))
inline val LocalDate.monday: LocalDate get() = with(MONDAY)

View File

@ -1,5 +1,6 @@
Wersja 2.6.15
Wersja 2.6.16
— naprawiliśmy moduł wiadomości
— dodaliśmy język kaszubski
— naprawiliśmy crash aplikacji przy przełączaniu uczniów, kiedy włączone są reklamy
Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases

View File

@ -19,6 +19,7 @@
<item>Deutsch</item>
<item>Čeština</item>
<item>Slovenčina</item>
<item>Kaszëbsczi</item>
</string-array>
<string-array name="services_interval_entries">
<item>15 minut</item>

View File

@ -19,6 +19,7 @@
<item>Deutsch</item>
<item>Čeština</item>
<item>Slovenčina</item>
<item>Kaszëbsczi</item>
</string-array>
<string-array name="services_interval_entries">
<item>15 minutów</item>

File diff suppressed because it is too large Load Diff

View File

@ -19,6 +19,7 @@
<item>Deutsch</item>
<item>Čeština</item>
<item>Slovenčina</item>
<item>Kaszëbsczi</item>
</string-array>
<string-array name="services_interval_entries">
<item>15 Minuten</item>

View File

@ -19,6 +19,7 @@
<item>Deutsch</item>
<item>Čeština</item>
<item>Slovenčina</item>
<item>Kaszëbsczi</item>
</string-array>
<string-array name="services_interval_entries">
<item>15 minut</item>

View File

@ -19,6 +19,7 @@
<item>Deutsch</item>
<item>Čeština</item>
<item>Slovenčina</item>
<item>Kaszëbsczi</item>
</string-array>
<string-array name="services_interval_entries">
<item>15 минут</item>

View File

@ -19,6 +19,7 @@
<item>Deutsch</item>
<item>Čeština</item>
<item>Slovenčina</item>
<item>Kaszëbsczi</item>
</string-array>
<string-array name="services_interval_entries">
<item>15 minút</item>

View File

@ -19,6 +19,7 @@
<item>Deutsch</item>
<item>Čeština</item>
<item>Slovenčina</item>
<item>Kaszëbsczi</item>
</string-array>
<string-array name="services_interval_entries">
<item>15 хвилин</item>

View File

@ -40,6 +40,7 @@
<item>Deutsch</item>
<item>Čeština</item>
<item>Slovenčina</item>
<item>Kaszëbsczi</item>
</string-array>
<string-array name="app_language_values" translatable="false">
<item>system</item>
@ -50,6 +51,7 @@
<item>de</item>
<item>cs</item>
<item>sk</item>
<item>csb</item>
</string-array>
<string-array name="services_interval_entries">