diff options
author | Thomas <tschneider.ac@gmail.com> | 2023-03-13 18:09:48 +0100 |
---|---|---|
committer | Thomas <tschneider.ac@gmail.com> | 2023-03-13 18:09:48 +0100 |
commit | 3746673f9df3d3d3cb6b0fad6f076c3d8051c557 (patch) | |
tree | 6c43efbe063d499f6c7a355babd21b1535d60b89 | |
parent | 038300745103a4fa96884294da3a6197b0a384a7 (diff) |
Release 3.20.23.20.2
5 files changed, 31 insertions, 11 deletions
diff --git a/app/build.gradle b/app/build.gradle index 44db7df2f..d3456ce1f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,8 +13,8 @@ android { defaultConfig { minSdk 21 targetSdk 33 - versionCode 484 - versionName "3.20.1" + versionCode 485 + versionName "3.20.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } flavorDimensions "default" diff --git a/app/src/main/assets/release_notes/notes.json b/app/src/main/assets/release_notes/notes.json index 33e4588b9..675dbd45a 100644 --- a/app/src/main/assets/release_notes/notes.json +++ b/app/src/main/assets/release_notes/notes.json @@ -1,5 +1,10 @@ [ { + "version": "3.20.2", + "code": "485", + "note": "Added:\n- Visual indicator when fetching missing messages\n- Open media description when it is missing from the warning dialog\n\nChanged:\n- Maths formula aligned to the left\n- Faster access to delete all notifications\n\nFixed:\n- Fix an issue with Nitter and some URLs\n- Fix refresh issue with notifications\n- Fix an issue when entering a Peertube instance\n- Fix jumps with Akkoma/Pleroma when media preview size is not set\n- Some crashes" + }, + { "version": "3.20.1", "code": "484", "note": "Added:\n- Add a button to fetch remote media when it fails\n- Add a settings to automatically fetch remote media when it fails (default: disabled)\n- Display on profiles & list of accounts if users have requested to follow you\n- Warn before boosting a message having no media descriptions (default: enabled)\n\nChanged:\n- Warn when there are missing descriptions enabled by default\n\nFixed:\n- Some settings not properly restored (multiple choices)\n- Cancel a follow request\n- Media with a lot of height in landscape\n- Some crashes" diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonConversation.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonConversation.java index bdb7426f4..99a22dca3 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonConversation.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonConversation.java @@ -17,6 +17,7 @@ package app.fedilab.android.mastodon.ui.fragment.timeline; import android.content.SharedPreferences; import android.os.Bundle; +import android.os.Handler; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -106,6 +107,9 @@ public class FragmentMastodonConversation extends Fragment implements Conversati route(null, false); } } + if (conversationList != null && conversationList.size() > 0) { + route(FragmentMastodonTimeline.DIRECTION.FETCH_NEW, true); + } } /** @@ -209,11 +213,11 @@ public class FragmentMastodonConversation extends Fragment implements Conversati } else if (direction == FragmentMastodonTimeline.DIRECTION.TOP) { timelinesVM.getConversations(conversationList, timelineParams) .observe(getViewLifecycleOwner(), conversationsTop -> dealWithPagination(conversationsTop, FragmentMastodonTimeline.DIRECTION.TOP, fetchingMissing, conversationToUpdate)); - } else if (direction == FragmentMastodonTimeline.DIRECTION.REFRESH) { + } else if (direction == FragmentMastodonTimeline.DIRECTION.REFRESH || direction == FragmentMastodonTimeline.DIRECTION.SCROLL_TOP || direction == FragmentMastodonTimeline.DIRECTION.FETCH_NEW) { timelinesVM.getConversations(conversationList, timelineParams) .observe(getViewLifecycleOwner(), conversationsRefresh -> { if (conversationAdapter != null) { - dealWithPagination(conversationsRefresh, FragmentMastodonTimeline.DIRECTION.REFRESH, true, conversationToUpdate); + dealWithPagination(conversationsRefresh, direction, true, conversationToUpdate); } else { initializeConversationCommonView(conversationsRefresh); } @@ -416,7 +420,7 @@ public class FragmentMastodonConversation extends Fragment implements Conversati flagLoading = true; } if (direction == FragmentMastodonTimeline.DIRECTION.SCROLL_TOP) { - binding.recyclerView.scrollToPosition(0); + new Handler().postDelayed(() -> binding.recyclerView.scrollToPosition(0), 200); } } @@ -481,7 +485,11 @@ public class FragmentMastodonConversation extends Fragment implements Conversati public void scrollToTop() { - binding.recyclerView.scrollToPosition(0); + if (binding != null) { + binding.swipeContainer.setRefreshing(true); + flagLoading = false; + route(FragmentMastodonTimeline.DIRECTION.SCROLL_TOP, true); + } } @Override diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonNotification.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonNotification.java index b0310e28d..7455ecab4 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonNotification.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonNotification.java @@ -20,6 +20,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.os.Bundle; +import android.os.Handler; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -110,6 +111,7 @@ public class FragmentMastodonNotification extends Fragment implements Notificati private LinearLayoutManager mLayoutManager; private NotificationTypeEnum notificationType; private boolean aggregateNotification; + private final BroadcastReceiver receive_refresh = new BroadcastReceiver() { @Override @@ -475,11 +477,11 @@ public class FragmentMastodonNotification extends Fragment implements Notificati } else if (direction == FragmentMastodonTimeline.DIRECTION.TOP) { notificationsVM.getNotifications(notificationList, timelineParams) .observe(getViewLifecycleOwner(), notificationsTop -> dealWithPagination(notificationsTop, FragmentMastodonTimeline.DIRECTION.TOP, fetchingMissing, notificationToUpdate)); - } else if (direction == FragmentMastodonTimeline.DIRECTION.REFRESH) { + } else if (direction == FragmentMastodonTimeline.DIRECTION.REFRESH || direction == FragmentMastodonTimeline.DIRECTION.SCROLL_TOP || direction == FragmentMastodonTimeline.DIRECTION.FETCH_NEW) { notificationsVM.getNotifications(notificationList, timelineParams) .observe(getViewLifecycleOwner(), notificationsRefresh -> { if (notificationAdapter != null) { - dealWithPagination(notificationsRefresh, FragmentMastodonTimeline.DIRECTION.REFRESH, true, notificationToUpdate); + dealWithPagination(notificationsRefresh, direction, true, notificationToUpdate); } else { initializeNotificationView(notificationsRefresh); } @@ -532,7 +534,11 @@ public class FragmentMastodonNotification extends Fragment implements Notificati } public void scrollToTop() { - binding.recyclerView.scrollToPosition(0); + if (binding != null) { + binding.swipeContainer.setRefreshing(true); + flagLoading = false; + route(FragmentMastodonTimeline.DIRECTION.SCROLL_TOP, true); + } } @@ -618,7 +624,7 @@ public class FragmentMastodonNotification extends Fragment implements Notificati flagLoading = true; } if (direction == FragmentMastodonTimeline.DIRECTION.SCROLL_TOP) { - binding.recyclerView.scrollToPosition(0); + new Handler().postDelayed(() -> binding.recyclerView.scrollToPosition(0), 200); } } diff --git a/src/fdroid/fastlane/metadata/android/en/changelogs/485.txt b/src/fdroid/fastlane/metadata/android/en/changelogs/485.txt index 9f7d61710..e9b0e52eb 100644 --- a/src/fdroid/fastlane/metadata/android/en/changelogs/485.txt +++ b/src/fdroid/fastlane/metadata/android/en/changelogs/485.txt @@ -1,6 +1,6 @@ Added: - Visual indicator when fetching missing messages -- Open media description when it is missing in the warning dialog +- Open media description when it is missing from the warning dialog Changed: - Maths formula aligned to the left @@ -8,6 +8,7 @@ Changed: Fixed: - Fix an issue with Nitter and some URLs +- Fix refresh issue with notifications - Fix an issue when entering a Peertube instance - Fix jumps with Akkoma/Pleroma when media preview size is not set - Some crashes
\ No newline at end of file |