diff --git a/app/src/main/kotlin/top/learningman/push/activity/SettingsActivity.kt b/app/src/main/kotlin/top/learningman/push/activity/SettingsActivity.kt index 53f9a8b..73ece72 100644 --- a/app/src/main/kotlin/top/learningman/push/activity/SettingsActivity.kt +++ b/app/src/main/kotlin/top/learningman/push/activity/SettingsActivity.kt @@ -1,6 +1,7 @@ package top.learningman.push.activity import android.content.Intent +import android.net.Uri import android.os.Bundle import android.util.Log import android.widget.Toast @@ -49,6 +50,19 @@ class SettingsActivity : AppCompatActivity() { } true } + } else { + setOnPreferenceClickListener { + Log.d("SettingsActivity", "Version Clicked") + startActivity( + Intent( + Intent.ACTION_VIEW, + Uri.parse("https://github.com/ZNotify/android/releases") + ).apply { + addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + } + ) + true + } } summary = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})" }