Skip to content

Commit 23e9d34

Browse files
author
Dennis Mantz
committed
Workaround for Trial Period in case people had the old app installed. v2.0.2
1 parent 27e3165 commit 23e9d34

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ android {
1414
applicationId = "com.mantz_it.rfanalyzer"
1515
minSdk = 28
1616
targetSdk = 36
17-
versionCode = 20013
18-
versionName = "2.0.1"
17+
versionCode = 20014
18+
versionName = "2.0.2"
1919

2020
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2121
}

app/src/main/java/com/mantz_it/rfanalyzer/database/BillingRepository.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,10 @@ class BillingRepository(val context: Context, val appStateRepository: AppStateRe
292292
val installTimestamp = getInstallTimestamp(context)
293293
val installedDays = TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - installTimestamp).toInt()
294294
val trialPeriod= 7 // 7-day trial period
295-
return (trialPeriod - installedDays).coerceAtLeast(0)
295+
return if (installedDays > 60) // workaround for people who had the old app version installed already (prior to 2.0 launch)
296+
trialPeriod // these people just get 7 days and the usageTime is the limiting factor
297+
else
298+
(trialPeriod - installedDays).coerceAtLeast(0)
296299
}
297300

298301
override fun isTrialPeriodExpired(): Boolean {

app/src/main/java/com/mantz_it/rfanalyzer/ui/composable/SourceTab.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ fun SourceTabComposable(
348348
}
349349
OutlinedSwitch(
350350
enabled = !analyzerRunning,
351-
label = "External Server",
351+
label = "External Server (rtl_tcp)",
352352
helpText = "Connect to external RTL-SDR server instead of USB device",
353353
isChecked = rtlsdrExternalServerEnabled,
354354
onCheckedChange = sourceTabActions.onRtlsdrExternalServerEnabledChanged,

0 commit comments

Comments
 (0)