Compare commits

...

7 Commits

Author SHA1 Message Date
145179bba3 Update dependencies 2022-12-18 04:39:01 -06:00
Jakub Kalinowski
c7d1e92cae Issue 1589: Fixed crash after choosing Settings/Rate app when there's no Play Store on the device (#1590)
* Using startActivitySafely when launching Play Store

* Returning true for rateApp click
2022-12-12 00:55:58 +01:00
dependabot[bot]
d24dcbf2ca Bump kotlinVersion from 1.7.10 to 1.7.21
Bumps `kotlinVersion` from 1.7.10 to 1.7.21.

Updates `org.jetbrains.kotlin.android` from 1.7.10 to 1.7.21

Updates `org.jetbrains.kotlin.kapt` from 1.7.10 to 1.7.21

Updates `org.jetbrains.kotlin.android.extensions` from 1.7.10 to 1.7.21

Updates `org.jetbrains.kotlin.multiplatform` from 1.7.10 to 1.7.21

Updates `kotlin-stdlib-jdk8` from 1.7.10 to 1.7.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.7.10...v1.7.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.kapt
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.android.extensions
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin.multiplatform
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-26 22:12:04 +01:00
dependabot[bot]
579b33cc78 Bump appcompat from 1.5.0 to 1.5.1
Bumps appcompat from 1.5.0 to 1.5.1.

---
updated-dependencies:
- dependency-name: androidx.appcompat:appcompat
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-25 22:12:00 +01:00
dependabot[bot]
1a3e6315a1 Bump opencsv from 5.6 to 5.7.1
Bumps opencsv from 5.6 to 5.7.1.

---
updated-dependencies:
- dependency-name: com.opencsv:opencsv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-25 17:29:07 +01:00
dependabot[bot]
7f4d06d15d Bump logback-classic from 1.4.0 to 1.4.4
Bumps [logback-classic](https://github.com/qos-ch/logback) from 1.4.0 to 1.4.4.
- [Release notes](https://github.com/qos-ch/logback/releases)
- [Commits](https://github.com/qos-ch/logback/compare/v_1.4.0...v_1.4.4)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-25 17:28:46 +01:00
dependabot[bot]
b8033a6012 Bump sqlite-jdbc from 3.39.2.1 to 3.39.3.0
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.39.2.1 to 3.39.3.0.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.39.2.1...3.39.3.0)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-25 17:28:36 +01:00
6 changed files with 36 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
plugins { plugins {
val kotlinVersion = "1.7.10" val kotlinVersion = "1.7.21"
id("com.android.application") version ("7.3.0-rc01") apply (false) id("com.android.application") version ("7.3.1") apply (false)
id("org.jetbrains.kotlin.android") version kotlinVersion apply (false) id("org.jetbrains.kotlin.android") version kotlinVersion apply (false)
id("org.jetbrains.kotlin.kapt") version kotlinVersion apply (false) id("org.jetbrains.kotlin.kapt") version kotlinVersion apply (false)
id("org.jetbrains.kotlin.android.extensions") version kotlinVersion apply (false) id("org.jetbrains.kotlin.android.extensions") version kotlinVersion apply (false)

View File

@@ -81,7 +81,7 @@ android {
dependencies { dependencies {
val daggerVersion = "2.43.2" val daggerVersion = "2.43.2"
val kotlinVersion = "1.7.10" val kotlinVersion = "1.7.21"
val kxCoroutinesVersion = "1.6.4" val kxCoroutinesVersion = "1.6.4"
val ktorVersion = "1.6.8" val ktorVersion = "1.6.8"
val espressoVersion = "3.4.0" val espressoVersion = "3.4.0"
@@ -92,10 +92,10 @@ dependencies {
androidTestImplementation("com.linkedin.dexmaker:dexmaker-mockito:2.28.3") androidTestImplementation("com.linkedin.dexmaker:dexmaker-mockito:2.28.3")
androidTestImplementation("io.ktor:ktor-client-mock:$ktorVersion") androidTestImplementation("io.ktor:ktor-client-mock:$ktorVersion")
androidTestImplementation("io.ktor:ktor-jackson:$ktorVersion") androidTestImplementation("io.ktor:ktor-jackson:$ktorVersion")
androidTestImplementation("androidx.annotation:annotation:1.4.0") androidTestImplementation("androidx.annotation:annotation:1.5.0")
androidTestImplementation("androidx.test.ext:junit:1.1.3") androidTestImplementation("androidx.test.ext:junit:1.1.4")
androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0") androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0")
androidTestImplementation("androidx.test:rules:1.4.0") androidTestImplementation("androidx.test:rules:1.5.0")
androidTestImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0") androidTestImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0")
compileOnly("javax.annotation:jsr250-api:1.0") compileOnly("javax.annotation:jsr250-api:1.0")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.2.2") coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.2.2")
@@ -110,11 +110,11 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion") implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$kxCoroutinesVersion") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$kxCoroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kxCoroutinesVersion") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kxCoroutinesVersion")
implementation("androidx.appcompat:appcompat:1.5.0") implementation("androidx.appcompat:appcompat:1.5.1")
implementation("androidx.legacy:legacy-preference-v14:1.0.0") implementation("androidx.legacy:legacy-preference-v14:1.0.0")
implementation("androidx.legacy:legacy-support-v4:1.0.0") implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("com.google.android.material:material:1.6.1") implementation("com.google.android.material:material:1.7.0")
implementation("com.opencsv:opencsv:5.6") implementation("com.opencsv:opencsv:5.7.1")
implementation(project(":uhabits-core")) implementation(project(":uhabits-core"))
kapt("com.google.dagger:dagger-compiler:$daggerVersion") kapt("com.google.dagger:dagger-compiler:$daggerVersion")
kaptAndroidTest("com.google.dagger:dagger-compiler:$daggerVersion") kaptAndroidTest("com.google.dagger:dagger-compiler:$daggerVersion")

View File

@@ -22,6 +22,7 @@ import android.app.backup.BackupManager
import android.content.Intent import android.content.Intent
import android.content.SharedPreferences import android.content.SharedPreferences
import android.content.SharedPreferences.OnSharedPreferenceChangeListener import android.content.SharedPreferences.OnSharedPreferenceChangeListener
import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.provider.Settings import android.provider.Settings
import android.util.Log import android.util.Log
@@ -43,6 +44,7 @@ import org.isoron.uhabits.core.utils.DateUtils.Companion.getLongWeekdayNames
import org.isoron.uhabits.notifications.AndroidNotificationTray.Companion.createAndroidNotificationChannel import org.isoron.uhabits.notifications.AndroidNotificationTray.Companion.createAndroidNotificationChannel
import org.isoron.uhabits.notifications.RingtoneManager import org.isoron.uhabits.notifications.RingtoneManager
import org.isoron.uhabits.utils.StyledResources import org.isoron.uhabits.utils.StyledResources
import org.isoron.uhabits.utils.startActivitySafely
import org.isoron.uhabits.widgets.WidgetUpdater import org.isoron.uhabits.widgets.WidgetUpdater
import java.util.Calendar import java.util.Calendar
@@ -92,10 +94,12 @@ class SettingsFragment : PreferenceFragmentCompat(), OnSharedPreferenceChangeLis
override fun onPreferenceTreeClick(preference: Preference): Boolean { override fun onPreferenceTreeClick(preference: Preference): Boolean {
val key = preference.key ?: return false val key = preference.key ?: return false
if (key == "reminderSound") { when (key) {
"reminderSound" -> {
showRingtonePicker() showRingtonePicker()
return true return true
} else if (key == "reminderCustomize") { }
"reminderCustomize" -> {
createAndroidNotificationChannel(requireContext()) createAndroidNotificationChannel(requireContext())
val intent = Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS) val intent = Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS)
intent.putExtra(Settings.EXTRA_APP_PACKAGE, requireContext().packageName) intent.putExtra(Settings.EXTRA_APP_PACKAGE, requireContext().packageName)
@@ -103,6 +107,12 @@ class SettingsFragment : PreferenceFragmentCompat(), OnSharedPreferenceChangeLis
startActivity(intent) startActivity(intent)
return true return true
} }
"rateApp" -> {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.playStoreURL)))
activity?.startActivitySafely(intent)
return true
}
}
return super.onPreferenceTreeClick(preference) return super.onPreferenceTreeClick(preference)
} }

