From d70ba91a48e6c5f0fde6b8765a5f957b8cbda8ba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 16:52:50 +0100 Subject: [PATCH 1/4] [Oztechan/Global#12] Lock file maintenance (#3264) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- ios/Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index 9e16c5e9a1..adc61808f7 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -10,16 +10,16 @@ GEM artifactory (3.0.17) atomos (0.1.3) aws-eventstream (1.3.0) - aws-partitions (1.898.0) + aws-partitions (1.899.0) aws-sdk-core (3.191.4) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.77.0) + aws-sdk-kms (1.78.0) aws-sdk-core (~> 3, >= 3.191.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.145.0) + aws-sdk-s3 (1.146.0) aws-sdk-core (~> 3, >= 3.191.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.8) From f1f41920d8646a4207825ee230a6987706eb1008 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 23:18:23 +0100 Subject: [PATCH 2/4] [Oztechan/Global#12] Update geekyeggo/delete-artifact action to v5 (#3234) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- .github/workflows/main.yml | 6 +++--- .github/workflows/release.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6062a62d6d..7703c71938 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -144,7 +144,7 @@ jobs: file: huawei/release/app-huawei-release.apk - name: Delete Android Artifacts - uses: geekyeggo/delete-artifact@v4.1.0 + uses: geekyeggo/delete-artifact@v5.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} name: androidArtifacts @@ -235,7 +235,7 @@ jobs: fastlane distribute - name: Delete iOS IPA - uses: geekyeggo/delete-artifact@v4.1.0 + uses: geekyeggo/delete-artifact@v5.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} name: iOSArtifacts @@ -319,7 +319,7 @@ jobs: -Dsonar.coverage.jacoco.xmlReportPaths=build/report.xml - name: Delete Coverage Report - uses: geekyeggo/delete-artifact@v4.1.0 + uses: geekyeggo/delete-artifact@v5.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} name: coverageReport diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 22451c5da5..3e1a458370 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,7 +138,7 @@ jobs: status: completed - name: Delete App Bundle - uses: geekyeggo/delete-artifact@v4.1.0 + uses: geekyeggo/delete-artifact@v5.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} name: googleBundle @@ -170,7 +170,7 @@ jobs: file-name: "app-huawei-release" - name: Delete App Bundle - uses: geekyeggo/delete-artifact@v4.1.0 + uses: geekyeggo/delete-artifact@v5.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} name: huaweiBundle @@ -202,7 +202,7 @@ jobs: SOURCE: "artifact/" - name: Delete Backend Jar - uses: geekyeggo/delete-artifact@v4.1.0 + uses: geekyeggo/delete-artifact@v5.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} name: backendJar From 698a82303a3f3bbef52c1930b28482d7e2f3fef4 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Tue, 26 Mar 2024 10:15:58 +0100 Subject: [PATCH 3/4] [Oztechan/CCC#3265] Move banners in initView() (#3266) --- .../content/calculator/CalculatorFragment.kt | 24 ++++++++----------- .../content/currencies/CurrenciesFragment.kt | 22 ++++++++--------- .../content/settings/SettingsFragment.kt | 22 ++++++++--------- 3 files changed, 30 insertions(+), 38 deletions(-) diff --git a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/calculator/CalculatorFragment.kt b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/calculator/CalculatorFragment.kt index e1ed3b5424..841bb89829 100755 --- a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/calculator/CalculatorFragment.kt +++ b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/calculator/CalculatorFragment.kt @@ -32,8 +32,6 @@ import com.oztechan.ccc.client.viewmodel.calculator.CalculatorViewModel import com.oztechan.ccc.client.viewmodel.calculator.util.toValidList import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach -import kotlinx.coroutines.flow.onStart -import kotlinx.coroutines.launch import org.koin.android.ext.android.inject import org.koin.androidx.viewmodel.ext.android.viewModel @@ -85,24 +83,22 @@ class CalculatorFragment : BaseVBFragment() { calculatorViewModel.event.onBaseChange(it) } - private fun FragmentCalculatorBinding.initViews() = viewLifecycleOwner.lifecycleScope.launch { + private fun FragmentCalculatorBinding.initViews() { + adViewContainer.setBannerAd( + adManager = adManager, + adId = if (BuildConfig.DEBUG) { + getString(R.string.banner_ad_unit_id_calculator_debug) + } else { + getString(R.string.banner_ad_unit_id_calculator_release) + }, + shouldShowAd = calculatorViewModel.state.value.isBannerAdVisible + ) recyclerViewMain.adapter = calculatorAdapter } @SuppressLint("SetTextI18n") private fun FragmentCalculatorBinding.observeStates() = calculatorViewModel.state .flowWithLifecycle(lifecycle) - .onStart { - adViewContainer.setBannerAd( - adManager = adManager, - adId = if (BuildConfig.DEBUG) { - getString(R.string.banner_ad_unit_id_calculator_debug) - } else { - getString(R.string.banner_ad_unit_id_calculator_release) - }, - shouldShowAd = calculatorViewModel.state.value.isBannerAdVisible - ) - } .onEach { with(it) { calculatorAdapter.submitList(currencyList.toValidList(calculatorViewModel.state.value.base)) diff --git a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/currencies/CurrenciesFragment.kt b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/currencies/CurrenciesFragment.kt index 040d7c868b..e7752f6bd7 100755 --- a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/currencies/CurrenciesFragment.kt +++ b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/currencies/CurrenciesFragment.kt @@ -32,7 +32,6 @@ import com.oztechan.ccc.client.viewmodel.currencies.CurrenciesEffect import com.oztechan.ccc.client.viewmodel.currencies.CurrenciesViewModel import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach -import kotlinx.coroutines.flow.onStart import org.koin.android.ext.android.inject import org.koin.androidx.viewmodel.ext.android.viewModel @@ -65,6 +64,16 @@ class CurrenciesFragment : BaseVBFragment() { } private fun FragmentCurrenciesBinding.initViews() { + adViewContainer.setBannerAd( + adManager = adManager, + adId = if (BuildConfig.DEBUG) { + getString(R.string.banner_ad_unit_id_currencies_debug) + } else { + getString(R.string.banner_ad_unit_id_currencies_release) + }, + shouldShowAd = currenciesViewModel.state.value.isBannerAdVisible + ) + setSpanByOrientation(resources.configuration.orientation) with(recyclerViewCurrencies) { @@ -75,17 +84,6 @@ class CurrenciesFragment : BaseVBFragment() { private fun FragmentCurrenciesBinding.observeStates() = currenciesViewModel.state .flowWithLifecycle(lifecycle) - .onStart { - adViewContainer.setBannerAd( - adManager = adManager, - adId = if (BuildConfig.DEBUG) { - getString(R.string.banner_ad_unit_id_currencies_debug) - } else { - getString(R.string.banner_ad_unit_id_currencies_release) - }, - shouldShowAd = currenciesViewModel.state.value.isBannerAdVisible - ) - } .onEach { with(it) { currenciesAdapter.submitList(currencyList) diff --git a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/settings/SettingsFragment.kt b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/settings/SettingsFragment.kt index c837db507e..419541e6a2 100644 --- a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/settings/SettingsFragment.kt +++ b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/settings/SettingsFragment.kt @@ -36,7 +36,6 @@ import com.oztechan.ccc.client.viewmodel.settings.model.PremiumStatus import com.oztechan.ccc.client.viewmodel.settings.util.numberToIndex import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach -import kotlinx.coroutines.flow.onStart import org.koin.android.ext.android.inject import org.koin.androidx.viewmodel.ext.android.viewModel @@ -66,6 +65,16 @@ class SettingsFragment : BaseVBFragment() { @Suppress("LongMethod") private fun FragmentSettingsBinding.initViews() { + adViewContainer.setBannerAd( + adManager = adManager, + adId = if (BuildConfig.DEBUG) { + getString(R.string.banner_ad_unit_id_settings_debug) + } else { + getString(R.string.banner_ad_unit_id_settings_release) + }, + shouldShowAd = settingsViewModel.state.value.isBannerAdVisible + ) + with(itemCurrencies) { imgSettingsItem.setBackgroundResource(R.drawable.ic_currency) settingsItemTitle.text = getString(R.string.settings_item_currencies_title) @@ -131,17 +140,6 @@ class SettingsFragment : BaseVBFragment() { private fun FragmentSettingsBinding.observeStates() = settingsViewModel.state .flowWithLifecycle(lifecycle) - .onStart { - adViewContainer.setBannerAd( - adManager = adManager, - adId = if (BuildConfig.DEBUG) { - getString(R.string.banner_ad_unit_id_settings_debug) - } else { - getString(R.string.banner_ad_unit_id_settings_release) - }, - shouldShowAd = settingsViewModel.state.value.isBannerAdVisible - ) - } .onEach { with(it) { itemCurrencies.settingsItemValue.text = requireContext().getString( From 2f1b23f77d6278e43663925d5bde5bdbb3cc255b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 10:16:28 +0100 Subject: [PATCH 4/4] [Oztechan/Global#12] Update detekt to v1.23.6 (#3263) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 89daaeeb3f..538b3bbb3a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ kotlin = "1.9.23" ksp = "1.9.23-1.0.19" -detekt = "1.23.5" +detekt = "1.23.6" androidGradlePlugin = "8.2.2" composeCompiler = "1.5.11" compose = "1.6.3"