diff --git a/app/src/main/java/app/fedilab/fedilabtube/ShowAccountActivity.java b/app/src/main/java/app/fedilab/fedilabtube/ShowAccountActivity.java index 0eaccfd..c01bd6a 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/ShowAccountActivity.java +++ b/app/src/main/java/app/fedilab/fedilabtube/ShowAccountActivity.java @@ -83,7 +83,6 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi private ViewPager mPager; private TabLayout tabLayout; private TextView account_note; - private String userId; private Relationship relationship; private int maxScrollSize; private boolean avatarShown = true; @@ -99,7 +98,6 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE); setContentView(R.layout.activity_show_account); setTitle(""); Bundle b = getIntent().getExtras(); @@ -117,8 +115,6 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi accountId = account.getId(); } ischannel = b.getBoolean("ischannel", false); - userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null); - } else { Toasty.error(ShowAccountActivity.this, getString(R.string.toast_error_loading_account), Toast.LENGTH_LONG).show(); } @@ -330,11 +326,6 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi } }); - - - TextView account_date = findViewById(R.id.account_date); - account_date.setText(Helper.shortDateToString(account.getCreated_at())); - account_date.setVisibility(View.VISIBLE); } @Override @@ -362,11 +353,6 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi this.relationship = relationships.get(0); manageButtonVisibility(); - //The authenticated account is followed by the account - if (relationship != null && relationship.isFollowed_by() && !accountId.equals(userId)) { - TextView account_followed_by = findViewById(R.id.account_followed_by); - account_followed_by.setVisibility(View.VISIBLE); - } invalidateOptionsMenu(); } diff --git a/app/src/main/java/app/fedilab/fedilabtube/drawer/PeertubeAdapter.java b/app/src/main/java/app/fedilab/fedilabtube/drawer/PeertubeAdapter.java index c2e7298..543429d 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/drawer/PeertubeAdapter.java +++ b/app/src/main/java/app/fedilab/fedilabtube/drawer/PeertubeAdapter.java @@ -76,7 +76,21 @@ public class PeertubeAdapter extends RecyclerView.Adapter { Intent intent = new Intent(context, ShowAccountActivity.class); Bundle b = new Bundle(); - b.putParcelable("account", peertube.getAccount()); + if( peertube.getChannel() == null) { + b.putParcelable("account", peertube.getAccount()); + }else{ + b.putParcelable("account", peertube.getChannel()); + b.putBoolean("ischannel", true); + } intent.putExtras(b); context.startActivity(intent); }); diff --git a/app/src/main/res/layout/activity_show_account.xml b/app/src/main/res/layout/activity_show_account.xml index 1f25210..60a0d40 100644 --- a/app/src/main/res/layout/activity_show_account.xml +++ b/app/src/main/res/layout/activity_show_account.xml @@ -116,6 +116,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" + android:ellipsize="end" android:textColor="@android:color/white" android:textSize="14sp" /> @@ -173,46 +174,6 @@ android:textColor="@android:color/white" android:textIsSelectable="true" android:visibility="gone" /> - - - - - - - - - - - - diff --git a/app/src/main/res/layout/drawer_peertube.xml b/app/src/main/res/layout/drawer_peertube.xml index f6816a0..f6c62ff 100644 --- a/app/src/main/res/layout/drawer_peertube.xml +++ b/app/src/main/res/layout/drawer_peertube.xml @@ -84,6 +84,8 @@ android:id="@+id/peertube_account_name" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:singleLine="true" + android:ellipsize="end" android:layout_gravity="center_vertical" />