diff --git a/app/build.gradle b/app/build.gradle index a07437ea..6923f2f0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -71,10 +71,6 @@ android { targetCompatibility = "8" sourceCompatibility = "8" } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() - } } dependencies { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5d48f34c..7974a1c9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,8 +13,8 @@ + android:versionCode="178" + android:versionName="1.3.2"> diff --git a/app/src/main/java/space/celestia/mobilecelestia/favorite/FavoriteItemRecyclerViewAdapter.kt b/app/src/main/java/space/celestia/mobilecelestia/favorite/FavoriteItemRecyclerViewAdapter.kt index 14c285e2..ac12a485 100644 --- a/app/src/main/java/space/celestia/mobilecelestia/favorite/FavoriteItemRecyclerViewAdapter.kt +++ b/app/src/main/java/space/celestia/mobilecelestia/favorite/FavoriteItemRecyclerViewAdapter.kt @@ -11,6 +11,7 @@ package space.celestia.mobilecelestia.favorite +import android.os.Build import android.view.LayoutInflater import android.view.Menu import android.view.View @@ -236,19 +237,21 @@ class FavoriteItemRecyclerViewAdapter private constructor( } return@setOnLongClickListener true } - holder.itemView.setOnContextClickListener { - val popup = PopupMenu(it.context, it) - setupPopupMenu(popup, actions) { menuItem -> - when (menuItem) { - FavoriteItemAction.Delete -> { - listener?.deleteFavoriteItem(children.indexOf(item)) - } - FavoriteItemAction.Rename -> { - listener?.renameFavoriteItem(item) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + holder.itemView.setOnContextClickListener { + val popup = PopupMenu(it.context, it) + setupPopupMenu(popup, actions) { menuItem -> + when (menuItem) { + FavoriteItemAction.Delete -> { + listener?.deleteFavoriteItem(children.indexOf(item)) + } + FavoriteItemAction.Rename -> { + listener?.renameFavoriteItem(item) + } } } + return@setOnContextClickListener true } - return@setOnContextClickListener true } } else { holder.itemView.setOnLongClickListener(null) diff --git a/app/src/main/java/space/celestia/mobilecelestia/toolbar/ToolbarFragment.kt b/app/src/main/java/space/celestia/mobilecelestia/toolbar/ToolbarFragment.kt index 8f8d7e94..30a3e4c5 100644 --- a/app/src/main/java/space/celestia/mobilecelestia/toolbar/ToolbarFragment.kt +++ b/app/src/main/java/space/celestia/mobilecelestia/toolbar/ToolbarFragment.kt @@ -49,7 +49,7 @@ enum class ToolbarAction : Serializable { val imageName: String get() { - return "toolbar_" + toString().toLowerCase(Locale.ENGLISH) + return "toolbar_" + toString().lowercase(Locale.US) } companion object { diff --git a/build.gradle b/build.gradle index 03d35dcf..942b3de3 100644 --- a/build.gradle +++ b/build.gradle @@ -12,25 +12,23 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.4.32' + ext.kotlin_version = '1.5.0' + repositories { google() - jcenter() - + mavenCentral() } + dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:4.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files } } allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b7573601..c82c67c1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip