Skip to content

Commit

Permalink
feat: add open in browser button to instance about fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasGGamerM committed Dec 22, 2023
1 parent 4d9f625 commit b2d502a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions mastodon/src/main/res/menu/instance_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/share" android:title="@string/share_user" android:icon="@drawable/ic_fluent_share_24_regular"/>
<item android:id="@+id/open_timeline" android:title="@string/mo_instance_info_open_timeline" android:icon="@drawable/ic_fluent_timeline_24_regular"/>
<item android:id="@+id/open_in_browser" android:title="@string/open_in_browser" android:icon="@drawable/ic_fluent_globe_24_regular"/>
</menu>

0 comments on commit b2d502a

Please sign in to comment.