fix OOB creating incorrect error message, closes #26

This commit is contained in:
akaessens 2020-10-04 11:36:54 +02:00
parent f067076752
commit 404b8e1086
3 changed files with 6 additions and 1 deletions

View File

@ -89,7 +89,6 @@ public class FbPageScraper extends AsyncTask<Void, Void, Void> {
this.url = "https://mbasic.facebook.com" + next_url;
} catch (NullPointerException e) {
url = null;
event_links = event_links.subList(0, max);
}
@ -107,6 +106,10 @@ public class FbPageScraper extends AsyncTask<Void, Void, Void> {
}
} while (url != null);
if (this.event_links.size() == 0) {
this.error = R.string.error_no_events;
}
return null;
}

View File

@ -22,4 +22,5 @@
<string name="undo">Rückgängig</string>
<string name="preferences_page_event_max_summary">Maximale Anzahl Events, die von einer einzelnen Seite geladen werden sollen.</string>
<string name="preferences_page_event_max">Veranstaltungslimit für Seiten</string>
<string name="error_no_events">Fehler: keine bevorstehenden Veranstaltungen</string>
</resources>

View File

@ -37,6 +37,7 @@
<string name="event_placeholder" translatable="false">Placeholder</string>
<string name="done">Done</string>
<string name="undo">Undo</string>
<string name="error_no_events">Error: No upcoming events</string>
</resources>