Skip to content

Commit 76a9e21

Browse files
authored
Merge pull request #90 from TimPushkin/updates
Prepare for `1.4.4`
2 parents 73c2037 + 6afab59 commit 76a9e21

File tree

7 files changed

+30
-72
lines changed

7 files changed

+30
-72
lines changed

app/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
object Version {
1313
private const val MAJOR = 1
1414
private const val MINOR = 4
15-
private const val PATCH = 3
15+
private const val PATCH = 4
1616

1717
const val CODE = MAJOR * 10000 + MINOR * 100 + PATCH
1818
const val NAME = "$MAJOR.$MINOR.$PATCH"
@@ -27,12 +27,12 @@ kotlin {
2727

2828
android {
2929
namespace = "ru.spbu.depnav"
30-
compileSdk = 35
30+
compileSdk = 36
3131

3232
defaultConfig {
3333
applicationId = "ru.spbu.depnav"
3434
minSdk = 21
35-
targetSdk = 35
35+
targetSdk = 36
3636
versionCode = Version.CODE
3737
versionName = Version.NAME
3838

app/src/main/java/ru/spbu/depnav/ui/component/MainMenuSheet.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
package ru.spbu.depnav.ui.component
2020

21+
import android.annotation.SuppressLint
2122
import androidx.compose.animation.AnimatedVisibility
2223
import androidx.compose.foundation.layout.Box
2324
import androidx.compose.foundation.layout.Column
@@ -44,6 +45,7 @@ import androidx.compose.ui.res.stringResource
4445
import androidx.compose.ui.unit.dp
4546
import ru.spbu.depnav.R
4647
import ru.spbu.depnav.ui.viewmodel.AvailableMap
48+
import androidx.compose.ui.platform.LocalResources
4749

4850
// https://m3.material.io/components/navigation-drawer/specs#368147de-9661-4a28-9fc1-ce2f8c9eac40
4951
private val ITEM_HEIGHT = 56.dp
@@ -136,7 +138,8 @@ private fun ColumnScope.MapItems(
136138

137139
@Composable
138140
private fun MapLogo(internalMapName: String, contentDescription: String) {
139-
val logoId = LocalContext.current.resources.getIdentifier(
141+
@SuppressLint("DiscouragedApi")
142+
val logoId = LocalResources.current.getIdentifier(
140143
"logo_${internalMapName.replace('-', '_')}", "drawable", LocalContext.current.packageName
141144
)
142145
Icon(

app/src/main/java/ru/spbu/depnav/ui/viewmodel/MapViewModel.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class MapViewModel @Inject constructor(
202202
} while (state.value.language != language)
203203

204204
val mapState = with(mapInfo) {
205-
MapState(levelsNum, floorWidth, floorHeight, tileSize) { scale(0f) }
205+
MapState(levelsNum, floorWidth, floorHeight, tileSize) { scale(0.0) }
206206
}.apply {
207207
setScrollOffsetRatio(0.5f, 0.5f)
208208
addClusterers(markerAlpha)
@@ -275,8 +275,7 @@ class MapViewModel @Inject constructor(
275275
x = marker.x,
276276
y = marker.y,
277277
zIndex = 1f,
278-
clickable = false,
279-
clipShape = null
278+
clickable = false
280279
) { Pin() }
281280
}
282281

app/src/main/java/ru/spbu/depnav/utils/map/Markers.kt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ import ru.spbu.depnav.data.model.Marker
3232
import ru.spbu.depnav.data.model.MarkerText
3333
import ru.spbu.depnav.ui.component.MarkerView
3434

35-
private const val INVISIBLE_UNTIL_SCALE_PORTION = 0.2f
36-
private const val OPAQUE_SINCE_SCALE_PORTION = 0.5f
37-
private const val INVISIBLE_UNTIL_SCALED_BY = 0.1f
38-
private const val OPAQUE_SINCE_SCALED_BY = 0.5f
35+
private const val INVISIBLE_UNTIL_SCALE_PORTION = 0.2
36+
private const val OPAQUE_SINCE_SCALE_PORTION = 0.5
37+
private const val INVISIBLE_UNTIL_SCALED_BY = 0.1
38+
private const val OPAQUE_SINCE_SCALED_BY = 0.5
3939

4040
/** Returns alpha value to use for map markers calculated based on the current map scale. */
41-
fun getMarkerAlpha(minScale: Float, scale: Float, maxScale: Float) = if (minScale < maxScale) {
41+
fun getMarkerAlpha(minScale: Double, scale: Double, maxScale: Double) = if (minScale < maxScale) {
4242
val invisibleUntil = minScale + ((maxScale - minScale) * INVISIBLE_UNTIL_SCALE_PORTION)
4343
.coerceAtMost(INVISIBLE_UNTIL_SCALED_BY)
4444
val opaqueFrom = minScale + ((maxScale - minScale) * OPAQUE_SINCE_SCALE_PORTION)
4545
.coerceAtMost(OPAQUE_SINCE_SCALED_BY)
4646
val coercedScale = scale.coerceIn(invisibleUntil, opaqueFrom)
47-
(coercedScale - invisibleUntil) / (opaqueFrom - invisibleUntil)
47+
((coercedScale - invisibleUntil) / (opaqueFrom - invisibleUntil)).toFloat()
4848
} else {
4949
1f // minScale >= maxScale, so zooming is impossible, i.e. the scale cannot be changed
5050
}
@@ -63,7 +63,6 @@ fun MapState.addMarker(
6363
y = marker.y,
6464
clickable = markerText.run { !title.isNullOrBlank() || !description.isNullOrBlank() },
6565
relativeOffset = Offset(-0.5f, -0.5f),
66-
clipShape = null,
6766
renderingStrategy = RenderingStrategy.Clustering(getClustererId(marker.type))
6867
) {
6968
val alpha by alphaFlow.collectAsStateWithLifecycle()

app/src/main/java/ru/spbu/depnav/utils/ranking/TfIdf.kt

Lines changed: 0 additions & 43 deletions
This file was deleted.

gradle/libs.versions.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[versions]
22

3-
kotlin = "2.1.20"
4-
kspPlugin = "2.1.20-2.0.0"
5-
hilt = "2.56.2"
6-
lifecycle = "2.8.7"
7-
room = "2.7.0"
3+
kotlin = "2.2.20"
4+
kspPlugin = "2.2.20-2.0.3"
5+
hilt = "2.57.1"
6+
lifecycle = "2.9.4"
7+
room = "2.7.2" # 2.8.0+ requires minSdk 23, without giving much yet
88

99

1010
[libraries]
@@ -20,25 +20,25 @@ androidx-room-compiler = { group = "androidx.room", name = "room-compiler", vers
2020
google-dagger-hilt = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
2121
google-dagger-hiltCompiler = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "hilt" }
2222

23-
androidx-compose-bom = "androidx.compose:compose-bom:2025.04.00"
23+
androidx-compose-bom = "androidx.compose:compose-bom:2025.09.00"
2424
androidx-compose-material3 = { module = "androidx.compose.material3:material3" }
2525
androidx-compose-ui = { module = "androidx.compose.ui:ui" }
2626
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
2727
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
2828

29-
androidx-core-ktx = "androidx.core:core-ktx:1.16.0"
30-
androidx-activity-compose = "androidx.activity:activity-compose:1.10.1"
31-
plrapps-mapcompose = "ovh.plrapps:mapcompose:2.16.2"
29+
androidx-core-ktx = "androidx.core:core-ktx:1.17.0"
30+
androidx-activity-compose = "androidx.activity:activity-compose:1.11.0"
31+
plrapps-mapcompose = "ovh.plrapps:mapcompose:3.2.1"
3232

3333
junit = "junit:junit:4.13.2"
34-
androidx-test-runner = "androidx.test:runner:1.6.2"
35-
androidx-test-rules = "androidx.test:rules:1.6.1"
36-
androidx-test-extJunit = "androidx.test.ext:junit:1.2.1"
34+
androidx-test-runner = "androidx.test:runner:1.7.0"
35+
androidx-test-rules = "androidx.test:rules:1.7.0"
36+
androidx-test-extJunit = "androidx.test.ext:junit:1.3.0"
3737

3838

3939
[plugins]
4040

41-
android-application = { id = "com.android.application", version = "8.9.1" }
41+
android-application = { id = "com.android.application", version = "8.13.0" }
4242
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
4343
jetbrains-kotlin-plugin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
4444
google-dagger-hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Aug 27 22:36:14 CEST 2024
1+
#Fri Sep 19 18:54:02 CEST 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)