Fix issue #63 - Reach owner from channels
This commit is contained in:
parent
0923a07e42
commit
55bbafdbb5
|
@ -105,6 +105,7 @@ public class ShowAccountActivity extends AppCompatActivity {
|
||||||
if (!Helper.isLoggedIn(ShowAccountActivity.this)) {
|
if (!Helper.isLoggedIn(ShowAccountActivity.this)) {
|
||||||
menu.findItem(R.id.action_mute).setVisible(false);
|
menu.findItem(R.id.action_mute).setVisible(false);
|
||||||
}
|
}
|
||||||
|
menu.findItem(R.id.action_display_account).setVisible(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,6 +170,13 @@ public class ShowChannelActivity extends AppCompatActivity {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Toasty.error(ShowChannelActivity.this, getString(R.string.toast_error), Toasty.LENGTH_LONG).show();
|
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);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,11 @@
|
||||||
android:icon="@drawable/ic_baseline_report_24"
|
android:icon="@drawable/ic_baseline_report_24"
|
||||||
android:title="@string/report"
|
android:title="@string/report"
|
||||||
app:showAsAction="never" />
|
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
|
<item
|
||||||
android:id="@+id/action_share"
|
android:id="@+id/action_share"
|
||||||
android:icon="@drawable/ic_baseline_share_24"
|
android:icon="@drawable/ic_baseline_share_24"
|
||||||
|
|
Loading…
Reference in New Issue