From e58914ef58a826972426350e9bc03c8c8c898d37 Mon Sep 17 00:00:00 2001 From: aminecmi Date: Mon, 27 Nov 2023 21:31:46 +0100 Subject: [PATCH] chore: Source tracker url in the menu. --- .../amine/apps/readerforselfossv2/android/HomeActivity.kt | 6 ++++++ .../apps/readerforselfossv2/android/LoginActivity.kt | 8 ++++++++ androidApp/src/main/res/menu/home_menu.xml | 6 ++++++ androidApp/src/main/res/menu/login_menu.xml | 7 +++++++ 4 files changed, 27 insertions(+) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt index 116d21b..09108db 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt @@ -1,6 +1,7 @@ package bou.amine.apps.readerforselfossv2.android import android.content.Intent +import android.net.Uri import android.os.Bundle import android.view.Menu import android.view.MenuItem @@ -565,6 +566,11 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { + R.id.issue_tracker -> { + val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(AppSettingsService.trackerUrl)) + startActivity(browserIntent) + return true + } R.id.action_filter -> { val filterSheetFragment = FilterSheetFragment() filterSheetFragment.show(supportFragmentManager, FilterSheetFragment.TAG) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt index 722f142..686b21c 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt @@ -4,6 +4,7 @@ import android.animation.Animator import android.animation.AnimatorListenerAdapter import android.annotation.SuppressLint import android.content.Intent +import android.net.Uri import android.os.Bundle import android.text.TextUtils import android.view.Menu @@ -254,10 +255,17 @@ class LoginActivity : AppCompatActivity(), DIAware { override fun onOptionsItemSelected(item: MenuItem): Boolean { return when (item.itemId) { + R.id.issue_tracker -> { + val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(AppSettingsService.trackerUrl)) + startActivity(browserIntent) + return true + } R.id.about -> { LibsBuilder() .withAboutIconShown(true) .withAboutVersionShown(true) + .withAboutSpecial2("Bug reports").withAboutSpecial2Description(AppSettingsService.trackerUrl) + .withAboutSpecial1("Project Page").withAboutSpecial1Description(AppSettingsService.sourceUrl) .start(this) true } diff --git a/androidApp/src/main/res/menu/home_menu.xml b/androidApp/src/main/res/menu/home_menu.xml index 285d3f0..25e06cb 100644 --- a/androidApp/src/main/res/menu/home_menu.xml +++ b/androidApp/src/main/res/menu/home_menu.xml @@ -36,6 +36,12 @@ android:orderInCategory="101" android:title="@string/menu_home_refresh" /> + + + + +