Release 3.20.2

This commit is contained in:
Thomas 2023-03-13 18:09:48 +01:00
parent 0383007451
commit 3746673f9d
5 changed files with 31 additions and 11 deletions

View file

@ -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"

View file

@ -1,4 +1,9 @@
[
{
"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",

View file

@ -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

View file

@ -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);
}
}

View file

@ -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