Notification improvements #1175

Merged
kekkyojin merged 3 commits from notification-improvements into master 2021-03-29 17:39:28 +02:00
Showing only changes of commit 686eb7fd33 - Show all commits

View file

@ -16,8 +16,10 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map;
import io.lbry.browser.MainActivity; import io.lbry.browser.MainActivity;
import io.lbry.browser.data.DatabaseHelper; import io.lbry.browser.data.DatabaseHelper;
@ -47,7 +49,9 @@ public class NotificationListTask extends AsyncTask<Void, Void, List<LbryNotific
List<LbryNotification> notifications = new ArrayList<>(); List<LbryNotification> notifications = new ArrayList<>();
SQLiteDatabase db = null; SQLiteDatabase db = null;
try { try {
JSONArray array = (JSONArray) Lbryio.parseResponse(Lbryio.call("notification", "list", context)); Map<String, String> parameters = new HashMap<>(1);
parameters.put("is_app_readable", "true");
JSONArray array = (JSONArray) Lbryio.parseResponse(Lbryio.call("notification", "list", parameters, context));
if (array != null) { if (array != null) {
for (int i = 0; i < array.length(); i++) { for (int i = 0; i < array.length(); i++) {
JSONObject item = array.getJSONObject(i); JSONObject item = array.getJSONObject(i);