This commit is contained in:
tom79 2020-04-08 19:35:43 +02:00
parent 050a492338
commit 35a5f63ae1
3 changed files with 7 additions and 3 deletions

View File

@ -2,4 +2,7 @@ Changed:
- One logout entry in the menu (it will remove the account from the app) - One logout entry in the menu (it will remove the account from the app)
- Improve memory management - Improve memory management
- Improve scroll - Improve scroll
- Clear push notifications when visiting notifications tab - Clear push notifications when visiting notifications tab
Fixed:
- Long press to store media download the preview image

View File

@ -1639,7 +1639,6 @@ public class API {
private List<Status> parseNitter(String xml) { private List<Status> parseNitter(String xml) {
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
String nitterHost = sharedpreferences.getString(Helper.SET_NITTER_HOST, Helper.DEFAULT_NITTER_HOST).toLowerCase(); String nitterHost = sharedpreferences.getString(Helper.SET_NITTER_HOST, Helper.DEFAULT_NITTER_HOST).toLowerCase();
List<Status> statuses = new ArrayList<>(); List<Status> statuses = new ArrayList<>();
try { try {
XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
@ -1652,7 +1651,6 @@ public class API {
Status status = null; Status status = null;
HashMap<String, String> mappedProfile = new HashMap<>(); HashMap<String, String> mappedProfile = new HashMap<>();
while (eventType != XmlPullParser.END_DOCUMENT) { while (eventType != XmlPullParser.END_DOCUMENT) {
if (eventType == XmlPullParser.START_TAG) { if (eventType == XmlPullParser.START_TAG) {
if (xpp.getName().compareTo("item") == 0) { if (xpp.getName().compareTo("item") == 0) {
status = new Status(); status = new Status();
@ -1703,6 +1701,7 @@ public class API {
} }
} }
account.setAvatar(mappedProfile.get(xpp.getText())); account.setAvatar(mappedProfile.get(xpp.getText()));
account.setAvatar_static(mappedProfile.get(xpp.getText()));
} }
} }
} else if (xpp.getName().compareTo("pubDate") == 0) { } else if (xpp.getName().compareTo("pubDate") == 0) {
@ -1764,6 +1763,7 @@ public class API {
if (xpp.getName().compareTo("item") == 0) { if (xpp.getName().compareTo("item") == 0) {
if (status != null) { if (status != null) {
status.setAccount(account); status.setAccount(account);
Status.fillSpan(context, status);
statuses.add(status); statuses.add(status);
} }
account = null; account = null;

View File

@ -561,6 +561,7 @@ public class DisplayStatusFragment extends Fragment implements OnPostActionInter
flag_loading = false; flag_loading = false;
firstLoad = false; firstLoad = false;
} else if (instanceType.equals("NITTER")) { } else if (instanceType.equals("NITTER")) {
max_id = apiResponse.getMax_id();
int previousPosition = this.statuses.size(); int previousPosition = this.statuses.size();
//max_id needs to work like an offset //max_id needs to work like an offset
this.statuses.addAll(apiResponse.getStatuses()); this.statuses.addAll(apiResponse.getStatuses());