From b94c08d029690d468b07838ecbc6c365f8893f12 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 26 Jan 2023 15:39:23 +0100 Subject: [PATCH] some code changes --- .../activities/PeertubeMainActivity.java | 7 +++-- .../peertube/drawer/AccountsListAdapter.java | 7 +++-- .../layout/drawer_account_peertube.xml | 25 +++++++-------- .../layout/drawer_channel_peertube.xml | 18 +++++------ .../layout/drawer_comment_peertube.xml | 31 +++++++++---------- .../drawer_horizontal_account_peertube.xml | 10 +++--- .../layout/drawer_instance_peertube.xml | 22 ++++++------- 7 files changed, 61 insertions(+), 59 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/peertube/activities/PeertubeMainActivity.java b/app/src/main/java/app/fedilab/android/peertube/activities/PeertubeMainActivity.java index 0d55ea7f..b9631539 100644 --- a/app/src/main/java/app/fedilab/android/peertube/activities/PeertubeMainActivity.java +++ b/app/src/main/java/app/fedilab/android/peertube/activities/PeertubeMainActivity.java @@ -114,7 +114,10 @@ public class PeertubeMainActivity extends PeertubeBaseMainActivity { public static InstanceData.InstanceConfig instanceConfig; public static TypeOfConnection typeOfConnection = TypeOfConnection.NORMAL; public static int badgeCount; - private DisplayVideosFragment recentFragment, locaFragment, trendingFragment, subscriptionFragment, mostLikedFragment; + private DisplayVideosFragment recentFragment; + private DisplayVideosFragment locaFragment; + private DisplayVideosFragment trendingFragment; + private DisplayVideosFragment subscriptionFragment; private DisplayOverviewFragment overviewFragment; private ActivityMainPeertubeBinding binding; @@ -259,7 +262,7 @@ public class PeertubeMainActivity extends PeertubeBaseMainActivity { bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.SUBSCRIBTIONS); subscriptionFragment.setArguments(bundle); - mostLikedFragment = new DisplayVideosFragment(); + DisplayVideosFragment mostLikedFragment = new DisplayVideosFragment(); bundle = new Bundle(); bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.MOST_LIKED); mostLikedFragment.setArguments(bundle); diff --git a/app/src/main/java/app/fedilab/android/peertube/drawer/AccountsListAdapter.java b/app/src/main/java/app/fedilab/android/peertube/drawer/AccountsListAdapter.java index a114afe2..36d93e88 100644 --- a/app/src/main/java/app/fedilab/android/peertube/drawer/AccountsListAdapter.java +++ b/app/src/main/java/app/fedilab/android/peertube/drawer/AccountsListAdapter.java @@ -18,6 +18,7 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; +import android.view.View; import android.view.ViewGroup; import android.widget.Toast; @@ -72,7 +73,7 @@ public class AccountsListAdapter extends RecyclerView.Adapter manageVIewPostActions(RetrofitPeertubeAPI.ActionType.UNMUTE, apiResponse, account.getAcct())); }); } else { - holder.binding.accountAction.hide(); + holder.binding.accountAction.setVisibility(View.GONE); } holder.binding.accountDn.setText(account.getDisplayName()); @@ -84,8 +85,8 @@ public class AccountsListAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/res/layouts/peertube/layout/drawer_account_peertube.xml b/app/src/main/res/layouts/peertube/layout/drawer_account_peertube.xml index cb47d807..1ad54bb2 100644 --- a/app/src/main/res/layouts/peertube/layout/drawer_account_peertube.xml +++ b/app/src/main/res/layouts/peertube/layout/drawer_account_peertube.xml @@ -14,8 +14,8 @@ You should have received a copy of the GNU General Public License along with Fedilab; if not, see . --> - - - - - - + - + tools:visibility="visible" /> - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layouts/peertube/layout/drawer_channel_peertube.xml b/app/src/main/res/layouts/peertube/layout/drawer_channel_peertube.xml index 8be2e3d6..6e1282b0 100644 --- a/app/src/main/res/layouts/peertube/layout/drawer_channel_peertube.xml +++ b/app/src/main/res/layouts/peertube/layout/drawer_channel_peertube.xml @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with Fedilab; if not, see . --> - - - - - - + - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layouts/peertube/layout/drawer_comment_peertube.xml b/app/src/main/res/layouts/peertube/layout/drawer_comment_peertube.xml index 41164871..daff3e49 100644 --- a/app/src/main/res/layouts/peertube/layout/drawer_comment_peertube.xml +++ b/app/src/main/res/layouts/peertube/layout/drawer_comment_peertube.xml @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with Fedilab; if not, see . --> - - - - - - - - - - -