Skip to content

Commit a82d985

Browse files
authored
Merge pull request #387 from cyb3rko/android-15-updates
Support Android 15
2 parents 69c0d04 + 0c89d24 commit a82d985

File tree

16 files changed

+35
-33
lines changed

16 files changed

+35
-33
lines changed

.editorconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[*.{kt,kts}]
2-
ktlint_code_style = android_studio
2+
ktlint_code_style = android_studio
3+
ktlint_standard_function-expression-body = disabled

app/build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
55
plugins {
66
id("com.android.application")
77
id("kotlin-android")
8-
id("org.jmailen.kotlinter") version "4.3.0"
8+
id("org.jmailen.kotlinter") version "4.4.1"
99
}
1010

1111
android {
1212
namespace = "com.github.gotify"
13-
compileSdk = 34
13+
compileSdk = 35
1414
defaultConfig {
1515
applicationId = "com.github.gotify"
1616
minSdk = 23
17-
targetSdk = 34
17+
targetSdk = 35
1818
versionCode = 32
1919
versionName = "2.8.1"
2020
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -75,7 +75,7 @@ if (project.hasProperty("sign")) {
7575
}
7676

7777
dependencies {
78-
val coilVersion = "2.6.0"
78+
val coilVersion = "2.7.0"
7979
val markwonVersion = "4.6.2"
8080
val tinylogVersion = "2.7.0"
8181
implementation(project(":client"))
@@ -87,7 +87,7 @@ dependencies {
8787
implementation("androidx.vectordrawable:vectordrawable:1.2.0")
8888
implementation("androidx.preference:preference-ktx:1.2.1")
8989

90-
implementation("com.github.cyb3rko:QuickPermissions-Kotlin:1.1.3")
90+
implementation("com.github.cyb3rko:QuickPermissions-Kotlin:1.1.5")
9191
implementation("io.coil-kt:coil:$coilVersion")
9292
implementation("io.coil-kt:coil-svg:$coilVersion")
9393
implementation("io.noties.markwon:core:$markwonVersion")

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
1010
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
1111
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
12-
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
12+
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"
13+
tools:ignore="ProtectedPermissions" />
1314
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
1415

1516
<application
@@ -27,7 +28,6 @@
2728
<activity
2829
android:name=".init.InitializationActivity"
2930
android:exported="true"
30-
android:label="@string/app_name"
3131
android:theme="@style/AppTheme.SplashScreen"
3232
android:windowSoftInputMode="adjustResize">
3333
<intent-filter>
@@ -40,7 +40,6 @@
4040
android:name=".messages.MessagesActivity"
4141
android:exported="false"
4242
android:launchMode="singleTask"
43-
android:label="@string/app_name"
4443
android:theme="@style/AppTheme.NoActionBar" />
4544
<activity
4645
android:name=".login.LoginActivity"

app/src/main/kotlin/com/github/gotify/messages/MessagesActivity.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,8 @@ internal class MessagesActivity :
394394
}
395395
}
396396

397-
private inner class SwipeToDeleteCallback(
398-
private val adapter: ListMessageAdapter
399-
) : ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT or ItemTouchHelper.RIGHT) {
397+
private inner class SwipeToDeleteCallback(private val adapter: ListMessageAdapter) :
398+
ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT or ItemTouchHelper.RIGHT) {
400399
private var icon: Drawable?
401400
private val background: ColorDrawable
402401

app/src/main/kotlin/com/github/gotify/messages/MessagesModelFactory.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import android.app.Activity
44
import androidx.lifecycle.ViewModel
55
import androidx.lifecycle.ViewModelProvider
66

7-
internal class MessagesModelFactory(
8-
var modelParameterActivity: Activity
9-
) : ViewModelProvider.Factory {
7+
internal class MessagesModelFactory(var modelParameterActivity: Activity) :
8+
ViewModelProvider.Factory {
109
override fun <T : ViewModel> create(modelClass: Class<T>): T {
1110
if (modelClass == MessagesModel::class.java) {
1211
@Suppress("UNCHECKED_CAST")

app/src/main/kotlin/com/github/gotify/messages/provider/MessageDeletion.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@ package com.github.gotify.messages.provider
22

33
import com.github.gotify.client.model.Message
44

5-
internal class MessageDeletion(
6-
val message: Message,
7-
val allPosition: Int,
8-
val appPosition: Int
9-
)
5+
internal class MessageDeletion(val message: Message, val allPosition: Int, val appPosition: Int)

app/src/main/kotlin/com/github/gotify/messages/provider/MessageWithImage.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@ package com.github.gotify.messages.provider
22

33
import com.github.gotify.client.model.Message
44

5-
internal data class MessageWithImage(
6-
val message: Message,
7-
val image: String?
8-
)
5+
internal data class MessageWithImage(val message: Message, val image: String?)

app/src/main/kotlin/com/github/gotify/settings/SettingsActivity.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ import com.github.gotify.Utils
2323
import com.github.gotify.databinding.SettingsActivityBinding
2424
import com.google.android.material.dialog.MaterialAlertDialogBuilder
2525

26-
internal class SettingsActivity : AppCompatActivity(), OnSharedPreferenceChangeListener {
26+
internal class SettingsActivity :
27+
AppCompatActivity(),
28+
OnSharedPreferenceChangeListener {
2729
private lateinit var binding: SettingsActivityBinding
2830

2931
override fun onCreate(savedInstanceState: Bundle?) {

app/src/main/res/layout/activity_login.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7-
android:fillViewport="true">
7+
android:fillViewport="true"
8+
android:fitsSystemWindows="true">
89

910
<androidx.constraintlayout.widget.ConstraintLayout
1011
android:layout_width="match_parent"
@@ -180,14 +181,14 @@
180181

181182
<ImageButton
182183
android:id="@+id/advanced_settings"
183-
style="@style/Widget.Material3.Button.TextButton"
184184
android:layout_width="50dp"
185185
android:layout_height="wrap_content"
186186
android:text="@string/check_url"
187187
android:visibility="visible"
188188
android:background="@null"
189189
app:layout_constraintEnd_toEndOf="@+id/gotify_url"
190190
app:layout_constraintTop_toTopOf="@+id/checkurl"
191+
app:layout_constraintBottom_toBottomOf="@id/checkurl"
191192
app:srcCompat="@drawable/ic_settings" />
192193
</androidx.constraintlayout.widget.ConstraintLayout>
193194
</ScrollView>

app/src/main/res/layout/activity_messages.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
android:id="@+id/drawer_layout"
66
android:layout_width="match_parent"
77
android:layout_height="match_parent"
8+
android:fitsSystemWindows="true"
89
tools:openDrawer="start">
910

1011
<androidx.coordinatorlayout.widget.CoordinatorLayout
@@ -91,6 +92,7 @@
9192
android:layout_height="match_parent"
9293
android:layout_gravity="start"
9394
android:theme="@style/AppTheme.Nav"
95+
android:fitsSystemWindows="false"
9496
app:headerLayout="@layout/nav_header_drawer"
9597
app:menu="@menu/messages_menu" />
9698

0 commit comments

Comments
 (0)