Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[*.{kt,kts}]
ktlint_code_style = android_studio
ktlint_code_style = android_studio
ktlint_standard_function-expression-body = disabled
10 changes: 5 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id("com.android.application")
id("kotlin-android")
id("org.jmailen.kotlinter") version "4.3.0"
id("org.jmailen.kotlinter") version "4.4.1"
}

android {
namespace = "com.github.gotify"
compileSdk = 34
compileSdk = 35
defaultConfig {
applicationId = "com.github.gotify"
minSdk = 23
targetSdk = 34
targetSdk = 35
versionCode = 32
versionName = "2.8.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -75,7 +75,7 @@ if (project.hasProperty("sign")) {
}

dependencies {
val coilVersion = "2.6.0"
val coilVersion = "2.7.0"
val markwonVersion = "4.6.2"
val tinylogVersion = "2.7.0"
implementation(project(":client"))
Expand All @@ -87,7 +87,7 @@ dependencies {
implementation("androidx.vectordrawable:vectordrawable:1.2.0")
implementation("androidx.preference:preference-ktx:1.2.1")

implementation("com.github.cyb3rko:QuickPermissions-Kotlin:1.1.3")
implementation("com.github.cyb3rko:QuickPermissions-Kotlin:1.1.5")
implementation("io.coil-kt:coil:$coilVersion")
implementation("io.coil-kt:coil-svg:$coilVersion")
implementation("io.noties.markwon:core:$markwonVersion")
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />

<application
Expand All @@ -27,7 +28,6 @@
<activity
android:name=".init.InitializationActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/AppTheme.SplashScreen"
android:windowSoftInputMode="adjustResize">
<intent-filter>
Expand All @@ -40,7 +40,6 @@
android:name=".messages.MessagesActivity"
android:exported="false"
android:launchMode="singleTask"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".login.LoginActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,8 @@ internal class MessagesActivity :
}
}

private inner class SwipeToDeleteCallback(
private val adapter: ListMessageAdapter
) : ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT or ItemTouchHelper.RIGHT) {
private inner class SwipeToDeleteCallback(private val adapter: ListMessageAdapter) :
ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT or ItemTouchHelper.RIGHT) {
private var icon: Drawable?
private val background: ColorDrawable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import android.app.Activity
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider

internal class MessagesModelFactory(
var modelParameterActivity: Activity
) : ViewModelProvider.Factory {
internal class MessagesModelFactory(var modelParameterActivity: Activity) :
ViewModelProvider.Factory {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
if (modelClass == MessagesModel::class.java) {
@Suppress("UNCHECKED_CAST")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ package com.github.gotify.messages.provider

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

internal class MessageDeletion(
val message: Message,
val allPosition: Int,
val appPosition: Int
)
internal class MessageDeletion(val message: Message, val allPosition: Int, val appPosition: Int)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ package com.github.gotify.messages.provider

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

internal data class MessageWithImage(
val message: Message,
val image: String?
)
internal data class MessageWithImage(val message: Message, val image: String?)
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import com.github.gotify.Utils
import com.github.gotify.databinding.SettingsActivityBinding
import com.google.android.material.dialog.MaterialAlertDialogBuilder

internal class SettingsActivity : AppCompatActivity(), OnSharedPreferenceChangeListener {
internal class SettingsActivity :
AppCompatActivity(),
OnSharedPreferenceChangeListener {
private lateinit var binding: SettingsActivityBinding

override fun onCreate(savedInstanceState: Bundle?) {
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
android:fillViewport="true"
android:fitsSystemWindows="true">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand Down Expand Up @@ -180,14 +181,14 @@

<ImageButton
android:id="@+id/advanced_settings"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:text="@string/check_url"
android:visibility="visible"
android:background="@null"
app:layout_constraintEnd_toEndOf="@+id/gotify_url"
app:layout_constraintTop_toTopOf="@+id/checkurl"
app:layout_constraintBottom_toBottomOf="@id/checkurl"
app:srcCompat="@drawable/ic_settings" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
2 changes: 2 additions & 0 deletions app/src/main/res/layout/activity_messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">

<androidx.coordinatorlayout.widget.CoordinatorLayout
Expand Down Expand Up @@ -91,6 +92,7 @@
android:layout_height="match_parent"
android:layout_gravity="start"
android:theme="@style/AppTheme.Nav"
android:fitsSystemWindows="false"
app:headerLayout="@layout/nav_header_drawer"
app:menu="@menu/messages_menu" />

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_share.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fitsSystemWindows="true">

<LinearLayout
android:layout_width="match_parent"
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import java.io.File
import java.net.URI

plugins {
id("com.android.application") version "8.5.0" apply false
id("org.jetbrains.kotlin.android") version "2.0.0" apply false
id("com.android.application") version "8.7.1" apply false
id("org.jetbrains.kotlin.android") version "2.0.20" apply false
id("org.hidetake.swagger.generator") version "2.19.2"
}

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down