View File

@@ -160,11 +160,9 @@
</Preference> </Preference>
<Preference <Preference
android:key="rateApp"
android:title="@string/pref_rate_this_app" android:title="@string/pref_rate_this_app"
app:iconSpaceReserved="false"> app:iconSpaceReserved="false">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/playStoreURL" />
</Preference> </Preference>
<Preference <Preference

View File

@@ -45,11 +45,11 @@ kotlin {
implementation(kotlin("stdlib-jdk8")) implementation(kotlin("stdlib-jdk8"))
compileOnly("com.google.dagger:dagger:2.43.2") compileOnly("com.google.dagger:dagger:2.43.2")
implementation("com.google.guava:guava:31.1-android") implementation("com.google.guava:guava:31.1-android")
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.7.10") implementation("org.jetbrains.kotlin:kotlin-stdlib:1.7.21")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4")
implementation("androidx.annotation:annotation:1.4.0") implementation("androidx.annotation:annotation:1.5.0")
implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.findbugs:jsr305:3.0.2")
implementation("com.opencsv:opencsv:5.6") implementation("com.opencsv:opencsv:5.7.1")
implementation("commons-codec:commons-codec:1.15") implementation("commons-codec:commons-codec:1.15")
implementation("org.apache.commons:commons-lang3:3.12.0") implementation("org.apache.commons:commons-lang3:3.12.0")
} }
@@ -59,7 +59,7 @@ kotlin {
dependencies { dependencies {
implementation(kotlin("test")) implementation(kotlin("test"))
implementation(kotlin("test-junit")) implementation(kotlin("test-junit"))
implementation("org.xerial:sqlite-jdbc:3.39.2.1") implementation("org.xerial:sqlite-jdbc:3.40.0.0")
implementation("org.hamcrest:hamcrest:2.2") implementation("org.hamcrest:hamcrest:2.2")
implementation("org.apache.commons:commons-io:1.3.2") implementation("org.apache.commons:commons-io:1.3.2")
implementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0") implementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0")

View File

@@ -34,8 +34,8 @@ application {
dependencies { dependencies {
val ktorVersion = "1.6.8" val ktorVersion = "1.6.8"
val kotlinVersion = "1.7.10" val kotlinVersion = "1.7.21"
val logbackVersion = "1.4.0" val logbackVersion = "1.4.4"
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion") implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion") implementation("io.ktor:ktor-server-netty:$ktorVersion")
implementation("ch.qos.logback:logback-classic:$logbackVersion") implementation("ch.qos.logback:logback-classic:$logbackVersion")