diff --git a/app/build.gradle b/app/build.gradle index 5af7997e..6b078de7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,13 +2,13 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id 'org.jetbrains.kotlin.plugin.serialization' + id 'org.jetbrains.kotlin.plugin.compose' id 'com.mikepenz.aboutlibraries.plugin' id 'com.google.dagger.hilt.android' id 'com.google.devtools.ksp' id 'org.jmailen.kotlinter' id "io.sentry.android.gradle" version "3.4.2" id "app.cash.sqldelight" version "2.0.1" - id 'kotlin-kapt' id 'kotlin-parcelize' id 'com.google.gms.google-services' @@ -150,9 +150,6 @@ android { compose true buildConfig true } - composeOptions { - kotlinCompilerExtensionVersion compose_compiler_version - } packagingOptions { resources { excludes += '/META-INF/{AL2.0,LGPL2.1}' @@ -178,11 +175,11 @@ sentry { dependencies { // Android/Kotlin Core implementation 'androidx.core:core-ktx:1.13.1' - implementation "org.jetbrains.kotlin:kotlin-reflect:1.9.22" + implementation "org.jetbrains.kotlin:kotlin-reflect:2.0.10" // Kotlinx - various first-party extensions for Kotlin - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.6.0" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.6.1" implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.4.0" // Compose BOM diff --git a/app/src/main/java/chat/revolt/api/routes/microservices/autumn/Autumn.kt b/app/src/main/java/chat/revolt/api/routes/microservices/autumn/Autumn.kt index 3b048389..54f9e18c 100644 --- a/app/src/main/java/chat/revolt/api/routes/microservices/autumn/Autumn.kt +++ b/app/src/main/java/chat/revolt/api/routes/microservices/autumn/Autumn.kt @@ -51,7 +51,7 @@ suspend fun uploadToAutumn( ) ) onUpload { bytesSentTotal, contentLength -> - onProgress(bytesSentTotal, contentLength) + contentLength?.let { onProgress(bytesSentTotal, it) } } } diff --git a/app/src/main/java/chat/revolt/screens/chat/views/channel/ChannelScreenViewModel.kt b/app/src/main/java/chat/revolt/screens/chat/views/channel/ChannelScreenViewModel.kt index 331fbbd4..c96cd197 100644 --- a/app/src/main/java/chat/revolt/screens/chat/views/channel/ChannelScreenViewModel.kt +++ b/app/src/main/java/chat/revolt/screens/chat/views/channel/ChannelScreenViewModel.kt @@ -13,7 +13,6 @@ import chat.revolt.R import chat.revolt.api.RevoltAPI import chat.revolt.api.RevoltJson import chat.revolt.api.internals.ChannelUtils -import chat.revolt.internals.text.MessageProcessor import chat.revolt.api.internals.PermissionBit import chat.revolt.api.internals.Roles import chat.revolt.api.internals.SpecialUsers @@ -47,6 +46,7 @@ import chat.revolt.callbacks.Action import chat.revolt.callbacks.ActionChannel import chat.revolt.callbacks.UiCallback import chat.revolt.callbacks.UiCallbacks +import chat.revolt.internals.text.MessageProcessor import chat.revolt.persistence.KVStorage import chat.revolt.screens.chat.ChatRouterDestination import chat.revolt.settings.providers.AgeGateUnlockedStorageProvider @@ -144,7 +144,11 @@ class ChannelScreenViewModel @Inject constructor( channel?.server?.let { serverId -> RevoltAPI.selfId?.let { selfId -> if (!RevoltAPI.members.hasMember(serverId, selfId)) { - fetchMember(serverId, selfId) + try { + fetchMember(serverId, selfId) + } catch (e: Exception) { + Log.e("ChannelScreenViewModel", "Failed to fetch member", e) + } } ensuredSelfMember = true diff --git a/build.gradle b/build.gradle index 8ffb68cb..9c188abc 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,12 @@ buildscript { ext { - compose_compiler_version = '1.5.10' - compose_bom_version = '2024.02.01' + compose_bom_version = '2024.06.00' accompanist_version = '0.34.0' - okhttp_version = '4.10.0' + okhttp_version = '4.12.0' nav_version = '2.7.7' - hilt_version = '2.44' - coil_version = '2.2.2' + hilt_version = '2.52' glide_version = '4.16.0' - ktor_version = '2.3.0' + ktor_version = '3.0.0-beta-2' aboutlibraries_version = '10.9.1' media3_version = '1.3.1' livekit_version = '2.2.0' @@ -18,13 +16,14 @@ buildscript { // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '8.4.1' apply false - id 'com.android.library' version '8.4.1' apply false - id 'org.jetbrains.kotlin.android' version '1.9.22' apply false - id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.22' apply false + id 'com.android.application' version '8.4.2' apply false + id 'com.android.library' version '8.4.2' apply false + id 'org.jetbrains.kotlin.android' version '2.0.10' apply false + id 'org.jetbrains.kotlin.plugin.serialization' version '2.0.10' apply false + id 'org.jetbrains.kotlin.plugin.compose' version '2.0.10' apply false id "com.google.dagger.hilt.android" version "2.44" apply false id 'com.mikepenz.aboutlibraries.plugin' version "10.9.1" apply false - id 'com.google.devtools.ksp' version '1.9.22-1.0.17' apply false + id 'com.google.devtools.ksp' version '2.0.10-1.0.24' apply false id 'org.jmailen.kotlinter' version "4.0.0" apply false id("com.google.gms.google-services") version "4.4.2" apply false }