From 55bbafdbb5554aad5696fe8eb8a9fd7e94934bb4 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 11 Nov 2020 10:42:40 +0100 Subject: [PATCH] Fix issue #63 - Reach owner from channels --- .../java/app/fedilab/fedilabtube/ShowAccountActivity.java | 1 + .../java/app/fedilab/fedilabtube/ShowChannelActivity.java | 7 +++++++ app/src/main/res/menu/main_account.xml | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/app/src/main/java/app/fedilab/fedilabtube/ShowAccountActivity.java b/app/src/main/java/app/fedilab/fedilabtube/ShowAccountActivity.java index e6450d1..e9f41ca 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/ShowAccountActivity.java +++ b/app/src/main/java/app/fedilab/fedilabtube/ShowAccountActivity.java @@ -105,6 +105,7 @@ public class ShowAccountActivity extends AppCompatActivity { if (!Helper.isLoggedIn(ShowAccountActivity.this)) { menu.findItem(R.id.action_mute).setVisible(false); } + menu.findItem(R.id.action_display_account).setVisible(false); return true; } diff --git a/app/src/main/java/app/fedilab/fedilabtube/ShowChannelActivity.java b/app/src/main/java/app/fedilab/fedilabtube/ShowChannelActivity.java index b71dc1f..6d7aba7 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/ShowChannelActivity.java +++ b/app/src/main/java/app/fedilab/fedilabtube/ShowChannelActivity.java @@ -170,6 +170,13 @@ public class ShowChannelActivity extends AppCompatActivity { } catch (Exception e) { Toasty.error(ShowChannelActivity.this, getString(R.string.toast_error), Toasty.LENGTH_LONG).show(); } + }else if (item.getItemId() == R.id.action_display_account) { + Bundle b = new Bundle(); + Intent intent = new Intent(ShowChannelActivity.this, ShowAccountActivity.class); + b.putParcelable("account", channel.getOwnerAccount()); + b.putString("accountAcct", channel.getOwnerAccount().getAcct()); + intent.putExtras(b); + startActivity(intent); } return super.onOptionsItemSelected(item); } diff --git a/app/src/main/res/menu/main_account.xml b/app/src/main/res/menu/main_account.xml index 46c1057..00ef6d2 100644 --- a/app/src/main/res/menu/main_account.xml +++ b/app/src/main/res/menu/main_account.xml @@ -11,6 +11,11 @@ android:icon="@drawable/ic_baseline_report_24" android:title="@string/report" app:showAsAction="never" /> +