From b2d502ae79239e36106c78ae09aeca19a55f9561 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Fri, 22 Dec 2023 10:09:28 -0300 Subject: [PATCH] feat: add open in browser button to instance about fragment --- .../android/fragments/settings/SettingsServerFragment.java | 2 ++ mastodon/src/main/res/menu/instance_info.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsServerFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsServerFragment.java index ad2c96c598..fb2ac2fa61 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsServerFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsServerFragment.java @@ -160,6 +160,8 @@ public boolean onOptionsItemSelected(MenuItem item){ args.putString("account", accountID); args.putString("domain", instance.normalizedUri); Nav.go(getActivity(), CustomLocalTimelineFragment.class, args); + } else if (id==R.id.open_in_browser){ + UiUtils.launchWebBrowser(getActivity(), new Uri.Builder().scheme("https").authority(instance.uri).appendPath("about").build().toString()); } return true; } diff --git a/mastodon/src/main/res/menu/instance_info.xml b/mastodon/src/main/res/menu/instance_info.xml index eea36f26b8..f3f52f6a57 100644 --- a/mastodon/src/main/res/menu/instance_info.xml +++ b/mastodon/src/main/res/menu/instance_info.xml @@ -2,4 +2,5 @@ + \ No newline at end of file