From bf69a4854e73854896b662fd0d6892e11b4de776 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Wed, 15 Mar 2023 18:17:29 +0100 Subject: [PATCH 01/44] [Oztechan/CCC#2203] Update Privacy Policy (#2204) * [Oztechan/CCC#2203] Update Privacy Policy * [Oztechan/CCC#2203] Update Privacy Policy --- PrivacyPolicy.md | 52 ++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/PrivacyPolicy.md b/PrivacyPolicy.md index 9344c95793..4107321378 100644 --- a/PrivacyPolicy.md +++ b/PrivacyPolicy.md @@ -1,63 +1,67 @@ ## Privacy Policy -built the Currency Converter Calculator app as a Free app. This SERVICE is provided by at no cost and is intended for use as is. +Oztechan built the Currency Converter&Calculator app as an Ad Supported app. This SERVICE is provided by Oztechan at no cost and is intended for use as is. -This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. +This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service. -If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. +If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. We will not use or share your information with anyone except as described in this Privacy Policy. -The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Currency Converter Calculator unless otherwise defined in this Privacy Policy. +The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at Currency Converter&Calculator unless otherwise defined in this Privacy Policy. ## Information Collection and Use -For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I request will be retained on your device and is not collected by me in any way. +For a better experience, while using our Service, we may require you to provide us with certain personally identifiable information. The information that we request will be retained by us and used as described in this privacy policy. -The app does use third party services that may collect information used to identify you. +The app does use third-party services that may collect information used to identify you. -Link to privacy policy of third party service providers used by the app +Link to the privacy policy of third-party service providers used by the app + +* [Google Play Services](https://www.google.com/policies/privacy/) +* [AdMob](https://support.google.com/admob/answer/6128543?hl=en) +* [Google Analytics for Firebase](https://firebase.google.com/policies/analytics) +* [Firebase Crashlytics](https://firebase.google.com/support/privacy/) -* [Google Play Services](https://www.google.com/policies/privacy/) -* [AdMob](https://support.google.com/admob/answer/6128543?hl=en) -* [Firebase Analytics](https://firebase.google.com/policies/analytics) ## Log Data -I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics. +We want to inform you that whenever you use our Service, in a case of an error in the app we collect data and information (through third-party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing our Service, the time and date of your use of the Service, and other statistics. ## Cookies Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory. -This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service. +This Service does not use these “cookies” explicitly. However, the app may use third-party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service. ## Service Providers -I may employ third-party companies and individuals due to the following reasons: +We may employ third-party companies and individuals due to the following reasons: -* To facilitate our Service; -* To provide the Service on our behalf; -* To perform Service-related services; or -* To assist us in analyzing how our Service is used. +* To facilitate our Service; +* To provide the Service on our behalf; +* To perform Service-related services; or +* To assist us in analyzing how our Service is used. -I want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose. +We want to inform users of this Service that these third parties have access to their Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose. ## Security -I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security. +We value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and we cannot guarantee its absolute security. ## Links to Other Sites -This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services. +This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by us. Therefore, we strongly advise you to review the Privacy Policy of these websites. We have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services. ## Children’s Privacy -These Services do not address anyone under the age of 13\. I do not knowingly collect personally identifiable information from children under 13\. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions. +These Services do not address anyone under the age of 13. We do not knowingly collect personally identifiable information from children under 13 years of age. In the case we discover that a child under 13 has provided us with personal information, we immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact us so that we will be able to do the necessary actions. ## Changes to This Privacy Policy -I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page. +We may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. We will notify you of any changes by posting the new Privacy Policy on this page. + +This policy is effective as of 2023-03-15 ## Contact Us -If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me. +If you have any questions or suggestions about our Privacy Policy, do not hesitate to contact us at oztechan@gmail.com. -This privacy policy page was created at [privacypolicytemplate.net](https://privacypolicytemplate.net) and modified/generated by [App Privacy Policy Generator](https://app-privacy-policy-generator.firebaseapp.com/) +This privacy policy page was created at [privacypolicytemplate.net](https://privacypolicytemplate.net) and modified/generated by [App Privacy Policy Generator](https://app-privacy-policy-generator.nisrulz.com/) \ No newline at end of file From 11215af128d1de191306d7c68786659c348cb2fd Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Fri, 17 Mar 2023 09:21:30 +0100 Subject: [PATCH 02/44] [Oztechan/CCC#2206] Refactor CalculateOutput method (#2207) --- .../calculator/CalculatorViewModel.kt | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt b/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt index 54c64babd0..6f546b5c02 100644 --- a/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt +++ b/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt @@ -5,7 +5,6 @@ package com.oztechan.ccc.client.viewmodel.calculator import co.touchlab.kermit.Logger import com.github.submob.scopemob.mapTo -import com.github.submob.scopemob.whether import com.github.submob.scopemob.whetherNot import com.oztechan.ccc.client.core.analytics.AnalyticsManager import com.oztechan.ccc.client.core.analytics.model.Event @@ -147,24 +146,26 @@ class CalculatorViewModel( } private fun calculateOutput(input: String) = viewModelScope.launch { - data.parser + val output = data.parser .calculate(input.toSupportedCharacters(), MAXIMUM_FLOATING_POINT) .mapTo { if (isFinite()) getFormatted(calculationStorage.precision) else "" } - .whether( - { output -> output.length <= MAXIMUM_OUTPUT }, - { input.length <= MAXIMUM_INPUT } - )?.let { output -> - _state.update { copy(output = output) } - state.value.currencyList.size - .whether { it < MINIMUM_ACTIVE_CURRENCY } - ?.whetherNot { state.value.input.isEmpty() } - ?.let { _effect.emit(CalculatorEffect.FewCurrency) } - ?: run { fetchConversion() } - } ?: run { - _effect.emit(CalculatorEffect.TooBigNumber) - _state.update { - copy(input = input.dropLast(1)) + + _state.update { copy(output = output) } + + when { + input.length > MAXIMUM_INPUT -> { + _effect.emit(CalculatorEffect.TooBigNumber) + _state.update { copy(input = input.dropLast(1)) } } + + output.length > MAXIMUM_OUTPUT -> { + _effect.emit(CalculatorEffect.TooBigNumber) + _state.update { copy(input = input.dropLast(1)) } + } + + state.value.currencyList.size < MINIMUM_ACTIVE_CURRENCY -> _effect.emit(CalculatorEffect.FewCurrency) + + else -> fetchConversion() } } From 4be6f09cebacde9e1a416781dafad202e64a5ae9 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Fri, 17 Mar 2023 11:12:16 +0100 Subject: [PATCH 03/44] [Oztechan/CCC#2208] Separate TooBigNumber to TooBigInput and TooBigOutput (#2209) * [Oztechan/CCC#2206] Refactor CalculateOutput method * [Oztechan/CCC#2208] Separate TooBigNumber to TooBigInput and TooBigOutput * [Oztechan/CCC#2208] Separate TooBigNumber to TooBigInput and TooBigOutput * [Oztechan/CCC#2208] Separate TooBigNumber to TooBigInput and TooBigOutput --- .../ui/mobile/content/calculator/CalculatorFragment.kt | 2 ++ .../ccc/client/viewmodel/calculator/CalculatorSEED.kt | 2 ++ .../client/viewmodel/calculator/CalculatorViewModel.kt | 4 ++-- .../viewmodel/calculator/CalculatorViewModelTest.kt | 8 ++++---- 4 files changed, 10 insertions(+), 6 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 4f04325152..e29148baa1 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 @@ -152,6 +152,8 @@ class CalculatorFragment : BaseVBFragment() { viewEffect.text, icon = viewEffect.code.getImageIdByName() ) + + else -> TODO("will be removed") } }.launchIn(viewLifecycleOwner.lifecycleScope) diff --git a/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorSEED.kt b/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorSEED.kt index 79ca52c3af..f464e6e077 100644 --- a/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorSEED.kt +++ b/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorSEED.kt @@ -39,6 +39,8 @@ sealed class CalculatorEffect : BaseEffect() { object Error : CalculatorEffect() object FewCurrency : CalculatorEffect() object OpenBar : CalculatorEffect() + object TooBigInput : CalculatorEffect() + object TooBigOutput : CalculatorEffect() object TooBigNumber : CalculatorEffect() object OpenSettings : CalculatorEffect() object ShowPasteRequest : CalculatorEffect() diff --git a/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt b/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt index 6f546b5c02..3bdfc7c47e 100644 --- a/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt +++ b/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt @@ -154,12 +154,12 @@ class CalculatorViewModel( when { input.length > MAXIMUM_INPUT -> { - _effect.emit(CalculatorEffect.TooBigNumber) + _effect.emit(CalculatorEffect.TooBigInput) _state.update { copy(input = input.dropLast(1)) } } output.length > MAXIMUM_OUTPUT -> { - _effect.emit(CalculatorEffect.TooBigNumber) + _effect.emit(CalculatorEffect.TooBigOutput) _state.update { copy(input = input.dropLast(1)) } } diff --git a/client/viewmodel/calculator/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModelTest.kt b/client/viewmodel/calculator/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModelTest.kt index 1af7f2c28b..fa54737ac5 100644 --- a/client/viewmodel/calculator/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModelTest.kt +++ b/client/viewmodel/calculator/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModelTest.kt @@ -235,24 +235,24 @@ internal class CalculatorViewModelTest { } @Test - fun `when input is too long it should drop the last digit and give warning`() = runTest { + fun `when input is too long it should drop the last digit and give TooBigInput effect`() = runTest { val fortyFiveDigitNumber = "1234567890+1234567890+1234567890+1234567890+1" viewModel.effect.onSubscription { viewModel.event.onKeyPress(fortyFiveDigitNumber) }.firstOrNull().let { - assertIs(it) + assertIs(it) assertFalse { viewModel.state.value.loading } assertEquals(fortyFiveDigitNumber.dropLast(1), viewModel.state.value.input) } } @Test - fun `when output is too long it should drop the last digit and give warning`() = runTest { + fun `when output is too long it should drop the last digit and give TooBigOutput effect`() = runTest { val nineteenDigitNumber = "123 567 901 345 789" viewModel.effect.onSubscription { viewModel.event.onKeyPress(nineteenDigitNumber) }.firstOrNull().let { - assertIs(it) + assertIs(it) assertFalse { viewModel.state.value.loading } assertEquals(nineteenDigitNumber.dropLast(1), viewModel.state.value.input) } From cf9b095e893b2205f7a68f653c158d4b81764862 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Fri, 17 Mar 2023 11:31:09 +0100 Subject: [PATCH 04/44] [Oztechan/CCC#2210] Move Android to new Input/Output check (#2212) * [Oztechan/CCC#2206] Refactor CalculateOutput method * [Oztechan/CCC#2208] Separate TooBigNumber to TooBigInput and TooBigOutput * [Oztechan/CCC#2208] Separate TooBigNumber to TooBigInput and TooBigOutput * [Oztechan/CCC#2208] Separate TooBigNumber to TooBigInput and TooBigOutput * [Oztechan/CCC#2210] Move Android to new Input/Output check * [Oztechan/CCC#2210] Move Android to new Input/Output check --- .../android/ui/mobile/content/calculator/CalculatorFragment.kt | 2 ++ client/core/res/src/commonMain/resources/MR/base/strings.xml | 2 ++ 2 files changed, 4 insertions(+) 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 e29148baa1..270ca97d03 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 @@ -128,6 +128,8 @@ class CalculatorFragment : BaseVBFragment() { } CalculatorEffect.TooBigNumber -> view?.showSnack(R.string.text_too_big_number) + CalculatorEffect.TooBigInput -> view?.showSnack(R.string.text_too_big_input) + CalculatorEffect.TooBigOutput -> view?.showSnack(R.string.text_too_big_output) CalculatorEffect.OpenBar -> navigate( R.id.calculatorFragment, CalculatorFragmentDirections.actionCalculatorFragmentToSelectCurrencyBottomSheet() diff --git a/client/core/res/src/commonMain/resources/MR/base/strings.xml b/client/core/res/src/commonMain/resources/MR/base/strings.xml index eeda4f6487..5814b0a8a5 100644 --- a/client/core/res/src/commonMain/resources/MR/base/strings.xml +++ b/client/core/res/src/commonMain/resources/MR/base/strings.xml @@ -40,6 +40,8 @@ OK Select Cancel + The input is too long. + The output is too long. Too big number. Online! Last update: %s Cached! Last update: %s From 79b6750c409acf1dcd811d4a4b0f096f56898198 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Fri, 17 Mar 2023 12:01:37 +0100 Subject: [PATCH 05/44] [Oztechan/CCC#2211] Move iOS to new Input/Output check (#2213) --- ios/CCC/UI/Calculator/CalculatorView.swift | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ios/CCC/UI/Calculator/CalculatorView.swift b/ios/CCC/UI/Calculator/CalculatorView.swift index e34a37cc6d..5875aca9cf 100644 --- a/ios/CCC/UI/Calculator/CalculatorView.swift +++ b/ios/CCC/UI/Calculator/CalculatorView.swift @@ -24,6 +24,8 @@ struct CalculatorView: View { @EnvironmentObject private var navigationStack: NavigationStackCompat @State var isBarShown = false @State var isTooBigNumberSnackShown = false + @State var isTooBigInputSnackShown = false + @State var isTooBigOutputSnackShown = false @State var isGenericErrorSnackShown = false @State var isFewCurrencySnackShown = false @State var isCopyClipboardSnackShown = false @@ -107,6 +109,20 @@ struct CalculatorView: View { ) { SnackView(text: Res.strings().text_too_big_number.get()) } + .popup( + isPresented: $isTooBigInputSnackShown, + type: .toast, + autohideIn: 2.0 + ) { + SnackView(text: Res.strings().text_too_big_input.get()) + } + .popup( + isPresented: $isTooBigOutputSnackShown, + type: .toast, + autohideIn: 2.0 + ) { + SnackView(text: Res.strings().text_too_big_output.get()) + } .popup(isPresented: $isPasteRequestSnackShown, type: .toast, autohideIn: 2.0 @@ -175,6 +191,7 @@ struct CalculatorView: View { .onReceive(observable.effect) { onEffect(effect: $0) } } + // swiftlint:disable:next cyclomatic_complexity private func onEffect(effect: CalculatorEffect) { logger.i(message: { "CalculatorView onEffect \(effect.description)" }) switch effect { @@ -184,6 +201,10 @@ struct CalculatorView: View { isFewCurrencySnackShown.toggle() case is CalculatorEffect.TooBigNumber: isTooBigNumberSnackShown.toggle() + case is CalculatorEffect.TooBigInput: + isTooBigInputSnackShown.toggle() + case is CalculatorEffect.TooBigOutput: + isTooBigOutputSnackShown.toggle() case is CalculatorEffect.OpenBar: isBarShown = true case is CalculatorEffect.OpenSettings: From aa7386b863199436b338f2a34cb55dc72e33878f Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Fri, 17 Mar 2023 12:39:16 +0100 Subject: [PATCH 06/44] [Oztechan/CCC#2214] Remove/Replace TooBigNumber logic (#2215) --- .../mobile/content/calculator/CalculatorFragment.kt | 3 --- .../ui/mobile/content/watchers/WatchersView.kt | 2 +- .../res/src/commonMain/resources/MR/base/strings.xml | 1 - .../ccc/client/viewmodel/calculator/CalculatorSEED.kt | 1 - .../ccc/client/viewmodel/watchers/WatchersSEED.kt | 2 +- .../client/viewmodel/watchers/WatchersViewModel.kt | 2 +- .../viewmodel/watchers/WatchersViewModelTest.kt | 2 +- ios/CCC/UI/Calculator/CalculatorView.swift | 11 ----------- ios/CCC/UI/Watchers/WatchersView.swift | 10 +++++----- 9 files changed, 9 insertions(+), 25 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 270ca97d03..21c1eff3d8 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 @@ -127,7 +127,6 @@ class CalculatorFragment : BaseVBFragment() { ) } - CalculatorEffect.TooBigNumber -> view?.showSnack(R.string.text_too_big_number) CalculatorEffect.TooBigInput -> view?.showSnack(R.string.text_too_big_input) CalculatorEffect.TooBigOutput -> view?.showSnack(R.string.text_too_big_output) CalculatorEffect.OpenBar -> navigate( @@ -154,8 +153,6 @@ class CalculatorFragment : BaseVBFragment() { viewEffect.text, icon = viewEffect.code.getImageIdByName() ) - - else -> TODO("will be removed") } }.launchIn(viewLifecycleOwner.lifecycleScope) diff --git a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/watchers/WatchersView.kt b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/watchers/WatchersView.kt index 931da3f1c0..f3ac2f5470 100644 --- a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/watchers/WatchersView.kt +++ b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/watchers/WatchersView.kt @@ -53,7 +53,7 @@ fun NavHostController.WatchersView( is WatchersEffect.SelectTarget -> navigate("select_currency") WatchersEffect.InvalidInput -> snackbarHostState.showSnackbar(it.javaClass.simpleName) WatchersEffect.MaximumNumberOfWatchers -> snackbarHostState.showSnackbar(it.javaClass.simpleName) - WatchersEffect.TooBigNumber -> snackbarHostState.showSnackbar(it.javaClass.simpleName) + WatchersEffect.TooBigInput -> snackbarHostState.showSnackbar(it.javaClass.simpleName) } } } diff --git a/client/core/res/src/commonMain/resources/MR/base/strings.xml b/client/core/res/src/commonMain/resources/MR/base/strings.xml index 5814b0a8a5..506086fdfc 100644 --- a/client/core/res/src/commonMain/resources/MR/base/strings.xml +++ b/client/core/res/src/commonMain/resources/MR/base/strings.xml @@ -42,7 +42,6 @@ Cancel The input is too long. The output is too long. - Too big number. Online! Last update: %s Cached! Last update: %s Offline! Last update: %s diff --git a/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorSEED.kt b/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorSEED.kt index f464e6e077..ff7392b5f4 100644 --- a/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorSEED.kt +++ b/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorSEED.kt @@ -41,7 +41,6 @@ sealed class CalculatorEffect : BaseEffect() { object OpenBar : CalculatorEffect() object TooBigInput : CalculatorEffect() object TooBigOutput : CalculatorEffect() - object TooBigNumber : CalculatorEffect() object OpenSettings : CalculatorEffect() object ShowPasteRequest : CalculatorEffect() data class CopyToClipboard(val amount: String) : CalculatorEffect() diff --git a/client/viewmodel/watchers/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersSEED.kt b/client/viewmodel/watchers/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersSEED.kt index 894c3bc6ca..c8ce55bd2b 100644 --- a/client/viewmodel/watchers/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersSEED.kt +++ b/client/viewmodel/watchers/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersSEED.kt @@ -14,7 +14,7 @@ sealed class WatchersEffect : BaseEffect() { object Back : WatchersEffect() data class SelectBase(val watcher: Watcher) : WatchersEffect() data class SelectTarget(val watcher: Watcher) : WatchersEffect() - object TooBigNumber : WatchersEffect() + object TooBigInput : WatchersEffect() object InvalidInput : WatchersEffect() object MaximumNumberOfWatchers : WatchersEffect() } diff --git a/client/viewmodel/watchers/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersViewModel.kt b/client/viewmodel/watchers/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersViewModel.kt index c059e1638b..1598829673 100644 --- a/client/viewmodel/watchers/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersViewModel.kt +++ b/client/viewmodel/watchers/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersViewModel.kt @@ -105,7 +105,7 @@ class WatchersViewModel( Logger.d { "WatcherViewModel onRateChange $watcher $rate" } return if (rate.length > MAXIMUM_INPUT) { - viewModelScope.launch { _effect.emit(WatchersEffect.TooBigNumber) } + viewModelScope.launch { _effect.emit(WatchersEffect.TooBigInput) } rate.dropLast(1) } else { rate.toSupportedCharacters().toStandardDigits().toDoubleOrNull()?.let { diff --git a/client/viewmodel/watchers/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersViewModelTest.kt b/client/viewmodel/watchers/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersViewModelTest.kt index f839e638f5..fc46d3f7f2 100644 --- a/client/viewmodel/watchers/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersViewModelTest.kt +++ b/client/viewmodel/watchers/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/watchers/WatchersViewModelTest.kt @@ -248,7 +248,7 @@ internal class WatchersViewModelTest { assertEquals(rate.dropLast(1), viewModel.event.onRateChange(watcher, rate)) }.firstOrNull().let { assertNotNull(it) - assertIs(it) + assertIs(it) } } } diff --git a/ios/CCC/UI/Calculator/CalculatorView.swift b/ios/CCC/UI/Calculator/CalculatorView.swift index 5875aca9cf..db95fe458d 100644 --- a/ios/CCC/UI/Calculator/CalculatorView.swift +++ b/ios/CCC/UI/Calculator/CalculatorView.swift @@ -23,7 +23,6 @@ struct CalculatorView: View { @Environment(\.colorScheme) var colorScheme @EnvironmentObject private var navigationStack: NavigationStackCompat @State var isBarShown = false - @State var isTooBigNumberSnackShown = false @State var isTooBigInputSnackShown = false @State var isTooBigOutputSnackShown = false @State var isGenericErrorSnackShown = false @@ -102,13 +101,6 @@ struct CalculatorView: View { .navigationBarHidden(true) } .navigationViewStyle(StackNavigationViewStyle()) - .popup( - isPresented: $isTooBigNumberSnackShown, - type: .toast, - autohideIn: 2.0 - ) { - SnackView(text: Res.strings().text_too_big_number.get()) - } .popup( isPresented: $isTooBigInputSnackShown, type: .toast, @@ -191,7 +183,6 @@ struct CalculatorView: View { .onReceive(observable.effect) { onEffect(effect: $0) } } - // swiftlint:disable:next cyclomatic_complexity private func onEffect(effect: CalculatorEffect) { logger.i(message: { "CalculatorView onEffect \(effect.description)" }) switch effect { @@ -199,8 +190,6 @@ struct CalculatorView: View { isGenericErrorSnackShown.toggle() case is CalculatorEffect.FewCurrency: isFewCurrencySnackShown.toggle() - case is CalculatorEffect.TooBigNumber: - isTooBigNumberSnackShown.toggle() case is CalculatorEffect.TooBigInput: isTooBigInputSnackShown.toggle() case is CalculatorEffect.TooBigOutput: diff --git a/ios/CCC/UI/Watchers/WatchersView.swift b/ios/CCC/UI/Watchers/WatchersView.swift index 89eb30774f..658e6b3734 100644 --- a/ios/CCC/UI/Watchers/WatchersView.swift +++ b/ios/CCC/UI/Watchers/WatchersView.swift @@ -27,7 +27,7 @@ struct WatchersView: View { @State var targetBarInfo = BarInfo(isShown: false, watcher: nil) @State var isInvalidInputSnackShown = false @State var isMaxWatchersSnackShown = false - @State var isTooBigNumberSnackShown = false + @State var isTooBigInputSnackShown = false private let analyticsManager: AnalyticsManager = koin.get() @@ -127,11 +127,11 @@ struct WatchersView: View { SnackView(text: Res.strings().text_maximum_number_of_watchers.get()) } .popup( - isPresented: $isTooBigNumberSnackShown, + isPresented: $isTooBigInputSnackShown, type: .toast, autohideIn: 2.0 ) { - SnackView(text: Res.strings().text_too_big_number.get()) + SnackView(text: Res.strings().text_too_big_input.get()) } .sheet( isPresented: $baseBarInfo.isShown, @@ -190,8 +190,8 @@ struct WatchersView: View { case let selectTargetEffect as WatchersEffect.SelectTarget: targetBarInfo.watcher = selectTargetEffect.watcher targetBarInfo.isShown.toggle() - case is WatchersEffect.TooBigNumber: - isTooBigNumberSnackShown.toggle() + case is WatchersEffect.TooBigInput: + isTooBigInputSnackShown.toggle() case is WatchersEffect.InvalidInput: isInvalidInputSnackShown.toggle() case is WatchersEffect.MaximumNumberOfWatchers: From e0ecb25e672b40380e51db37f6a7aebcd50ee964 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 19 Mar 2023 12:29:38 +0100 Subject: [PATCH 07/44] [Oztechan/CCC#2220] Fix iOS Interstitial ad crash when attempting to show it on background (#2221) --- ios/CCC/Util/InterstitialAd.swift | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ios/CCC/Util/InterstitialAd.swift b/ios/CCC/Util/InterstitialAd.swift index a9c0a91085..75fc427389 100644 --- a/ios/CCC/Util/InterstitialAd.swift +++ b/ios/CCC/Util/InterstitialAd.swift @@ -20,10 +20,14 @@ final class InterstitialAd: NSObject, GADFullScreenContentDelegate { return } - interstitialAd?.fullScreenContentDelegate = self - interstitialAd?.present( - fromRootViewController: WindowUtil.getCurrentController() - ) + if UIApplication.shared.applicationState == .active { + interstitialAd?.fullScreenContentDelegate = self + interstitialAd?.present( + fromRootViewController: WindowUtil.getCurrentController() + ) + } else { + logger.d(message: { "InterstitialAd not showed appState is not active" }) + } } ) } From 57a75814c78a27046d387c1ca49e305a1a42cbf7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Mar 2023 12:36:29 +0100 Subject: [PATCH 08/44] [Oztechan/CCC#1457] Dependency update submodule/scopemob digest to 34e1cc1 (#2219) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/scopemob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/scopemob b/submodule/scopemob index ff09a48d14..34e1cc111c 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit ff09a48d1479b0dee0c463cb156a5df43c4a5a8e +Subproject commit 34e1cc111cfaea98ad3a85b19089a5b74190d4dd From 24c02a53f51e3b690d16f52a4c6e46d8016965bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Mar 2023 12:36:38 +0100 Subject: [PATCH 09/44] [Oztechan/CCC#1457] Dependency update submodule/parsermob digest to e0bb972 (#2218) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/parsermob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/parsermob b/submodule/parsermob index 13d2f13bab..e0bb972276 160000 --- a/submodule/parsermob +++ b/submodule/parsermob @@ -1 +1 @@ -Subproject commit 13d2f13babc723a21feeda004a50ab613db08085 +Subproject commit e0bb9722761f92d0632106938e198f140e46bc06 From 256aff50b4a65d574d316cd005aec857eaaec0c1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Mar 2023 12:36:47 +0100 Subject: [PATCH 10/44] [Oztechan/CCC#1457] Dependency update submodule/logmob digest to 167073a (#2217) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/logmob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/logmob b/submodule/logmob index 661d66fa17..167073aab7 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 661d66fa17a49bafa3bee3190b64255b6c28c442 +Subproject commit 167073aab763c2a48e6cb6c7f4045096c99ec77c From 809f9d846494977cae39c1e19ef84a26a07f54f1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Mar 2023 12:36:56 +0100 Subject: [PATCH 11/44] [Oztechan/CCC#1457] Dependency update submodule/basemob digest to c37aa95 (#2216) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/basemob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/basemob b/submodule/basemob index 9d52a02078..c37aa95c47 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit 9d52a02078d72965330dd88b25cfb20b5fbd3b35 +Subproject commit c37aa95c476791aa523e1984cc982941b3ead29f From 277117a8daf7adecc9806719601b17c41d6a86d9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Mar 2023 12:37:05 +0100 Subject: [PATCH 12/44] [Oztechan/CCC#1457] Dependency update dependency com.huawei.hms:ads-prime to v3.4.61.304 (#2202) Signed-off-by: Mustafa Ozhan 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 a08f9bdace..7a9cf818f9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -25,7 +25,7 @@ firebasePer = "20.3.1" firebasePerPlugin = "1.4.2" crashlytics = "2.9.4" googleAds = "21.5.0" -huaweiAds = "3.4.61.303" +huaweiAds = "3.4.61.304" huaweiOsm="1.3.35" navigation = "2.5.3" playCore = "1.10.3" From 030a06b2acc5b9f6d687170f3943ad8ece4ab952 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 18:31:33 +0100 Subject: [PATCH 13/44] [Oztechan/CCC#1457] Lock file maintenance (#2222) Signed-off-by: Mustafa Ozhan 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 dfd873bff5..07888f8faf 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -8,8 +8,8 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.725.0) - aws-sdk-core (3.170.0) + aws-partitions (1.730.0) + aws-sdk-core (3.170.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) @@ -107,7 +107,7 @@ GEM xcpretty-travis-formatter (>= 0.0.3) fastlane-plugin-firebase_app_distribution (0.5.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.36.0) + google-apis-androidpublisher_v3 (0.37.0) google-apis-core (>= 0.11.0, < 2.a) google-apis-core (0.11.0) addressable (~> 2.5, >= 2.5.1) From 91f69fcb4f9cdb7d38d67c6dacc4ba8d27338399 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Wed, 22 Mar 2023 11:09:55 +0100 Subject: [PATCH 14/44] [Oztechan/CCC#2223] Refactor CalculatorViewModel methods and their names (#2224) * [Oztechan/CCC#2223] Refactor CalculatorViewModel methods and their names * [Oztechan/CCC#2223] Refactor CalculatorViewModel methods and their names * [Oztechan/CCC#2223] Refactor CalculatorViewModel methods and their names * [Oztechan/CCC#2223] Refactor CalculatorViewModel methods and their names * [Oztechan/CCC#2223] Refactor CalculatorViewModel methods and their names * [Oztechan/CCC#2223] Refactor CalculatorViewModel methods and their names * [Oztechan/CCC#2223] Refactor CalculatorViewModel methods and their names --- .../calculator/CalculatorViewModel.kt | 61 ++++++++++--------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt b/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt index 3bdfc7c47e..52ea191898 100644 --- a/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt +++ b/client/viewmodel/calculator/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/calculator/CalculatorViewModel.kt @@ -74,9 +74,10 @@ class CalculatorViewModel( currencyList = currencyDataSource.getActiveCurrencies(), base = calculationStorage.currentBase, input = calculationStorage.lastInput, + loading = true ) } - fetchConversion() + updateConversion() observeBase() observeInput() } @@ -106,19 +107,19 @@ class CalculatorViewModel( } .launchIn(viewModelScope) - private fun fetchConversion() = data.conversion?.let { - calculateConversions(it, ConversionState.Cached(it.date)) - } ?: viewModelScope.launch { + private fun updateConversion() { _state.update { copy(loading = true) } - runCatching { backendApiService.getConversion(calculationStorage.currentBase) } - .onFailure(::fetchConversionFailed) - .onSuccess(::fetchConversionSuccess) - .also { - _state.update { copy(loading = false) } - } + + data.conversion?.let { + calculateConversions(it, ConversionState.Cached(it.date)) + } ?: viewModelScope.launch { + runCatching { backendApiService.getConversion(calculationStorage.currentBase) } + .onFailure(::updateConversionFailed) + .onSuccess(::updateConversionSuccess) + } } - private fun fetchConversionSuccess(conversion: Conversion) = conversion.copy(date = nowAsDateString()) + private fun updateConversionSuccess(conversion: Conversion) = conversion.copy(date = nowAsDateString()) .let { data.conversion = it calculateConversions(it, ConversionState.Online(it.date)) @@ -128,8 +129,8 @@ class CalculatorViewModel( } } - private fun fetchConversionFailed(t: Throwable) = viewModelScope.launchIgnored { - Logger.w(t) { "CalculatorViewModel getConversionFailed" } + private fun updateConversionFailed(t: Throwable) = viewModelScope.launchIgnored { + Logger.w(t) { "CalculatorViewModel updateConversionFailed" } conversionDataSource.getConversionByBase( calculationStorage.currentBase )?.let { @@ -139,12 +140,22 @@ class CalculatorViewModel( _effect.emit(CalculatorEffect.Error) - _state.update { - copy(conversionState = ConversionState.Error) - } + calculateConversions(null, ConversionState.Error) } } + private fun calculateConversions(conversion: Conversion?, conversionState: ConversionState) = _state.update { + copy( + currencyList = _state.value.currencyList.onEach { + it.rate = conversion.calculateRate(it.code, _state.value.output) + .getFormatted(calculationStorage.precision) + .toStandardDigits() + }, + conversionState = conversionState, + loading = false + ) + } + private fun calculateOutput(input: String) = viewModelScope.launch { val output = data.parser .calculate(input.toSupportedCharacters(), MAXIMUM_FLOATING_POINT) @@ -163,23 +174,15 @@ class CalculatorViewModel( _state.update { copy(input = input.dropLast(1)) } } - state.value.currencyList.size < MINIMUM_ACTIVE_CURRENCY -> _effect.emit(CalculatorEffect.FewCurrency) + state.value.currencyList.size < MINIMUM_ACTIVE_CURRENCY -> { + _effect.emit(CalculatorEffect.FewCurrency) + _state.update { copy(loading = false) } + } - else -> fetchConversion() + else -> updateConversion() } } - private fun calculateConversions(conversion: Conversion, conversionState: ConversionState) = _state.update { - copy( - currencyList = _state.value.currencyList.onEach { - it.rate = conversion.calculateRate(it.code, _state.value.output) - .getFormatted(calculationStorage.precision) - .toStandardDigits() - }, - conversionState = conversionState - ) - } - private fun currentBaseChanged(newBase: String, shouldTrack: Boolean = false) = viewModelScope.launchIgnored { data.conversion = null calculationStorage.currentBase = newBase From 4f3448ab79d7a1fe49d16f9b959854ab6c5447ff Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Wed, 22 Mar 2023 15:52:43 +0100 Subject: [PATCH 15/44] [Oztechan/CCC#2225] Fix missing commit message for Firebase App Distribution builds (#2226) --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 12391c4501..a680c73f85 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -119,6 +119,9 @@ jobs: status: ${{ steps.status.outputs.status }} steps: + - name: Clone Repo # Needed for reading commit message for Firebase App Distribution + uses: actions/checkout@v3 + - name: Download Android Artifacts uses: actions/download-artifact@v3 with: From 5721284ed975689e905e33a87d19206306285a5b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 25 Mar 2023 17:07:16 +0100 Subject: [PATCH 16/44] [Oztechan/CCC#1457] Dependency update lifecycle to v2.6.1 (#2230) Signed-off-by: Mustafa Ozhan 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 7a9cf818f9..3786f1e252 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -34,7 +34,7 @@ coroutines = "1.6.4" billing = "5.1.0" leakCanary = "2.10" sqlDelight = "1.5.5" -lifecycle = "2.6.0" +lifecycle = "2.6.1" mokoResources = "0.20.1" buildKonfig = "0.13.3" splashScreen = "1.0.0" From a8c1ebc4a2568f649a4f595331660425673f9786 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 25 Mar 2023 19:27:55 +0100 Subject: [PATCH 17/44] [Oztechan/CCC#1457] Dependency update dependency androidx.activity:activity-compose to v1.7.0 (#2232) Signed-off-by: Mustafa Ozhan 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 3786f1e252..4b759205a9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,7 +10,7 @@ glance = "1.0.0-alpha05" material3 = "1.0.1" androidDesugaring = "2.0.2" androidMaterial = "1.8.0" -composeActivity = "1.6.1" +composeActivity = "1.7.0" constraintLayout = "2.1.4" koinCore = "3.3.3" koinCompose = "3.4.2" From e8a5a32e939d20fa6c56ca8d2be3032dec95b141 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 25 Mar 2023 19:28:06 +0100 Subject: [PATCH 18/44] [Oztechan/CCC#1457] Dependency update dependency androidx.compose.compiler:compiler to v1.4.4 (#2229) Signed-off-by: Mustafa Ozhan 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 4b759205a9..aa991967a7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ kotlin = "1.8.10" ksp = "1.8.10-1.0.9" detekt = "1.22.0" androidGradlePlugin = "7.4.2" -composeCompiler = "1.4.3" +composeCompiler = "1.4.4" compose = "1.3.3" glance = "1.0.0-alpha05" material3 = "1.0.1" From 78e3512f8911add75babe98e763470870cc6bd11 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 25 Mar 2023 19:29:46 +0100 Subject: [PATCH 19/44] [Oztechan/CCC#1457] Dependency update compose to v1.4.0 (#2231) Signed-off-by: Mustafa Ozhan 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 aa991967a7..c76d9b44f0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ ksp = "1.8.10-1.0.9" detekt = "1.22.0" androidGradlePlugin = "7.4.2" composeCompiler = "1.4.4" -compose = "1.3.3" +compose = "1.4.0" glance = "1.0.0-alpha05" material3 = "1.0.1" androidDesugaring = "2.0.2" From a916821cfd59cda5ef1f5a5c6ef2292d078b9afb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 25 Mar 2023 23:51:46 +0100 Subject: [PATCH 20/44] [Oztechan/CCC#1457] Dependency update dependency com.google.firebase:firebase-config-ktx to v21.3.0 (#2234) Signed-off-by: Mustafa Ozhan 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 c76d9b44f0..9b72bf7ed4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -19,7 +19,7 @@ koinKtor = "3.3.1" ktor = "2.2.4" multiplatformSettings = "1.0.0" firebaseAnalytics = "21.2.0" -firebaseRemoteConfig = "21.2.1" +firebaseRemoteConfig = "21.3.0" gsm = "4.3.15" firebasePer = "20.3.1" firebasePerPlugin = "1.4.2" From 8187f816ecbaf6445eb13d694b0f279433f20278 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 25 Mar 2023 23:51:55 +0100 Subject: [PATCH 21/44] [Oztechan/CCC#1457] Dependency update dependency com.google.firebase:firebase-crashlytics-ktx to v18.3.6 (#2233) Signed-off-by: Mustafa Ozhan 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 9b72bf7ed4..10456a5f62 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -41,7 +41,7 @@ splashScreen = "1.0.0" kover = "0.6.1" rootBeer = "0.1.0" mockative = "1.3.1" -firebaseCrashlytics = "18.3.5" +firebaseCrashlytics = "18.3.6" anrWatchDog = "1.4.0" kermit = "1.2.2" From 6483c0401ac74532a972ac5b0a6473dad333ff54 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 25 Mar 2023 23:59:54 +0100 Subject: [PATCH 22/44] [Oztechan/CCC#1457] Dependency update dependency com.google.firebase:firebase-analytics-ktx to v21.2.1 (#2236) Signed-off-by: Mustafa Ozhan 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 10456a5f62..05ba010b49 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,7 +18,7 @@ koinAndroid = "3.3.3" koinKtor = "3.3.1" ktor = "2.2.4" multiplatformSettings = "1.0.0" -firebaseAnalytics = "21.2.0" +firebaseAnalytics = "21.2.1" firebaseRemoteConfig = "21.3.0" gsm = "4.3.15" firebasePer = "20.3.1" From a47ac82250f78606260e1b879b32f04a5e54e9c6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 26 Mar 2023 18:04:01 +0200 Subject: [PATCH 23/44] [Oztechan/CCC#1457] Dependency update submodule/logmob digest to a81d665 (#2238) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/logmob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/logmob b/submodule/logmob index 167073aab7..a81d6651ed 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 167073aab763c2a48e6cb6c7f4045096c99ec77c +Subproject commit a81d6651edcf4e27629466a01bcd27aa95efd027 From 66068a98e6636551f5c5c512b853d16848fe3d73 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 26 Mar 2023 18:04:13 +0200 Subject: [PATCH 24/44] [Oztechan/CCC#1457] Dependency update koin (#2235) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 05ba010b49..683e691052 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,10 +12,10 @@ androidDesugaring = "2.0.2" androidMaterial = "1.8.0" composeActivity = "1.7.0" constraintLayout = "2.1.4" -koinCore = "3.3.3" -koinCompose = "3.4.2" -koinAndroid = "3.3.3" -koinKtor = "3.3.1" +koinCore = "3.4.0" +koinCompose = "3.4.3" +koinAndroid = "3.4.0" +koinKtor = "3.4.0" ktor = "2.2.4" multiplatformSettings = "1.0.0" firebaseAnalytics = "21.2.1" From 09513b68181c6a7ebbf2629563635a27813acd08 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 26 Mar 2023 18:04:29 +0200 Subject: [PATCH 25/44] [Oztechan/CCC#2227] Remove unnecessary `unused` suppressions (#2228) --- .../main/kotlin/com/oztechan/ccc/android/app/Application.kt | 1 - .../kotlin/com/oztechan/ccc/android/ui/mobile/util/Dialog.kt | 1 - .../ccc/backend/controller/sync/SyncControllerImpl.kt | 1 - buildSrc/src/main/kotlin/config/DeviceFlavour.kt | 1 - .../oztechan/ccc/client/core/analytics/model/ScreenName.kt | 2 -- .../kotlin/com/oztechan/ccc/common/core/model/CurrencyType.kt | 1 - .../iosMain/kotlin/com/oztechan/ccc/ios/provider/di/Koin.kt | 4 ++-- 7 files changed, 2 insertions(+), 9 deletions(-) diff --git a/android/app/src/main/kotlin/com/oztechan/ccc/android/app/Application.kt b/android/app/src/main/kotlin/com/oztechan/ccc/android/app/Application.kt index 0e43385db6..49a085549f 100644 --- a/android/app/src/main/kotlin/com/oztechan/ccc/android/app/Application.kt +++ b/android/app/src/main/kotlin/com/oztechan/ccc/android/app/Application.kt @@ -16,7 +16,6 @@ import com.oztechan.ccc.android.app.di.initKoin import com.oztechan.ccc.android.core.ad.initAds import com.oztechan.ccc.client.core.analytics.initAnalytics -@Suppress("unused") class Application : Application() { override fun onCreate() { diff --git a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/Dialog.kt b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/Dialog.kt index 8328e04329..301ec1d14c 100644 --- a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/Dialog.kt +++ b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/Dialog.kt @@ -1,7 +1,6 @@ /* * Copyright (c) 2020 Mustafa Ozhan. All rights reserved. */ -@file:Suppress("unused") package com.oztechan.ccc.android.ui.mobile.util diff --git a/backend/controller/sync/src/main/kotlin/com/oztechan/ccc/backend/controller/sync/SyncControllerImpl.kt b/backend/controller/sync/src/main/kotlin/com/oztechan/ccc/backend/controller/sync/SyncControllerImpl.kt index 156b28ac4a..f67355382a 100644 --- a/backend/controller/sync/src/main/kotlin/com/oztechan/ccc/backend/controller/sync/SyncControllerImpl.kt +++ b/backend/controller/sync/src/main/kotlin/com/oztechan/ccc/backend/controller/sync/SyncControllerImpl.kt @@ -9,7 +9,6 @@ import com.oztechan.ccc.common.datasource.conversion.ConversionDataSource import kotlinx.coroutines.delay import kotlin.time.Duration.Companion.seconds -@Suppress("unused") internal class SyncControllerImpl( private val premiumApiService: PremiumApiService, private val freeApiService: FreeApiService, diff --git a/buildSrc/src/main/kotlin/config/DeviceFlavour.kt b/buildSrc/src/main/kotlin/config/DeviceFlavour.kt index dc512413cd..c8cebb2ef0 100644 --- a/buildSrc/src/main/kotlin/config/DeviceFlavour.kt +++ b/buildSrc/src/main/kotlin/config/DeviceFlavour.kt @@ -4,7 +4,6 @@ enum class DeviceFlavour { GOOGLE, HUAWEI; - @Suppress("unused") companion object { val google = GOOGLE.name.lowercase() val huawei = HUAWEI.name.lowercase() diff --git a/client/core/analytics/src/commonMain/kotlin/com/oztechan/ccc/client/core/analytics/model/ScreenName.kt b/client/core/analytics/src/commonMain/kotlin/com/oztechan/ccc/client/core/analytics/model/ScreenName.kt index c66d3d9f70..4fdc5f657d 100644 --- a/client/core/analytics/src/commonMain/kotlin/com/oztechan/ccc/client/core/analytics/model/ScreenName.kt +++ b/client/core/analytics/src/commonMain/kotlin/com/oztechan/ccc/client/core/analytics/model/ScreenName.kt @@ -5,8 +5,6 @@ sealed class ScreenName { object SelectCurrency : ScreenName() object Currencies : ScreenName() object Settings : ScreenName() - - @Suppress("unused") // used in iOS object Watchers : ScreenName() object Premium : ScreenName() data class Slider(val position: Int) : ScreenName() diff --git a/common/core/model/src/commonMain/kotlin/com/oztechan/ccc/common/core/model/CurrencyType.kt b/common/core/model/src/commonMain/kotlin/com/oztechan/ccc/common/core/model/CurrencyType.kt index 1d056e2030..d16321de55 100755 --- a/common/core/model/src/commonMain/kotlin/com/oztechan/ccc/common/core/model/CurrencyType.kt +++ b/common/core/model/src/commonMain/kotlin/com/oztechan/ccc/common/core/model/CurrencyType.kt @@ -3,7 +3,6 @@ */ package com.oztechan.ccc.common.core.model -@Suppress("LargeClass", "unused") enum class CurrencyType { AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTC, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNH, CNY, COP, CRC, CUC, CUP, CVE, diff --git a/ios/provider/src/iosMain/kotlin/com/oztechan/ccc/ios/provider/di/Koin.kt b/ios/provider/src/iosMain/kotlin/com/oztechan/ccc/ios/provider/di/Koin.kt index 5e9428bfa0..d97dd73ecd 100644 --- a/ios/provider/src/iosMain/kotlin/com/oztechan/ccc/ios/provider/di/Koin.kt +++ b/ios/provider/src/iosMain/kotlin/com/oztechan/ccc/ios/provider/di/Koin.kt @@ -2,8 +2,6 @@ * Copyright (c) 2021 Mustafa Ozhan. All rights reserved. */ -@file:Suppress("unused") - package com.oztechan.ccc.ios.provider.di import co.touchlab.kermit.Logger @@ -44,6 +42,7 @@ import org.koin.core.parameter.parametersOf import org.koin.dsl.module import platform.Foundation.NSUserDefaults +@Suppress("unused") fun initKoin( userDefaults: NSUserDefaults, analyticsManager: AnalyticsManager @@ -106,6 +105,7 @@ private fun getIOSPlatformModule(userDefaults: NSUserDefaults) = module { single { Device.IOS } } +@Suppress("unused") fun Koin.getDependency(objCObject: ObjCObject): T = when (objCObject) { is ObjCClass -> getOriginalKotlinClass(objCObject) is ObjCProtocol -> getOriginalKotlinClass(objCObject) From a385d6a9c32acf8fd9df46197368db2975625fac Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Mar 2023 10:20:29 +0200 Subject: [PATCH 26/44] [Oztechan/CCC#1457] Lock file maintenance (#2239) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- ios/Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index 07888f8faf..be53bfb40c 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -8,8 +8,8 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.730.0) - aws-sdk-core (3.170.1) + aws-partitions (1.735.0) + aws-sdk-core (3.171.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) @@ -17,7 +17,7 @@ GEM aws-sdk-kms (1.63.0) aws-sdk-core (~> 3, >= 3.165.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.119.1) + aws-sdk-s3 (1.119.2) aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) @@ -138,7 +138,7 @@ GEM google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (1.3.0) + googleauth (1.5.0) faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) memoist (~> 0.16) From a05c7645b770252202af24682e4b2e8d49cad1a5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:43:38 +0200 Subject: [PATCH 27/44] [Oztechan/CCC#1457] Dependency update dependency dev.icerock.moko:resources to v0.21.1 (#2237) * [Oztechan/CCC#1457] Dependency update dependency dev.icerock.moko:resources to v0.21.1 Signed-off-by: Mustafa Ozhan Co-authored-by: Mustafa Ozhan * [Oztechan/CCC#1457] Dependency update dependency dev.icerock.moko:resources to v0.21.1 --------- Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- .../com/oztechan/ccc/client/core/res/IOSResources.kt | 11 ++--------- gradle/libs.versions.toml | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/client/core/res/src/iosMain/kotlin/com/oztechan/ccc/client/core/res/IOSResources.kt b/client/core/res/src/iosMain/kotlin/com/oztechan/ccc/client/core/res/IOSResources.kt index b22d3e1c02..33629cb205 100644 --- a/client/core/res/src/iosMain/kotlin/com/oztechan/ccc/client/core/res/IOSResources.kt +++ b/client/core/res/src/iosMain/kotlin/com/oztechan/ccc/client/core/res/IOSResources.kt @@ -5,15 +5,12 @@ package com.oztechan.ccc.client.core.res -import dev.icerock.moko.graphics.toUIColor import dev.icerock.moko.resources.ColorResource import dev.icerock.moko.resources.StringResource import dev.icerock.moko.resources.desc.Resource import dev.icerock.moko.resources.desc.ResourceFormatted import dev.icerock.moko.resources.desc.StringDesc -import dev.icerock.moko.resources.getColor -import platform.UIKit.UIColor -import platform.UIKit.UIScreen +import dev.icerock.moko.resources.getUIColor fun getString(stringResource: StringResource): StringDesc { return StringDesc.Resource(stringResource) @@ -23,8 +20,4 @@ fun getString(stringResource: StringResource, parameter: Any): StringDesc { return StringDesc.ResourceFormatted(stringResource, parameter) } -fun getColor(colorResource: ColorResource): UIColor { - return colorResource.getColor( - UIScreen.mainScreen.traitCollection.userInterfaceStyle - ).toUIColor() -} +fun getColor(colorResource: ColorResource) = colorResource.getUIColor() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 683e691052..01c08e9c50 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ billing = "5.1.0" leakCanary = "2.10" sqlDelight = "1.5.5" lifecycle = "2.6.1" -mokoResources = "0.20.1" +mokoResources = "0.21.1" buildKonfig = "0.13.3" splashScreen = "1.0.0" kover = "0.6.1" From ed69a750e7dab82aef6115003243b8e6d5d9f54f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Mar 2023 09:06:18 +0200 Subject: [PATCH 28/44] [Oztechan/CCC#1457] Dependency update dependency com.google.android.gms:play-services-ads to v22 (#2241) Signed-off-by: Mustafa Ozhan 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 01c08e9c50..5eb8221784 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -24,7 +24,7 @@ gsm = "4.3.15" firebasePer = "20.3.1" firebasePerPlugin = "1.4.2" crashlytics = "2.9.4" -googleAds = "21.5.0" +googleAds = "22.0.0" huaweiAds = "3.4.61.304" huaweiOsm="1.3.35" navigation = "2.5.3" From 5981b3686ec982b120d493dbe7c29428e6621407 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 11:27:21 +0200 Subject: [PATCH 29/44] [Oztechan/CCC#1457] Dependency update dependency com.android.tools:desugar_jdk_libs to v2.0.3 (#2245) Signed-off-by: Mustafa Ozhan 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 5eb8221784..8f6705bf28 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ composeCompiler = "1.4.4" compose = "1.4.0" glance = "1.0.0-alpha05" material3 = "1.0.1" -androidDesugaring = "2.0.2" +androidDesugaring = "2.0.3" androidMaterial = "1.8.0" composeActivity = "1.7.0" constraintLayout = "2.1.4" From a21edf9e7862bb93c583c8917cdf9adb73b96117 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 1 Apr 2023 18:13:13 +0200 Subject: [PATCH 30/44] [Oztechan/CCC#2243] Fix SearchView crash (#2244) --- android/ui/mobile/src/main/res/values/styles.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/ui/mobile/src/main/res/values/styles.xml b/android/ui/mobile/src/main/res/values/styles.xml index be5329304a..0abf7fe06d 100755 --- a/android/ui/mobile/src/main/res/values/styles.xml +++ b/android/ui/mobile/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ - + From bc685c296771913d36ebca99cfb0d2bbf03cae6b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:13:26 +0200 Subject: [PATCH 31/44] [Oztechan/CCC#1457] Dependency update submodule/logmob digest to e73d356 (#2247) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/logmob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/logmob b/submodule/logmob index a81d6651ed..e73d356e64 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit a81d6651edcf4e27629466a01bcd27aa95efd027 +Subproject commit e73d356e64e27f419b254001184d44b96e239dd0 From 367fb40c087a70673d977e23ace2fed51c32c1b1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:13:36 +0200 Subject: [PATCH 32/44] [Oztechan/CCC#1457] Dependency update submodule/basemob digest to 3acb866 (#2246) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/basemob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/basemob b/submodule/basemob index c37aa95c47..3acb8668bc 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit c37aa95c476791aa523e1984cc982941b3ead29f +Subproject commit 3acb8668bc0e8954e6bc69a6481ef0ba2868a4c8 From 03b10a9a51e5b934f9081fadcb35b7b61079bc14 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:14:52 +0200 Subject: [PATCH 33/44] [Oztechan/CCC#1457] Dependency update submodule/scopemob digest to 72de3ee (#2249) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/scopemob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/scopemob b/submodule/scopemob index 34e1cc111c..72de3ee69a 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit 34e1cc111cfaea98ad3a85b19089a5b74190d4dd +Subproject commit 72de3ee69abbac182bff06129668b203298dfb6b From 47f36038ef747407a3060f3ec4e8dda5572dc2dc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:14:59 +0200 Subject: [PATCH 34/44] [Oztechan/CCC#1457] Dependency update submodule/parsermob digest to 7fae5c9 (#2248) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/parsermob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/parsermob b/submodule/parsermob index e0bb972276..7fae5c915f 160000 --- a/submodule/parsermob +++ b/submodule/parsermob @@ -1 +1 @@ -Subproject commit e0bb9722761f92d0632106938e198f140e46bc06 +Subproject commit 7fae5c915f966107ad32f5077327007f5a2b56e8 From f6c225c9859df7b9b110edb3adee984d8f1e9523 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 09:16:08 +0200 Subject: [PATCH 35/44] [Oztechan/CCC#1457] Lock file maintenance (#2250) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- ios/Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index be53bfb40c..b4f5faf024 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -3,12 +3,12 @@ GEM specs: CFPropertyList (3.0.6) rexml - addressable (2.8.1) + addressable (2.8.2) public_suffix (>= 2.0.2, < 6.0) artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.735.0) + aws-partitions (1.739.0) aws-sdk-core (3.171.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) @@ -17,7 +17,7 @@ GEM aws-sdk-kms (1.63.0) aws-sdk-core (~> 3, >= 3.165.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.119.2) + aws-sdk-s3 (1.120.0) aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) @@ -107,7 +107,7 @@ GEM xcpretty-travis-formatter (>= 0.0.3) fastlane-plugin-firebase_app_distribution (0.5.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.37.0) + google-apis-androidpublisher_v3 (0.38.0) google-apis-core (>= 0.11.0, < 2.a) google-apis-core (0.11.0) addressable (~> 2.5, >= 2.5.1) From f219d76650a2b7f068e2dba9d623f83e78c63589 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 09:17:11 +0200 Subject: [PATCH 36/44] [Oztechan/CCC#1457] Dependency update mockative to v1.4.0 (#2240) Signed-off-by: Mustafa Ozhan 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 8f6705bf28..ec7ae28d95 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -40,7 +40,7 @@ buildKonfig = "0.13.3" splashScreen = "1.0.0" kover = "0.6.1" rootBeer = "0.1.0" -mockative = "1.3.1" +mockative = "1.4.0" firebaseCrashlytics = "18.3.6" anrWatchDog = "1.4.0" kermit = "1.2.2" From c8034e9d0adf5f0704100a5e396721579e3d52f7 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Tue, 4 Apr 2023 18:49:18 +0200 Subject: [PATCH 37/44] [Oztechan/CCC#2251] Extract WidgetActions and SystemActions into Receiver (#2252) --- .../android/ui/widget/AppWidgetReceiver.kt | 60 +++++++++++++------ .../android/ui/widget/action/WidgetAction.kt | 21 +------ .../ui/widget/action/WidgetActionTest.kt | 17 ------ 3 files changed, 43 insertions(+), 55 deletions(-) diff --git a/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/AppWidgetReceiver.kt b/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/AppWidgetReceiver.kt index d49f84da82..cda402d475 100644 --- a/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/AppWidgetReceiver.kt +++ b/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/AppWidgetReceiver.kt @@ -41,25 +41,47 @@ class AppWidgetReceiver : GlanceAppWidgetReceiver(), KoinComponent { override fun onReceive(context: Context, intent: Intent) { super.onReceive(context, intent) - when (intent.action.mapToWidgetAction()) { - WidgetAction.IDLE -> Unit - WidgetAction.REFRESH -> refreshData(context) - WidgetAction.NEXT_BASE -> refreshData(context, true) - WidgetAction.PREVIOUS_BASE -> refreshData(context, false) - WidgetAction.OPEN_APP -> - context.packageManager - .getLaunchIntentForPackage(context.packageName) - ?.apply { - addFlags( - Intent.FLAG_ACTIVITY_CLEAR_TASK or - Intent.FLAG_ACTIVITY_CLEAR_TOP or - Intent.FLAG_ACTIVITY_NEW_TASK - ) - }?.let { - context.startActivity(it) - } - - else -> error("undefined widget action") + intent.action.let { + it.mapToWidgetAction()?.executeWidgetAction(context) + ?: it.executeSystemAction(context) } } + + private fun WidgetAction.executeWidgetAction(context: Context) = when (this) { + WidgetAction.IDLE -> Unit + WidgetAction.REFRESH -> refreshData(context) + WidgetAction.NEXT_BASE -> refreshData(context, true) + WidgetAction.PREVIOUS_BASE -> refreshData(context, false) + WidgetAction.OPEN_APP -> + context.packageManager + .getLaunchIntentForPackage(context.packageName) + ?.apply { + addFlags( + Intent.FLAG_ACTIVITY_CLEAR_TASK or + Intent.FLAG_ACTIVITY_CLEAR_TOP or + Intent.FLAG_ACTIVITY_NEW_TASK + ) + }?.let { + context.startActivity(it) + } + } + + private fun String?.executeSystemAction(context: Context) = when (this) { + // no needed to refresh + AppWidgetManager.ACTION_APPWIDGET_DISABLED, + AppWidgetManager.ACTION_APPWIDGET_DELETED, + AppWidgetManager.ACTION_APPWIDGET_ENABLED -> Unit + + // unknown ones perhaps no need to refresh (yet) + AppWidgetManager.ACTION_APPWIDGET_BIND, + AppWidgetManager.ACTION_APPWIDGET_PICK, + AppWidgetManager.ACTION_APPWIDGET_CONFIGURE, + AppWidgetManager.ACTION_APPWIDGET_RESTORED, + AppWidgetManager.ACTION_APPWIDGET_HOST_RESTORED -> Unit + + AppWidgetManager.ACTION_APPWIDGET_UPDATE, + AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED -> refreshData(context) + + else -> error("undefined widget action") + } } diff --git a/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/action/WidgetAction.kt b/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/action/WidgetAction.kt index 9d3a1be3a1..b7e7f0b98e 100644 --- a/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/action/WidgetAction.kt +++ b/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/action/WidgetAction.kt @@ -1,6 +1,5 @@ package com.oztechan.ccc.android.ui.widget.action -import android.appwidget.AppWidgetManager import androidx.glance.action.ActionParameters import androidx.glance.action.actionParametersOf import androidx.glance.appwidget.action.actionRunCallback @@ -13,24 +12,8 @@ enum class WidgetAction { IDLE; companion object { - fun String?.mapToWidgetAction() = when (this) { - // no needed to refresh - AppWidgetManager.ACTION_APPWIDGET_DISABLED, - AppWidgetManager.ACTION_APPWIDGET_DELETED, - AppWidgetManager.ACTION_APPWIDGET_ENABLED -> IDLE - - // unknown ones perhaps no need to refresh (yet) - AppWidgetManager.ACTION_APPWIDGET_BIND, - AppWidgetManager.ACTION_APPWIDGET_PICK, - AppWidgetManager.ACTION_APPWIDGET_CONFIGURE, - AppWidgetManager.ACTION_APPWIDGET_RESTORED, - AppWidgetManager.ACTION_APPWIDGET_HOST_RESTORED -> IDLE - - AppWidgetManager.ACTION_APPWIDGET_UPDATE, - AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED -> REFRESH - - else -> WidgetAction.values().firstOrNull { this == it.name } - } + fun String?.mapToWidgetAction() = WidgetAction.values() + .firstOrNull { this == it.name } fun WidgetAction.toActionCallback() = actionRunCallback( actionParametersOf( diff --git a/android/ui/widget/src/test/kotlin/com/oztechan/ccc/android/ui/widget/action/WidgetActionTest.kt b/android/ui/widget/src/test/kotlin/com/oztechan/ccc/android/ui/widget/action/WidgetActionTest.kt index 3ace3c30f9..63b4ec0a9a 100644 --- a/android/ui/widget/src/test/kotlin/com/oztechan/ccc/android/ui/widget/action/WidgetActionTest.kt +++ b/android/ui/widget/src/test/kotlin/com/oztechan/ccc/android/ui/widget/action/WidgetActionTest.kt @@ -1,6 +1,5 @@ package com.oztechan.ccc.android.ui.widget.action -import android.appwidget.AppWidgetManager import com.oztechan.ccc.android.ui.widget.action.WidgetAction.Companion.mapToWidgetAction import org.junit.Test import kotlin.test.assertEquals @@ -15,20 +14,4 @@ class WidgetActionTest { assertEquals(it, it.name.mapToWidgetAction()) } } - - @Test - fun `AppWidgetManager actions mapped to correct WidgetActions`() { - assertEquals(WidgetAction.IDLE, AppWidgetManager.ACTION_APPWIDGET_DISABLED.mapToWidgetAction()) - assertEquals(WidgetAction.IDLE, AppWidgetManager.ACTION_APPWIDGET_DELETED.mapToWidgetAction()) - assertEquals(WidgetAction.IDLE, AppWidgetManager.ACTION_APPWIDGET_ENABLED.mapToWidgetAction()) - - assertEquals(WidgetAction.IDLE, AppWidgetManager.ACTION_APPWIDGET_BIND.mapToWidgetAction()) - assertEquals(WidgetAction.IDLE, AppWidgetManager.ACTION_APPWIDGET_PICK.mapToWidgetAction()) - assertEquals(WidgetAction.IDLE, AppWidgetManager.ACTION_APPWIDGET_CONFIGURE.mapToWidgetAction()) - assertEquals(WidgetAction.IDLE, AppWidgetManager.ACTION_APPWIDGET_RESTORED.mapToWidgetAction()) - assertEquals(WidgetAction.IDLE, AppWidgetManager.ACTION_APPWIDGET_HOST_RESTORED.mapToWidgetAction()) - - assertEquals(WidgetAction.REFRESH, AppWidgetManager.ACTION_APPWIDGET_UPDATE.mapToWidgetAction()) - assertEquals(WidgetAction.REFRESH, AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED.mapToWidgetAction()) - } } From 93ec399aa2be936ac7220f139610cd4ec1f6e70a Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Tue, 4 Apr 2023 23:17:30 +0200 Subject: [PATCH 38/44] [Oztechan/CCC#2253] Track weather a user has widget or not (#2254) --- .../ui/widget/android-ui-widget.gradle.kts | 5 +++- .../android/ui/widget/AppWidgetReceiver.kt | 23 ++++++++++++------- .../core/analytics/model/UserProperty.kt | 1 + 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/android/ui/widget/android-ui-widget.gradle.kts b/android/ui/widget/android-ui-widget.gradle.kts index 28328f1cf6..df78009199 100644 --- a/android/ui/widget/android-ui-widget.gradle.kts +++ b/android/ui/widget/android-ui-widget.gradle.kts @@ -44,5 +44,8 @@ dependencies { implementation(project(Modules.Common.Core.model)) - implementation(project(Modules.Client.Core.res)) + Modules.Client.Core.apply { + implementation(project(res)) + implementation(project(analytics)) + } } diff --git a/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/AppWidgetReceiver.kt b/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/AppWidgetReceiver.kt index cda402d475..98fdf99c6d 100644 --- a/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/AppWidgetReceiver.kt +++ b/android/ui/widget/src/main/kotlin/com/oztechan/ccc/android/ui/widget/AppWidgetReceiver.kt @@ -9,6 +9,8 @@ import androidx.glance.appwidget.GlanceAppWidgetReceiver import com.oztechan.ccc.android.ui.widget.action.WidgetAction import com.oztechan.ccc.android.ui.widget.action.WidgetAction.Companion.mapToWidgetAction import com.oztechan.ccc.android.viewmodel.widget.WidgetViewModel +import com.oztechan.ccc.client.core.analytics.AnalyticsManager +import com.oztechan.ccc.client.core.analytics.model.UserProperty import kotlinx.coroutines.runBlocking import org.koin.core.component.KoinComponent import org.koin.core.component.inject @@ -17,6 +19,7 @@ class AppWidgetReceiver : GlanceAppWidgetReceiver(), KoinComponent { override val glanceAppWidget: GlanceAppWidget = AppWidget() private val viewModel: WidgetViewModel by inject() + private val analyticsManager: AnalyticsManager by inject() private fun refreshData( context: Context, @@ -67,21 +70,25 @@ class AppWidgetReceiver : GlanceAppWidgetReceiver(), KoinComponent { } private fun String?.executeSystemAction(context: Context) = when (this) { - // no needed to refresh - AppWidgetManager.ACTION_APPWIDGET_DISABLED, - AppWidgetManager.ACTION_APPWIDGET_DELETED, - AppWidgetManager.ACTION_APPWIDGET_ENABLED -> Unit + AppWidgetManager.ACTION_APPWIDGET_DELETED -> analyticsManager.setUserProperty( + UserProperty.HasWidget(false.toString()) + ) + + AppWidgetManager.ACTION_APPWIDGET_ENABLED -> analyticsManager.setUserProperty( + UserProperty.HasWidget(true.toString()) + ) + + AppWidgetManager.ACTION_APPWIDGET_UPDATE, + AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED -> refreshData(context) - // unknown ones perhaps no need to refresh (yet) + // defined but no action needed system events + AppWidgetManager.ACTION_APPWIDGET_DISABLED, AppWidgetManager.ACTION_APPWIDGET_BIND, AppWidgetManager.ACTION_APPWIDGET_PICK, AppWidgetManager.ACTION_APPWIDGET_CONFIGURE, AppWidgetManager.ACTION_APPWIDGET_RESTORED, AppWidgetManager.ACTION_APPWIDGET_HOST_RESTORED -> Unit - AppWidgetManager.ACTION_APPWIDGET_UPDATE, - AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED -> refreshData(context) - else -> error("undefined widget action") } } diff --git a/client/core/analytics/src/commonMain/kotlin/com/oztechan/ccc/client/core/analytics/model/UserProperty.kt b/client/core/analytics/src/commonMain/kotlin/com/oztechan/ccc/client/core/analytics/model/UserProperty.kt index 62b2c18fca..3d1d6a5b2b 100644 --- a/client/core/analytics/src/commonMain/kotlin/com/oztechan/ccc/client/core/analytics/model/UserProperty.kt +++ b/client/core/analytics/src/commonMain/kotlin/com/oztechan/ccc/client/core/analytics/model/UserProperty.kt @@ -9,4 +9,5 @@ sealed class UserProperty(val key: String, open val value: String) { data class IsPremium(override val value: String) : UserProperty("is_premium", value) data class SessionCount(override val value: String) : UserProperty("session_count", value) data class DevicePlatform(override val value: String) : UserProperty("device_platform", value) + data class HasWidget(override val value: String) : UserProperty("has_widget", value) // android only } From 4529b818815b60a799c192a954546dc8818db183 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Wed, 5 Apr 2023 15:20:13 +0200 Subject: [PATCH 39/44] [Oztechan/CCC#2255] Prevent ArrayIndexOutOfBoundsException in widget base changes (#2256) * [Oztechan/CCC#2251] Extract WidgetActions and SystemActions into Receiver * [Oztechan/CCC#2253] Track weather a user has widget or not * [Oztechan/CCC#2255] Prevent ArrayIndexOutOfBoundsException in widget base changes --- .../viewmodel/widget/WidgetViewModel.kt | 2 +- .../viewmodel/widget/WidgetViewModelTest.kt | 68 +++++++++++++++++-- 2 files changed, 65 insertions(+), 5 deletions(-) diff --git a/android/viewmodel/widget/src/main/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModel.kt b/android/viewmodel/widget/src/main/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModel.kt index 1027b1930a..310f9f04ce 100644 --- a/android/viewmodel/widget/src/main/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModel.kt +++ b/android/viewmodel/widget/src/main/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModel.kt @@ -69,7 +69,7 @@ class WidgetViewModel( it - 1 } }.let { - it % activeCurrencies.size // it handles index -1 and index size +1 + (it + activeCurrencies.size) % activeCurrencies.size // it handles index -1 and index size +1 } calculationStorage.currentBase = activeCurrencies[newBaseIndex].code diff --git a/android/viewmodel/widget/src/test/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModelTest.kt b/android/viewmodel/widget/src/test/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModelTest.kt index 6668c909f2..ca97fa7425 100644 --- a/android/viewmodel/widget/src/test/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModelTest.kt +++ b/android/viewmodel/widget/src/test/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModelTest.kt @@ -51,11 +51,11 @@ class WidgetViewModelTest { private val appStorage = mock(classOf()) private val base = "EUR" - private val fistBase = "USD" + private val firstBase = "USD" private val lastBase = "TRY" private val activeCurrencyList = listOf( - Currency(code = fistBase, name = "Dollar", symbol = "$", isActive = true), + Currency(code = firstBase, name = "Dollar", symbol = "$", isActive = true), Currency(code = base, name = "Euro", symbol = "€", isActive = true), Currency(code = lastBase, name = "Turkish Lira", symbol = "₺", isActive = true) ) @@ -89,6 +89,66 @@ class WidgetViewModelTest { } } + @Test + fun `ArrayIndexOutOfBoundsException never thrown`() = runTest { + // first currency + given(calculationStorage) + .invocation { currentBase } + .thenReturn(firstBase) + + given(backendApiService) + .coroutine { getConversion(firstBase) } + .thenReturn(conversion) + + repeat(activeCurrencyList.count()) { + viewModel.refreshWidgetData() + } + repeat(activeCurrencyList.count()) { + viewModel.refreshWidgetData(true) + } + repeat(activeCurrencyList.count()) { + viewModel.refreshWidgetData(false) + } + + // middle currency + given(calculationStorage) + .invocation { currentBase } + .thenReturn(base) + + given(backendApiService) + .coroutine { getConversion(base) } + .thenReturn(conversion) + + repeat(activeCurrencyList.count()) { + viewModel.refreshWidgetData() + } + repeat(activeCurrencyList.count()) { + viewModel.refreshWidgetData(true) + } + repeat(activeCurrencyList.count()) { + viewModel.refreshWidgetData(false) + } + + // last currency + given(calculationStorage) + .invocation { currentBase } + .thenReturn(lastBase) + + given(backendApiService) + .coroutine { getConversion(lastBase) } + .thenReturn(conversion) + + repeat(activeCurrencyList.count()) { + viewModel.refreshWidgetData() + } + repeat(activeCurrencyList.count()) { + viewModel.refreshWidgetData(true) + } + repeat(activeCurrencyList.count()) { + viewModel.refreshWidgetData(false) + } + } + @Test fun `init sets isPremium and currentBase`() { assertEquals(base, viewModel.state.currentBase) @@ -180,7 +240,7 @@ class WidgetViewModelTest { verify(calculationStorage) .setter(calculationStorage::currentBase) - .with(eq(fistBase)) + .with(eq(firstBase)) .wasInvoked() viewModel.refreshWidgetData(true) @@ -221,7 +281,7 @@ class WidgetViewModelTest { verify(calculationStorage) .setter(calculationStorage::currentBase) - .with(eq(fistBase)) + .with(eq(firstBase)) .wasInvoked() } } From 5d8f45ba4381494c16217f17e64c7f3ee1f092b6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 21:34:24 +0200 Subject: [PATCH 40/44] [Oztechan/CCC#1457] Dependency update compose to v1.4.1 (#2263) Signed-off-by: Mustafa Ozhan 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 ec7ae28d95..a1a2957abe 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ ksp = "1.8.10-1.0.9" detekt = "1.22.0" androidGradlePlugin = "7.4.2" composeCompiler = "1.4.4" -compose = "1.4.0" +compose = "1.4.1" glance = "1.0.0-alpha05" material3 = "1.0.1" androidDesugaring = "2.0.3" From b9138f4ee8eb1ff1cddfaeaddd58afb06d39f070 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Apr 2023 22:42:21 +0200 Subject: [PATCH 41/44] [Oztechan/CCC#1457] Dependency update dependency com.android.billingclient:billing to v5.2.0 (#2265) Signed-off-by: Mustafa Ozhan 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 a1a2957abe..708377dccd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -31,7 +31,7 @@ navigation = "2.5.3" playCore = "1.10.3" kotlinXDateTime = "0.4.0" coroutines = "1.6.4" -billing = "5.1.0" +billing = "5.2.0" leakCanary = "2.10" sqlDelight = "1.5.5" lifecycle = "2.6.1" From 2689daee211313628323e63fa33c4950bb835b2a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Apr 2023 22:42:38 +0200 Subject: [PATCH 42/44] [Oztechan/CCC#1457] Dependency update plugin com.gradle.enterprise to v3.12.6 (#2264) Signed-off-by: Mustafa Ozhan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index a1714f76f9..583fc2589f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -10,7 +10,7 @@ pluginManagement { } } plugins { - id("com.gradle.enterprise") version ("3.12.3") + id("com.gradle.enterprise") version ("3.12.6") } gradleEnterprise { From 7d14d908651d90ba9a040f2fdcfd029ec6ad1021 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Fri, 7 Apr 2023 16:13:11 +0200 Subject: [PATCH 43/44] [Oztechan/CCC#2259] Move premium related models and utils into :client:viewmodel:premium module (#2260) --- .../android/ui/mobile/content/premium/PremiumAdapter.kt | 2 +- .../ui/mobile/content/premium/PremiumBottomSheet.kt | 2 +- .../oztechan/ccc/android/ui/mobile/util/PurchaseUtil.kt | 6 +++--- .../ccc/android/ui/mobile/util/PurchaseUtilTest.kt | 2 +- .../viewmodel/premium/client-viewmodel-premium.gradle.kts | 1 + .../oztechan/ccc/client/viewmodel/premium/PremiumSEED.kt | 2 +- .../ccc/client/viewmodel/premium/PremiumViewModel.kt | 8 ++++---- .../ccc/client/viewmodel/premium}/model/OldPurchase.kt | 2 +- .../ccc/client/viewmodel/premium}/model/PremiumData.kt | 2 +- .../ccc/client/viewmodel/premium}/model/PremiumType.kt | 4 ++-- .../ccc/client/viewmodel/premium}/util/PremiumUtil.kt | 6 ++++-- .../ccc/client/viewmodel/premium/PremiumViewModelTest.kt | 8 ++++---- .../client/viewmodel/premium}/model/PremiumTypeTest.kt | 2 +- .../ccc/client/viewmodel/premium}/util/PremiumUtilTest.kt | 6 ++++-- 14 files changed, 29 insertions(+), 24 deletions(-) rename client/{core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared => viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium}/model/OldPurchase.kt (56%) rename client/{core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared => viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium}/model/PremiumData.kt (62%) rename client/{core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared => viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium}/model/PremiumType.kt (84%) rename client/{core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared => viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium}/util/PremiumUtil.kt (84%) rename client/{core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared => viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium}/model/PremiumTypeTest.kt (88%) rename client/{core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared => viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium}/util/PremiumUtilTest.kt (87%) diff --git a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/premium/PremiumAdapter.kt b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/premium/PremiumAdapter.kt index b6f7989a6e..1631e925d6 100644 --- a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/premium/PremiumAdapter.kt +++ b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/premium/PremiumAdapter.kt @@ -5,8 +5,8 @@ import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import com.github.submob.basemob.adapter.BaseVBRecyclerViewAdapter import com.oztechan.ccc.android.ui.mobile.databinding.ItemPremiumBinding -import com.oztechan.ccc.client.core.shared.model.PremiumType import com.oztechan.ccc.client.viewmodel.premium.PremiumEvent +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType class PremiumAdapter( private val premiumEvent: PremiumEvent diff --git a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/premium/PremiumBottomSheet.kt b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/premium/PremiumBottomSheet.kt index cd36fcb780..7e302afdc3 100644 --- a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/premium/PremiumBottomSheet.kt +++ b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/content/premium/PremiumBottomSheet.kt @@ -23,9 +23,9 @@ import com.oztechan.ccc.android.ui.mobile.util.toPremiumDataList import com.oztechan.ccc.android.ui.mobile.util.visibleIf import com.oztechan.ccc.client.core.analytics.AnalyticsManager import com.oztechan.ccc.client.core.analytics.model.ScreenName -import com.oztechan.ccc.client.core.shared.model.PremiumType import com.oztechan.ccc.client.viewmodel.premium.PremiumEffect import com.oztechan.ccc.client.viewmodel.premium.PremiumViewModel +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach import org.koin.android.ext.android.inject diff --git a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/PurchaseUtil.kt b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/PurchaseUtil.kt index 6f43ae8c5d..b5c81b8dff 100644 --- a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/PurchaseUtil.kt +++ b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/PurchaseUtil.kt @@ -2,9 +2,9 @@ package com.oztechan.ccc.android.ui.mobile.util import com.oztechan.ccc.android.core.billing.model.ProductDetails import com.oztechan.ccc.android.core.billing.model.PurchaseHistoryRecord -import com.oztechan.ccc.client.core.shared.model.OldPurchase -import com.oztechan.ccc.client.core.shared.model.PremiumData -import com.oztechan.ccc.client.core.shared.model.PremiumType +import com.oztechan.ccc.client.viewmodel.premium.model.OldPurchase +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumData +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType internal fun List.toPremiumDataList(): List = map { PremiumData(it.price, it.description, it.id) diff --git a/android/ui/mobile/src/test/kotlin/com/oztechan/ccc/android/ui/mobile/util/PurchaseUtilTest.kt b/android/ui/mobile/src/test/kotlin/com/oztechan/ccc/android/ui/mobile/util/PurchaseUtilTest.kt index 33007086c6..4726006ef4 100644 --- a/android/ui/mobile/src/test/kotlin/com/oztechan/ccc/android/ui/mobile/util/PurchaseUtilTest.kt +++ b/android/ui/mobile/src/test/kotlin/com/oztechan/ccc/android/ui/mobile/util/PurchaseUtilTest.kt @@ -2,7 +2,7 @@ package com.oztechan.ccc.android.ui.mobile.util import com.oztechan.ccc.android.core.billing.model.ProductDetails import com.oztechan.ccc.android.core.billing.model.PurchaseHistoryRecord -import com.oztechan.ccc.client.core.shared.model.PremiumType +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType import kotlin.test.Test import kotlin.test.assertEquals diff --git a/client/viewmodel/premium/client-viewmodel-premium.gradle.kts b/client/viewmodel/premium/client-viewmodel-premium.gradle.kts index c52c08f3cd..20ef1ca389 100644 --- a/client/viewmodel/premium/client-viewmodel-premium.gradle.kts +++ b/client/viewmodel/premium/client-viewmodel-premium.gradle.kts @@ -21,6 +21,7 @@ kotlin { implementation(koinCore) implementation(kermit) implementation(coroutines) + implementation(kotlinXDateTime) } Modules.Client.Core.apply { diff --git a/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumSEED.kt b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumSEED.kt index c7c8577cea..6b0a9cc893 100644 --- a/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumSEED.kt +++ b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumSEED.kt @@ -1,9 +1,9 @@ package com.oztechan.ccc.client.viewmodel.premium -import com.oztechan.ccc.client.core.shared.model.PremiumType import com.oztechan.ccc.client.core.viewmodel.BaseEffect import com.oztechan.ccc.client.core.viewmodel.BaseEvent import com.oztechan.ccc.client.core.viewmodel.BaseState +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType // State data class PremiumState( diff --git a/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModel.kt b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModel.kt index 87e063532d..ad64980ab8 100644 --- a/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModel.kt +++ b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModel.kt @@ -6,10 +6,6 @@ package com.oztechan.ccc.client.viewmodel.premium import co.touchlab.kermit.Logger import com.github.submob.scopemob.whether -import com.oztechan.ccc.client.core.shared.model.OldPurchase -import com.oztechan.ccc.client.core.shared.model.PremiumData -import com.oztechan.ccc.client.core.shared.model.PremiumType -import com.oztechan.ccc.client.core.shared.util.calculatePremiumEnd import com.oztechan.ccc.client.core.shared.util.isNotPassed import com.oztechan.ccc.client.core.shared.util.nowAsLong import com.oztechan.ccc.client.core.viewmodel.BaseData @@ -17,6 +13,10 @@ import com.oztechan.ccc.client.core.viewmodel.BaseSEEDViewModel import com.oztechan.ccc.client.core.viewmodel.util.launchIgnored import com.oztechan.ccc.client.core.viewmodel.util.update import com.oztechan.ccc.client.storage.app.AppStorage +import com.oztechan.ccc.client.viewmodel.premium.model.OldPurchase +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumData +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType +import com.oztechan.ccc.client.viewmodel.premium.util.calculatePremiumEnd import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asSharedFlow diff --git a/client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/model/OldPurchase.kt b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/OldPurchase.kt similarity index 56% rename from client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/model/OldPurchase.kt rename to client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/OldPurchase.kt index 22645c7043..4faaf34958 100644 --- a/client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/model/OldPurchase.kt +++ b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/OldPurchase.kt @@ -1,4 +1,4 @@ -package com.oztechan.ccc.client.core.shared.model +package com.oztechan.ccc.client.viewmodel.premium.model data class OldPurchase( val date: Long, diff --git a/client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/model/PremiumData.kt b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/PremiumData.kt similarity index 62% rename from client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/model/PremiumData.kt rename to client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/PremiumData.kt index a6fde6d679..c63496396a 100644 --- a/client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/model/PremiumData.kt +++ b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/PremiumData.kt @@ -1,4 +1,4 @@ -package com.oztechan.ccc.client.core.shared.model +package com.oztechan.ccc.client.viewmodel.premium.model data class PremiumData( var cost: String, diff --git a/client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/model/PremiumType.kt b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/PremiumType.kt similarity index 84% rename from client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/model/PremiumType.kt rename to client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/PremiumType.kt index a75674d9f7..0d2a014c5b 100644 --- a/client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/model/PremiumType.kt +++ b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/PremiumType.kt @@ -2,9 +2,9 @@ * Copyright (c) 2021 Mustafa Ozhan. All rights reserved. */ -package com.oztechan.ccc.client.core.shared.model +package com.oztechan.ccc.client.viewmodel.premium.model -import com.oztechan.ccc.client.core.shared.util.REWARDED_AD_PREMIUM_IN_DAYS +import com.oztechan.ccc.client.viewmodel.premium.util.REWARDED_AD_PREMIUM_IN_DAYS enum class PremiumType(val data: PremiumData) { VIDEO(PremiumData("Watch Video", "$REWARDED_AD_PREMIUM_IN_DAYS Days", "")), diff --git a/client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/util/PremiumUtil.kt b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/util/PremiumUtil.kt similarity index 84% rename from client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/util/PremiumUtil.kt rename to client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/util/PremiumUtil.kt index bf65f0483e..61f4f0da47 100644 --- a/client/core/shared/src/commonMain/kotlin/com/oztechan/ccc/client/core/shared/util/PremiumUtil.kt +++ b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/util/PremiumUtil.kt @@ -1,6 +1,8 @@ -package com.oztechan.ccc.client.core.shared.util +package com.oztechan.ccc.client.viewmodel.premium.util -import com.oztechan.ccc.client.core.shared.model.PremiumType +import com.oztechan.ccc.client.core.shared.util.nowAsLong +import com.oztechan.ccc.client.core.shared.util.toInstant +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType import kotlinx.datetime.DateTimeUnit import kotlinx.datetime.TimeZone import kotlinx.datetime.plus diff --git a/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModelTest.kt b/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModelTest.kt index 7e2263a87f..9522df4b21 100644 --- a/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModelTest.kt +++ b/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModelTest.kt @@ -6,12 +6,12 @@ package com.oztechan.ccc.client.viewmodel.premium import co.touchlab.kermit.CommonWriter import co.touchlab.kermit.Logger -import com.oztechan.ccc.client.core.shared.model.OldPurchase -import com.oztechan.ccc.client.core.shared.model.PremiumData -import com.oztechan.ccc.client.core.shared.model.PremiumType -import com.oztechan.ccc.client.core.shared.util.calculatePremiumEnd import com.oztechan.ccc.client.core.shared.util.nowAsLong import com.oztechan.ccc.client.storage.app.AppStorage +import com.oztechan.ccc.client.viewmodel.premium.model.OldPurchase +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumData +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType +import com.oztechan.ccc.client.viewmodel.premium.util.calculatePremiumEnd import io.mockative.Mock import io.mockative.classOf import io.mockative.configure diff --git a/client/core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared/model/PremiumTypeTest.kt b/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/PremiumTypeTest.kt similarity index 88% rename from client/core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared/model/PremiumTypeTest.kt rename to client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/PremiumTypeTest.kt index 34fa84435f..138f006467 100644 --- a/client/core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared/model/PremiumTypeTest.kt +++ b/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/model/PremiumTypeTest.kt @@ -1,4 +1,4 @@ -package com.oztechan.ccc.client.core.shared.model +package com.oztechan.ccc.client.viewmodel.premium.model import kotlin.test.Test import kotlin.test.assertEquals diff --git a/client/core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared/util/PremiumUtilTest.kt b/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/util/PremiumUtilTest.kt similarity index 87% rename from client/core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared/util/PremiumUtilTest.kt rename to client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/util/PremiumUtilTest.kt index 41b30cbadd..556beca873 100644 --- a/client/core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared/util/PremiumUtilTest.kt +++ b/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/util/PremiumUtilTest.kt @@ -1,6 +1,8 @@ -package com.oztechan.ccc.client.core.shared.util +package com.oztechan.ccc.client.viewmodel.premium.util -import com.oztechan.ccc.client.core.shared.model.PremiumType +import com.oztechan.ccc.client.core.shared.util.nowAsLong +import com.oztechan.ccc.client.core.shared.util.toInstant +import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType import kotlinx.datetime.DateTimePeriod import kotlinx.datetime.TimeZone import kotlinx.datetime.plus From b409ea5f32752de5c8e9a96de266cf9b36c0af8a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 12:22:03 +0200 Subject: [PATCH 44/44] [Oztechan/CCC#1457] Lock file maintenance (#2266) Signed-off-by: Mustafa Ozhan 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 b4f5faf024..3bfdb0270d 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -3,12 +3,12 @@ GEM specs: CFPropertyList (3.0.6) rexml - addressable (2.8.2) + addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.739.0) + aws-partitions (1.743.0) aws-sdk-core (3.171.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) @@ -17,7 +17,7 @@ GEM aws-sdk-kms (1.63.0) aws-sdk-core (~> 3, >= 3.165.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.120.0) + aws-sdk-s3 (1.120.1) aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4)