Fix issue #63 - Reach owner from channels

This commit is contained in:
Thomas 2020-11-11 10:42:40 +01:00
parent 0923a07e42
commit 55bbafdbb5
3 changed files with 13 additions and 0 deletions

View File

@ -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;
}

View File

@ -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);
}

View File

@ -11,6 +11,11 @@
android:icon="@drawable/ic_baseline_report_24"
android:title="@string/report"
app:showAsAction="never" />
<item
android:id="@+id/action_display_account"
android:icon="@drawable/ic_outline_account_circle_24"
android:title="@string/account"
app:showAsAction="never" />
<item
android:id="@+id/action_share"
android:icon="@drawable/ic_baseline_share_24"