From f423ea0b22d17069f7d28f1c71429e8dfdc4932a Mon Sep 17 00:00:00 2001 From: Artem Klimenko <17786225+Velkonost@users.noreply.github.com> Date: Sat, 27 Jan 2024 15:44:52 +0600 Subject: [PATCH] 5472 --- shared/core/util/build.gradle.kts | 8 ++++---- .../getbetter/shared/features/social/SocialViewModel.kt | 1 - .../shared/features/social/contracts/SocialViewState.kt | 4 +++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/shared/core/util/build.gradle.kts b/shared/core/util/build.gradle.kts index c0767ee4..a67cc512 100644 --- a/shared/core/util/build.gradle.kts +++ b/shared/core/util/build.gradle.kts @@ -1,9 +1,8 @@ @file:Suppress("DSL_SCOPE_VIOLATION") +import com.codingfeline.buildkonfig.compiler.FieldSpec.Type.INT import com.velkonost.getbetter.SHARED_PACKAGE import com.velkonost.getbetter.join -import com.codingfeline.buildkonfig.compiler.FieldSpec.Type.STRING -import com.codingfeline.buildkonfig.compiler.FieldSpec.Type.INT plugins { @@ -43,13 +42,14 @@ buildkonfig { exposeObjectWithName = "UtilBuildKonfig" defaultConfigs { - buildConfigField(STRING, "name", "value") + buildConfigField(INT, "AD_ID", "") + buildConfigField(INT, "RUSTORE_AD_ID", 1494678.toString()) } targetConfigs { create("android") { - buildConfigField(INT, "RUSTORE_AD_ID", 1494678.toString()) buildConfigField(INT, "AD_ID", 1494645.toString()) + buildConfigField(INT, "RUSTORE_AD_ID", 1494678.toString()) } create("ios") { diff --git a/shared/features/social/presentation/src/commonMain/kotlin/com/velkonost/getbetter/shared/features/social/SocialViewModel.kt b/shared/features/social/presentation/src/commonMain/kotlin/com/velkonost/getbetter/shared/features/social/SocialViewModel.kt index 3a2f233e..83716a49 100644 --- a/shared/features/social/presentation/src/commonMain/kotlin/com/velkonost/getbetter/shared/features/social/SocialViewModel.kt +++ b/shared/features/social/presentation/src/commonMain/kotlin/com/velkonost/getbetter/shared/features/social/SocialViewModel.kt @@ -36,7 +36,6 @@ internal constructor( private val likesJobsMap: HashMap = hashMapOf() fun onAppear() { - checkUpdatedNote() launchJob { diff --git a/shared/features/social/presentation/src/commonMain/kotlin/com/velkonost/getbetter/shared/features/social/contracts/SocialViewState.kt b/shared/features/social/presentation/src/commonMain/kotlin/com/velkonost/getbetter/shared/features/social/contracts/SocialViewState.kt index 9153d328..4f70d5f9 100644 --- a/shared/features/social/presentation/src/commonMain/kotlin/com/velkonost/getbetter/shared/features/social/contracts/SocialViewState.kt +++ b/shared/features/social/presentation/src/commonMain/kotlin/com/velkonost/getbetter/shared/features/social/contracts/SocialViewState.kt @@ -1,5 +1,6 @@ package com.velkonost.getbetter.shared.features.social.contracts +import com.velkonost.getbetter.UtilBuildKonfig import com.velkonost.getbetter.shared.core.model.note.Note import com.velkonost.getbetter.shared.core.util.PrefetchDistanceValue import com.velkonost.getbetter.shared.core.vm.contracts.UIContract @@ -9,7 +10,8 @@ data class SocialViewState( val tabs: List = SocialTab.entries, val generalFeed: FeedViewState = FeedViewState(), val areasFeed: FeedViewState = FeedViewState(), - val adPosition: Int = (6..10).random() + val adPosition: Int = (6..10).random(), + val adId: Int = UtilBuildKonfig.AD_ID//UtilBuildKonfig.RUSTORE_AD_ID ) : UIContract.State data class FeedViewState(