From 03222e742c51525aa52e756a97525f29bf8c8a97 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 22 Oct 2022 16:39:43 +0200 Subject: [PATCH] Theme improvements --- .../ui/fragment/timeline/FragmentMastodonTimeline.java | 6 ++---- app/src/main/res/layout/activity_drafts.xml | 1 + app/src/main/res/layout/activity_edit_profile.xml | 2 ++ app/src/main/res/layout/activity_filters.xml | 1 + app/src/main/res/layout/activity_instance.xml | 1 + app/src/main/res/layout/activity_instance_profile.xml | 1 + app/src/main/res/layout/activity_instance_social.xml | 1 + app/src/main/res/layout/activity_status_info.xml | 1 + app/src/main/res/layout/activity_webview.xml | 1 + app/src/main/res/layout/activity_webview_connect.xml | 1 + app/src/main/res/layout/drawer_status_compose.xml | 1 + app/src/main/res/layout/fragment_pagination.xml | 2 ++ app/src/main/res/layout/fragment_scheduled.xml | 1 + app/src/main/res/layout/fragment_slide_media.xml | 1 + app/src/main/res/layout/layout_poll_item.xml | 1 + app/src/main/res/layout/popup_contact.xml | 1 + app/src/main/res/layout/popup_manage_accounts_list.xml | 1 + 17 files changed, 20 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java index 3f6b5bf94..710e0c8e3 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonTimeline.java @@ -257,13 +257,11 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. if (!isViewInitialized) { if (slug != null && slugOfFirstFragment != null) { isViewInitialized = slug.compareTo(slugOfFirstFragment) == 0; - } else { + } else if (timelineType != null) { isViewInitialized = timelineType.compareTo(Timeline.TimeLineEnum.HOME) == 0; } } SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity()); - //Retrieve the max_id to keep position - LocalBroadcastManager.getInstance(requireActivity()).registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION)); binding = FragmentPaginationBinding.inflate(inflater, container, false); @@ -548,7 +546,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. * @param direction - DIRECTION null if first call, then is set to TOP or BOTTOM depending of scroll */ private void routeCommon(DIRECTION direction, boolean fetchingMissing, Status status) { - if (direction == null && !isViewInitialized) { + if (direction == null && !isViewInitialized && slug != null && slugOfFirstFragment != null) { isViewInitialized = slug.compareTo(slugOfFirstFragment) == 0; } if (binding == null || getActivity() == null || !isAdded()) { diff --git a/app/src/main/res/layout/activity_drafts.xml b/app/src/main/res/layout/activity_drafts.xml index b4ba05512..85563ae96 100644 --- a/app/src/main/res/layout/activity_drafts.xml +++ b/app/src/main/res/layout/activity_drafts.xml @@ -100,6 +100,7 @@ android:visibility="gone"> diff --git a/app/src/main/res/layout/activity_edit_profile.xml b/app/src/main/res/layout/activity_edit_profile.xml index 01454085c..0bae2305c 100644 --- a/app/src/main/res/layout/activity_edit_profile.xml +++ b/app/src/main/res/layout/activity_edit_profile.xml @@ -54,6 +54,7 @@ app:strokeWidth="1dp" /> diff --git a/app/src/main/res/layout/activity_instance.xml b/app/src/main/res/layout/activity_instance.xml index 670d535f4..d33a01dcc 100644 --- a/app/src/main/res/layout/activity_instance.xml +++ b/app/src/main/res/layout/activity_instance.xml @@ -126,6 +126,7 @@ tools:visibility="visible"> diff --git a/app/src/main/res/layout/activity_instance_profile.xml b/app/src/main/res/layout/activity_instance_profile.xml index 445dae09a..e7c6621e1 100644 --- a/app/src/main/res/layout/activity_instance_profile.xml +++ b/app/src/main/res/layout/activity_instance_profile.xml @@ -187,6 +187,7 @@ diff --git a/app/src/main/res/layout/activity_status_info.xml b/app/src/main/res/layout/activity_status_info.xml index 63382e98f..f8510d2f9 100644 --- a/app/src/main/res/layout/activity_status_info.xml +++ b/app/src/main/res/layout/activity_status_info.xml @@ -89,6 +89,7 @@ android:gravity="bottom|center_horizontal"> diff --git a/app/src/main/res/layout/activity_webview.xml b/app/src/main/res/layout/activity_webview.xml index 77d0d061c..f0af77904 100644 --- a/app/src/main/res/layout/activity_webview.xml +++ b/app/src/main/res/layout/activity_webview.xml @@ -64,6 +64,7 @@ app:layout_behavior="@string/appbar_scrolling_view_behavior"> @@ -85,6 +86,7 @@ android:visibility="gone"> diff --git a/app/src/main/res/layout/fragment_scheduled.xml b/app/src/main/res/layout/fragment_scheduled.xml index 0a53c7dc9..4a6a804b4 100644 --- a/app/src/main/res/layout/fragment_scheduled.xml +++ b/app/src/main/res/layout/fragment_scheduled.xml @@ -59,6 +59,7 @@ android:visibility="gone"> diff --git a/app/src/main/res/layout/fragment_slide_media.xml b/app/src/main/res/layout/fragment_slide_media.xml index 19a05ac36..0fd28e167 100644 --- a/app/src/main/res/layout/fragment_slide_media.xml +++ b/app/src/main/res/layout/fragment_slide_media.xml @@ -26,6 +26,7 @@ android:gravity="center"> diff --git a/app/src/main/res/layout/popup_manage_accounts_list.xml b/app/src/main/res/layout/popup_manage_accounts_list.xml index 9610980aa..0b25a38e6 100644 --- a/app/src/main/res/layout/popup_manage_accounts_list.xml +++ b/app/src/main/res/layout/popup_manage_accounts_list.xml @@ -32,6 +32,7 @@ android:gravity="center">