From 84e2938c903c26e7af4db0a513c981b6f9ec8fd5 Mon Sep 17 00:00:00 2001 From: nuclearfog Date: Wed, 8 Nov 2023 21:38:18 +0100 Subject: [PATCH] status reply fix, removed unused strings --- .../nuclearfog/twidda/backend/api/mastodon/Mastodon.java | 7 +++++-- app/src/main/res/values-de-rDE/strings.xml | 1 - app/src/main/res/values-es/strings.xml | 1 - app/src/main/res/values/strings.xml | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/nuclearfog/twidda/backend/api/mastodon/Mastodon.java b/app/src/main/java/org/nuclearfog/twidda/backend/api/mastodon/Mastodon.java index 55a9f4ba..fd14626d 100644 --- a/app/src/main/java/org/nuclearfog/twidda/backend/api/mastodon/Mastodon.java +++ b/app/src/main/java/org/nuclearfog/twidda/backend/api/mastodon/Mastodon.java @@ -643,10 +643,13 @@ public class Mastodon implements Connection { public Statuses getStatusReplies(long id, long minId, long maxId) throws MastodonException { Statuses statusThreads = getStatuses(ENDPOINT_STATUS + id + "/context", new ArrayList<>(0), minId, maxId); Statuses result = new Statuses(); + // todo add option to toggle viewing whole thread for (Status status : statusThreads) { - // Mastodon doesn't support min/max ID. - if (status.getRepliedStatusId() == id && (minId == 0L || status.getId() > minId) && (maxId == 0L || status.getId() < maxId)) { + if (status != null && (minId == 0L || status.getId() > minId) && (maxId == 0L || status.getId() < maxId)) { result.add(status); + if (result.size() == settings.getListSize()) { + break; + } } } return result; diff --git a/app/src/main/res/values-de-rDE/strings.xml b/app/src/main/res/values-de-rDE/strings.xml index 332685b9..5d4bd7a7 100644 --- a/app/src/main/res/values-de-rDE/strings.xml +++ b/app/src/main/res/values-de-rDE/strings.xml @@ -170,7 +170,6 @@ Status ist nicht für Antworten freigegeben! Fehler, API Schlüssel ist fehlerhaft! Account Informationen konnten nicht aktualisiert werden! Bitte Eingaben überprüfen. - Post konnte nicht übersetzt werden Kartenfarbe Symbolfarbe Consumer Key diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 632ef53b..1633bff1 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -98,7 +98,6 @@ ¡La API no soporta esta operación! ¡Ocurrió un error al agregar los medios! ¡Error al preparar los archivos de medios para su carga! - No se pudo traducir el estado ¡El texto está vacío! diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ec6917b6..05da3678 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -126,7 +126,6 @@ API error Error occurred while adding media! Error while preparing media files for upload! - Could not translate status Filter description must not be empty It must be at least one filter enabled Empty text!