Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-tennert committed Sep 21, 2024
1 parent 58c11f1 commit a05790f
Show file tree
Hide file tree
Showing 29 changed files with 64 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ 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

@OptIn(ExperimentalCoilApi::class)
@Composable
internal fun App() = AppTheme {
val coil = koinInject<CoilIntegration>()
val coil = koinInject<Coil3Integration>()
setSingletonImageLoaderFactory {
createImageLoader(it, coil)
}
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ internal class CardsApiImpl(
description: String,
authorizedUsers: List<String>
): CardDto {
println("hallooooo: " + authorizedUsers)
return table.update({
CardDto::authorizedUsers setTo authorizedUsers
CardDto::description setTo description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,7 +32,7 @@ val supabaseModule = module {
}
}
single<SupabaseClient> {
CoilIntegration.setLogLevel(LogLevel.INFO)
Coil3Integration.setLogLevel(LogLevel.INFO)
createSupabaseClient(BuildConfig.SUPABASE_URL, BuildConfig.SUPABASE_KEY) {
defaultSerializer = KotlinXSerializer(get())
defaultLogLevel = LogLevel.DEBUG
Expand All @@ -46,7 +46,7 @@ val supabaseModule = module {
install(ComposeAuth) {
googleNativeLogin(BuildConfig.GOOGLE_CLIENT_ID)
}
install(CoilIntegration)
install(Coil3Integration)
}
}
single<Auth> {
Expand All @@ -62,6 +62,6 @@ val supabaseModule = module {
get<SupabaseClient>().composeAuth
}
single {
get<SupabaseClient>().coil
get<SupabaseClient>().coil3
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -50,7 +50,7 @@ class SettingsScreenModel(
mutableState.value = AppState.Loading
screenModelScope.launch {
runCatching {
auth.modifyUser {
auth.updateUser {
this.password = newPassword
}
}.onFailure {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
32 changes: 16 additions & 16 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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]

Expand All @@ -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" }
Expand Down
Empty file modified gradlew
100644 → 100755
Empty file.

0 comments on commit a05790f

Please sign in to comment.