From 19697f4f392e7e2fef28861a07d5d95f435e8a96 Mon Sep 17 00:00:00 2001 From: rebelonion <87634197+rebelonion@users.noreply.github.com> Date: Thu, 14 Mar 2024 02:59:59 -0500 Subject: [PATCH] feat: view profile on anilist --- app/src/main/java/ani/dantotsu/profile/ProfileActivity.kt | 5 +++++ app/src/main/res/menu/menu_profile.xml | 5 +++++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 11 insertions(+) diff --git a/app/src/main/java/ani/dantotsu/profile/ProfileActivity.kt b/app/src/main/java/ani/dantotsu/profile/ProfileActivity.kt index e04717c3..c493f6e4 100644 --- a/app/src/main/java/ani/dantotsu/profile/ProfileActivity.kt +++ b/app/src/main/java/ani/dantotsu/profile/ProfileActivity.kt @@ -24,6 +24,7 @@ import ani.dantotsu.databinding.ActivityProfileBinding import ani.dantotsu.initActivity import ani.dantotsu.loadImage import ani.dantotsu.navBarHeight +import ani.dantotsu.openLinkInBrowser import ani.dantotsu.others.ImageViewDialog import ani.dantotsu.profile.activity.FeedFragment import ani.dantotsu.settings.saving.PrefManager @@ -142,6 +143,10 @@ class ProfileActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedListene ) true } + R.id.action_view_on_anilist -> { + openLinkInBrowser("https://anilist.co/user/${user.name}") + true + } else -> false } } diff --git a/app/src/main/res/menu/menu_profile.xml b/app/src/main/res/menu/menu_profile.xml index 0814236f..a39a8010 100644 --- a/app/src/main/res/menu/menu_profile.xml +++ b/app/src/main/res/menu/menu_profile.xml @@ -12,4 +12,9 @@ android:title="@string/view_followers" app:showAsAction="never" /> + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 70260674..59b32140 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -699,4 +699,5 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc Blur Banners Blur Hide Scroll Bar + View on AniList