From a05790f211820d9ab66c57db5ba081168e6c4b98 Mon Sep 17 00:00:00 2001 From: Jan Tennert Date: Sat, 21 Sep 2024 11:06:07 +0200 Subject: [PATCH] update version --- .../jan/einkaufszettel/Utils.android.kt | 2 +- .../data/remote/UpdateManager.android.kt | 2 +- .../io/github/jan/einkaufszettel/App.kt | 8 ++--- .../io/github/jan/einkaufszettel/Utils.kt | 2 +- .../auth/data/remote/AuthenticationApi.kt | 8 ++--- .../jan/einkaufszettel/auth/ui/LoginScreen.kt | 2 +- .../cards/data/remote/CardsApi.kt | 1 + .../screen/create/CardsCreateScreenModel.kt | 2 +- .../ui/screen/edit/CardEditScreenModel.kt | 3 +- .../cards/ui/screen/main/CardsScreenModel.kt | 4 +-- .../einkaufszettel/home/ui/HomeScreenModel.kt | 2 +- .../profile/data/local/ProfileDataSource.kt | 2 +- .../profile/data/remote/ProfileApi.kt | 2 +- .../ui/create/RecipeCreateScreenModel.kt | 2 +- .../recipes/ui/edit/RecipeEditScreenModel.kt | 2 +- .../recipes/ui/main/RecipeScreenModel.kt | 4 +-- .../ui/steps/RecipeModifyScreenModel.kt | 2 +- .../einkaufszettel/root/di/supabaseModule.kt | 16 +++++----- .../root/ui/screen/RootScreen.kt | 4 +-- .../settings/ui/SettingsScreenModel.kt | 4 +-- .../shops/ui/screen/ShopProductScreenModel.kt | 2 +- .../ui/screen/create/ShopCreateScreenModel.kt | 2 +- .../ui/screen/detail/ShopDetailScreenModel.kt | 2 +- .../shops/ui/screen/main/ShopScreenModel.kt | 4 +-- .../io/github/jan/einkaufszettel/Utils.js.kt | 2 +- .../einkaufszettel/auth/ui/AuthScreen.js.kt | 4 +-- gradle.properties | 4 +-- gradle/libs.versions.toml | 32 +++++++++---------- gradlew | 0 29 files changed, 64 insertions(+), 62 deletions(-) mode change 100644 => 100755 gradlew diff --git a/composeApp/src/androidMain/kotlin/io/github/jan/einkaufszettel/Utils.android.kt b/composeApp/src/androidMain/kotlin/io/github/jan/einkaufszettel/Utils.android.kt index 545e91e..d2cfbac 100644 --- a/composeApp/src/androidMain/kotlin/io/github/jan/einkaufszettel/Utils.android.kt +++ b/composeApp/src/androidMain/kotlin/io/github/jan/einkaufszettel/Utils.android.kt @@ -3,7 +3,7 @@ package io.github.jan.einkaufszettel import androidx.compose.runtime.Composable import androidx.compose.runtime.State import androidx.lifecycle.compose.collectAsStateWithLifecycle -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.StateFlow import kotlin.coroutines.CoroutineContext diff --git a/composeApp/src/androidMain/kotlin/io/github/jan/einkaufszettel/update/data/remote/UpdateManager.android.kt b/composeApp/src/androidMain/kotlin/io/github/jan/einkaufszettel/update/data/remote/UpdateManager.android.kt index b538565..ef17baa 100644 --- a/composeApp/src/androidMain/kotlin/io/github/jan/einkaufszettel/update/data/remote/UpdateManager.android.kt +++ b/composeApp/src/androidMain/kotlin/io/github/jan/einkaufszettel/update/data/remote/UpdateManager.android.kt @@ -32,7 +32,7 @@ actual class UpdateManager( callbackFlow { val response = httpClient.get(API_URL.format(version.toString())) { onDownload { bytesSentTotal, contentLength -> - val float = bytesSentTotal.toFloat() / contentLength.toFloat() + val float = bytesSentTotal.toFloat() / contentLength!!.toFloat() trySend(UpdateDownloadEvent.Progress(if(float.isNaN()) 0f else float)) } } diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/App.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/App.kt index a2ef71d..a943249 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/App.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/App.kt @@ -26,8 +26,8 @@ import io.github.jan.einkaufszettel.root.ui.screen.RootScreen import io.github.jan.einkaufszettel.root.ui.theme.AppTheme import io.github.jan.einkaufszettel.update.ui.CheckForUpdates import io.github.jan.supabase.annotations.SupabaseExperimental -import io.github.jan.supabase.coil.CoilIntegration -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth +import io.github.jan.supabase.coil.Coil3Integration import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import org.koin.compose.koinInject @@ -35,7 +35,7 @@ import org.koin.compose.koinInject @OptIn(ExperimentalCoilApi::class) @Composable internal fun App() = AppTheme { - val coil = koinInject() + val coil = koinInject() setSingletonImageLoaderFactory { createImageLoader(it, coil) } @@ -67,7 +67,7 @@ internal fun App() = AppTheme { } @OptIn(SupabaseExperimental::class) -fun createImageLoader(context: PlatformContext, coilIntegration: CoilIntegration) = ImageLoader.Builder(context).apply { +fun createImageLoader(context: PlatformContext, coilIntegration: Coil3Integration) = ImageLoader.Builder(context).apply { components { add(KtorNetworkFetcherFactory()) add(coilIntegration) diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/Utils.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/Utils.kt index 6834685..69d1569 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/Utils.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/Utils.kt @@ -7,7 +7,7 @@ import cafe.adriel.voyager.core.model.rememberNavigatorScreenModel import cafe.adriel.voyager.core.model.rememberScreenModel import cafe.adriel.voyager.core.screen.Screen import cafe.adriel.voyager.navigator.Navigator -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import kotlinx.coroutines.flow.StateFlow import org.koin.compose.getKoin import org.koin.core.parameter.ParametersDefinition diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/auth/data/remote/AuthenticationApi.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/auth/data/remote/AuthenticationApi.kt index e914d29..a17dc24 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/auth/data/remote/AuthenticationApi.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/auth/data/remote/AuthenticationApi.kt @@ -1,9 +1,9 @@ package io.github.jan.einkaufszettel.auth.data.remote -import io.github.jan.supabase.gotrue.Auth -import io.github.jan.supabase.gotrue.OtpType -import io.github.jan.supabase.gotrue.providers.builtin.Email -import io.github.jan.supabase.gotrue.user.UserInfo +import io.github.jan.supabase.auth.Auth +import io.github.jan.supabase.auth.OtpType +import io.github.jan.supabase.auth.providers.builtin.Email +import io.github.jan.supabase.auth.user.UserInfo interface AuthenticationApi { diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/auth/ui/LoginScreen.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/auth/ui/LoginScreen.kt index d24bf1d..8f49e41 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/auth/ui/LoginScreen.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/auth/ui/LoginScreen.kt @@ -39,7 +39,7 @@ import io.github.jan.supabase.compose.auth.ui.ProviderIcon import io.github.jan.supabase.compose.auth.ui.annotations.AuthUiExperimental import io.github.jan.supabase.compose.auth.ui.email.OutlinedEmailField import io.github.jan.supabase.compose.auth.ui.password.OutlinedPasswordField -import io.github.jan.supabase.gotrue.providers.Google +import io.github.jan.supabase.auth.providers.Google import org.koin.compose.koinInject object LoginScreen : Screen { diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/data/remote/CardsApi.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/data/remote/CardsApi.kt index 5e20139..d8b6e7f 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/data/remote/CardsApi.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/data/remote/CardsApi.kt @@ -103,6 +103,7 @@ internal class CardsApiImpl( description: String, authorizedUsers: List ): CardDto { + println("hallooooo: " + authorizedUsers) return table.update({ CardDto::authorizedUsers setTo authorizedUsers CardDto::description setTo description diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/create/CardsCreateScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/create/CardsCreateScreenModel.kt index e19e505..8ede15f 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/create/CardsCreateScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/create/CardsCreateScreenModel.kt @@ -10,7 +10,7 @@ import io.github.jan.einkaufszettel.profile.data.local.ProfileDataSource import io.github.jan.einkaufszettel.profile.data.remote.ProfileApi import io.github.jan.einkaufszettel.root.data.local.image.LocalImageData import io.github.jan.einkaufszettel.root.data.local.image.LocalImageReader -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import io.github.vinceglb.filekit.core.PlatformFile import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/edit/CardEditScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/edit/CardEditScreenModel.kt index 4ffe6cb..af925f4 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/edit/CardEditScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/edit/CardEditScreenModel.kt @@ -31,11 +31,12 @@ class CardEditScreenModel( screenModelScope.launch { mutableState.value = AppState.Loading runCatching { - cardsApi.editCard(cardId, description, authorizedUsers) + cardsApi.editCard(cardId, description, authorizedUsers.filter { it.isNotBlank() }) }.onSuccess { cardsDataSource.insertCard(it) mutableState.value = State.Success }.onFailure { + it.printStackTrace() when (it) { is RestException -> mutableState.value = AppState.Error(it.message ?: "") else -> mutableState.value = AppState.NetworkError diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/main/CardsScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/main/CardsScreenModel.kt index ee2c1f4..f818121 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/main/CardsScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/cards/ui/screen/main/CardsScreenModel.kt @@ -7,8 +7,8 @@ import io.github.jan.einkaufszettel.app.ui.AppStateModel import io.github.jan.einkaufszettel.cards.data.local.CardsDataSource import io.github.jan.einkaufszettel.cards.data.remote.CardsApi import io.github.jan.supabase.exceptions.RestException -import io.github.jan.supabase.gotrue.Auth -import io.github.jan.supabase.gotrue.SessionStatus +import io.github.jan.supabase.auth.Auth +import io.github.jan.supabase.auth.SessionStatus import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.asStateFlow diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/home/ui/HomeScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/home/ui/HomeScreenModel.kt index 9284e36..cad6c9c 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/home/ui/HomeScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/home/ui/HomeScreenModel.kt @@ -7,7 +7,7 @@ import io.github.jan.einkaufszettel.shops.data.local.ShopDataSource import io.github.jan.einkaufszettel.shops.data.remote.ProductApi import io.github.jan.einkaufszettel.shops.data.remote.ShopDto import io.github.jan.einkaufszettel.shops.ui.screen.ShopProductScreenModel -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.combine diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/profile/data/local/ProfileDataSource.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/profile/data/local/ProfileDataSource.kt index aa9e4a8..a9e66f4 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/profile/data/local/ProfileDataSource.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/profile/data/local/ProfileDataSource.kt @@ -8,7 +8,7 @@ import app.cash.sqldelight.coroutines.mapToList import einkaufszettel.ProfileTable import io.github.jan.einkaufszettel.profile.data.remote.ProfileDto import io.github.jan.einkaufszettel.root.data.local.db.DatabaseProvider -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/profile/data/remote/ProfileApi.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/profile/data/remote/ProfileApi.kt index 410755c..723cc1c 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/profile/data/remote/ProfileApi.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/profile/data/remote/ProfileApi.kt @@ -1,6 +1,6 @@ package io.github.jan.einkaufszettel.profile.data.remote -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import io.github.jan.supabase.postgrest.Postgrest import kotlinx.serialization.Serializable diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/create/RecipeCreateScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/create/RecipeCreateScreenModel.kt index fa6c6ca..7155303 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/create/RecipeCreateScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/create/RecipeCreateScreenModel.kt @@ -8,7 +8,7 @@ import io.github.jan.einkaufszettel.recipes.ui.steps.RecipeModifyScreenModel import io.github.jan.einkaufszettel.root.data.local.image.LocalImageData import io.github.jan.einkaufszettel.root.data.local.image.LocalImageReader import io.github.jan.supabase.exceptions.RestException -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import kotlinx.coroutines.launch import kotlinx.datetime.Clock diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/edit/RecipeEditScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/edit/RecipeEditScreenModel.kt index e02ca75..056fb9d 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/edit/RecipeEditScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/edit/RecipeEditScreenModel.kt @@ -8,7 +8,7 @@ import io.github.jan.einkaufszettel.recipes.ui.steps.RecipeModifyScreenModel import io.github.jan.einkaufszettel.root.data.local.image.LocalImageData import io.github.jan.einkaufszettel.root.data.local.image.LocalImageReader import io.github.jan.supabase.exceptions.RestException -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/main/RecipeScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/main/RecipeScreenModel.kt index 5326287..afe6cdb 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/main/RecipeScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/main/RecipeScreenModel.kt @@ -7,8 +7,8 @@ import io.github.jan.einkaufszettel.app.ui.AppStateModel import io.github.jan.einkaufszettel.recipes.data.local.RecipeDataSource import io.github.jan.einkaufszettel.recipes.data.remote.RecipeApi import io.github.jan.supabase.exceptions.RestException -import io.github.jan.supabase.gotrue.Auth -import io.github.jan.supabase.gotrue.SessionStatus +import io.github.jan.supabase.auth.Auth +import io.github.jan.supabase.auth.SessionStatus import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.asStateFlow diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/steps/RecipeModifyScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/steps/RecipeModifyScreenModel.kt index e80eddf..dfd88f6 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/steps/RecipeModifyScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/recipes/ui/steps/RecipeModifyScreenModel.kt @@ -8,7 +8,7 @@ import io.github.jan.einkaufszettel.recipes.data.local.RecipeDataSource import io.github.jan.einkaufszettel.recipes.data.remote.RecipeApi import io.github.jan.einkaufszettel.root.data.local.image.LocalImageData import io.github.jan.einkaufszettel.root.data.local.image.LocalImageReader -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import io.github.vinceglb.filekit.core.PlatformFile import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/root/di/supabaseModule.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/root/di/supabaseModule.kt index 7792205..10f3662 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/root/di/supabaseModule.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/root/di/supabaseModule.kt @@ -3,15 +3,15 @@ package io.github.jan.einkaufszettel.root.di import io.github.jan.einkaufszettel.BuildConfig import io.github.jan.supabase.SupabaseClient import io.github.jan.supabase.annotations.SupabaseExperimental -import io.github.jan.supabase.coil.CoilIntegration -import io.github.jan.supabase.coil.coil +import io.github.jan.supabase.coil.Coil3Integration +import io.github.jan.supabase.coil.coil3 import io.github.jan.supabase.compose.auth.ComposeAuth import io.github.jan.supabase.compose.auth.composeAuth import io.github.jan.supabase.compose.auth.googleNativeLogin import io.github.jan.supabase.createSupabaseClient -import io.github.jan.supabase.gotrue.Auth -import io.github.jan.supabase.gotrue.FlowType -import io.github.jan.supabase.gotrue.auth +import io.github.jan.supabase.auth.Auth +import io.github.jan.supabase.auth.FlowType +import io.github.jan.supabase.auth.auth import io.github.jan.supabase.logging.LogLevel import io.github.jan.supabase.postgrest.Postgrest import io.github.jan.supabase.postgrest.postgrest @@ -32,7 +32,7 @@ val supabaseModule = module { } } single { - CoilIntegration.setLogLevel(LogLevel.INFO) + Coil3Integration.setLogLevel(LogLevel.INFO) createSupabaseClient(BuildConfig.SUPABASE_URL, BuildConfig.SUPABASE_KEY) { defaultSerializer = KotlinXSerializer(get()) defaultLogLevel = LogLevel.DEBUG @@ -46,7 +46,7 @@ val supabaseModule = module { install(ComposeAuth) { googleNativeLogin(BuildConfig.GOOGLE_CLIENT_ID) } - install(CoilIntegration) + install(Coil3Integration) } } single { @@ -62,6 +62,6 @@ val supabaseModule = module { get().composeAuth } single { - get().coil + get().coil3 } } \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/root/ui/screen/RootScreen.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/root/ui/screen/RootScreen.kt index 6efc165..efa8a2c 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/root/ui/screen/RootScreen.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/root/ui/screen/RootScreen.kt @@ -8,8 +8,8 @@ import cafe.adriel.voyager.navigator.Navigator import io.github.jan.einkaufszettel.app.ui.AppScreen import io.github.jan.einkaufszettel.auth.ui.LoginScreen import io.github.jan.einkaufszettel.root.ui.screen.authenticated.AuthenticatedScreen -import io.github.jan.supabase.gotrue.Auth -import io.github.jan.supabase.gotrue.SessionStatus +import io.github.jan.supabase.auth.Auth +import io.github.jan.supabase.auth.SessionStatus import org.koin.compose.koinInject object RootScreen: Screen { diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/settings/ui/SettingsScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/settings/ui/SettingsScreenModel.kt index c3e5b64..8efc4e3 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/settings/ui/SettingsScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/settings/ui/SettingsScreenModel.kt @@ -9,7 +9,7 @@ import io.github.jan.einkaufszettel.profile.data.remote.ProfileApi import io.github.jan.einkaufszettel.recipes.data.local.RecipeDataSource import io.github.jan.einkaufszettel.shops.data.local.ProductDataSource import io.github.jan.einkaufszettel.shops.data.local.ShopDataSource -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch @@ -50,7 +50,7 @@ class SettingsScreenModel( mutableState.value = AppState.Loading screenModelScope.launch { runCatching { - auth.modifyUser { + auth.updateUser { this.password = newPassword } }.onFailure { diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/ShopProductScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/ShopProductScreenModel.kt index 7954616..fa5d4af 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/ShopProductScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/ShopProductScreenModel.kt @@ -7,7 +7,7 @@ import io.github.jan.einkaufszettel.app.ui.AppStateModel import io.github.jan.einkaufszettel.shops.data.local.ProductDataSource import io.github.jan.einkaufszettel.shops.data.remote.ProductApi import io.github.jan.supabase.exceptions.RestException -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import kotlinx.coroutines.launch open class ShopProductScreenModel( diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/create/ShopCreateScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/create/ShopCreateScreenModel.kt index 44910c1..49a7ab6 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/create/ShopCreateScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/create/ShopCreateScreenModel.kt @@ -11,7 +11,7 @@ import io.github.jan.einkaufszettel.root.data.local.image.LocalImageReader import io.github.jan.einkaufszettel.shops.data.local.ShopDataSource import io.github.jan.einkaufszettel.shops.data.remote.ShopApi import io.github.jan.supabase.exceptions.RestException -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import io.github.vinceglb.filekit.core.PlatformFile import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/detail/ShopDetailScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/detail/ShopDetailScreenModel.kt index 8029951..11a57aa 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/detail/ShopDetailScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/detail/ShopDetailScreenModel.kt @@ -5,7 +5,7 @@ import io.github.jan.einkaufszettel.shops.data.local.ProductDataSource import io.github.jan.einkaufszettel.shops.data.local.ShopDataSource import io.github.jan.einkaufszettel.shops.data.remote.ProductApi import io.github.jan.einkaufszettel.shops.ui.screen.ShopProductScreenModel -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.stateIn diff --git a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/main/ShopScreenModel.kt b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/main/ShopScreenModel.kt index d4cf682..29463a9 100644 --- a/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/main/ShopScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/jan/einkaufszettel/shops/ui/screen/main/ShopScreenModel.kt @@ -5,8 +5,8 @@ import io.github.jan.einkaufszettel.app.ui.AppStateModel import io.github.jan.einkaufszettel.shops.data.local.ProductDataSource import io.github.jan.einkaufszettel.shops.data.local.ShopDataSource import io.github.jan.einkaufszettel.shops.data.remote.ShopApi -import io.github.jan.supabase.gotrue.Auth -import io.github.jan.supabase.gotrue.SessionStatus +import io.github.jan.supabase.auth.Auth +import io.github.jan.supabase.auth.SessionStatus import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.map diff --git a/composeApp/src/jsMain/kotlin/io/github/jan/einkaufszettel/Utils.js.kt b/composeApp/src/jsMain/kotlin/io/github/jan/einkaufszettel/Utils.js.kt index 85f57a9..61ef6c1 100644 --- a/composeApp/src/jsMain/kotlin/io/github/jan/einkaufszettel/Utils.js.kt +++ b/composeApp/src/jsMain/kotlin/io/github/jan/einkaufszettel/Utils.js.kt @@ -3,7 +3,7 @@ package io.github.jan.einkaufszettel import androidx.compose.runtime.Composable import androidx.compose.runtime.State import androidx.compose.runtime.collectAsState -import io.github.jan.supabase.gotrue.Auth +import io.github.jan.supabase.auth.Auth import io.ktor.http.URLBuilder import io.ktor.http.Url import kotlinx.browser.window diff --git a/composeApp/src/jsMain/kotlin/io/github/jan/einkaufszettel/auth/ui/AuthScreen.js.kt b/composeApp/src/jsMain/kotlin/io/github/jan/einkaufszettel/auth/ui/AuthScreen.js.kt index c1758f2..170f852 100644 --- a/composeApp/src/jsMain/kotlin/io/github/jan/einkaufszettel/auth/ui/AuthScreen.js.kt +++ b/composeApp/src/jsMain/kotlin/io/github/jan/einkaufszettel/auth/ui/AuthScreen.js.kt @@ -5,8 +5,8 @@ import io.github.jan.supabase.annotations.SupabaseInternal import io.github.jan.supabase.compose.auth.ComposeAuth import io.github.jan.supabase.compose.auth.composable.NativeSignInResult import io.github.jan.supabase.compose.auth.defaultLoginBehavior -import io.github.jan.supabase.gotrue.auth -import io.github.jan.supabase.gotrue.providers.Google +import io.github.jan.supabase.auth.auth +import io.github.jan.supabase.auth.providers.Google import kotlinx.browser.document @OptIn(SupabaseInternal::class) diff --git a/gradle.properties b/gradle.properties index 7f56df9..663f125 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,5 +17,5 @@ android.useAndroidX=true android.nonTransitiveRClass=true ##App -app.versionName=1.0.2 -app.versionCode=3 +app.versionName=1.0.3 +app.versionCode=4 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index deffc3d..4c0893b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,31 +1,31 @@ [versions] -kotlin = "2.0.10" +kotlin = "2.0.20" agp = "8.5.2" compose = "1.6.10" androidx-appcompat = "1.7.0" -androidx-activityCompose = "1.9.1" -compose-uitooling = "1.6.8" +androidx-activityCompose = "1.9.2" +compose-uitooling = "1.7.2" libres = "1.2.0" voyager = "1.1.0-beta02" -composeImageLoader = "1.8.2" +composeImageLoader = "1.8.3" buildConfig = "4.1.1" -kotlinx-coroutines = "1.8.1" -kotlinx-serialization = "1.7.1" -kotlinx-datetime = "0.6.0" +kotlinx-coroutines = "1.9.0" +kotlinx-serialization = "1.7.2" +kotlinx-datetime = "0.6.1" koin = "4.0.0-RC1" -ktor = "2.3.12" -sqlDelight = "2.0.1" -supabase = "2.6.0-coil3" -lifecycle = "2.8.4" +ktor = "3.0.0-rc-1" +sqlDelight = "2.0.2" +supabase = "3.0.0-beta-1" +lifecycle = "2.8.6" windowsizeclass = "0.5.0" -okio = "3.9.0" -richeditor = "1.0.0-rc05-k2" +okio = "3.9.1" +richeditor = "1.0.0-rc06" file-picker = "3.1.0" coil = "3.0.0-alpha10" zoomable = "1.6.1" semver = "2.0.0" -filekit = "0.8.0" +filekit = "0.8.2" [libraries] @@ -52,13 +52,13 @@ sqlDelight-driver-android = { module = "app.cash.sqldelight:android-driver", ver sqlDelight-driver-native = { module = "app.cash.sqldelight:native-driver", version.ref = "sqlDelight" } sqlDelight-driver-js = { module = "app.cash.sqldelight:web-worker-driver", version.ref = "sqlDelight" } sqlDelight-coroutines = { module = "app.cash.sqldelight:coroutines-extensions", version.ref = "sqlDelight" } -gotrue-kt = { module = "io.github.jan-tennert.supabase:gotrue-kt", version.ref = "supabase" } +gotrue-kt = { module = "io.github.jan-tennert.supabase:auth-kt", version.ref = "supabase" } storage-kt = { module = "io.github.jan-tennert.supabase:storage-kt", version.ref = "supabase" } postgrest-kt = { module = "io.github.jan-tennert.supabase:postgrest-kt", version.ref = "supabase" } realtime-kt = { module = "io.github.jan-tennert.supabase:realtime-kt", version.ref = "supabase" } compose-auth = { module = "io.github.jan-tennert.supabase:compose-auth", version.ref = "supabase" } compose-auth-ui = { module = "io.github.jan-tennert.supabase:compose-auth-ui", version.ref = "supabase" } -coil-integration = { module = "io.github.jan-tennert.supabase:coil-integration", version.ref = "supabase" } +coil-integration = { module = "io.github.jan-tennert.supabase:coil3-integration", version.ref = "supabase" } imageloader-integration = { module = "io.github.jan-tennert.supabase:imageloader-integration", version.ref = "supabase" } windowsizeclass = { module = "dev.chrisbanes.material3:material3-window-size-class-multiplatform", version.ref = "windowsizeclass" } ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" } diff --git a/gradlew b/gradlew old mode 100644 new mode 100755