diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/adapter')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/KnownHostsAdapter.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/KnownHostsAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/KnownHostsAdapter.java index 59255accd..9f4a52d95 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/KnownHostsAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/KnownHostsAdapter.java @@ -68,6 +68,7 @@ public class KnownHostsAdapter extends ArrayAdapter<String> { } else { domains = new ArrayList<>(mKnownHosts); } + HashSet<String> hashSet = new HashSet<>(); // get servers from https://conversations.im/compliance/ @@ -197,6 +198,16 @@ public class KnownHostsAdapter extends ArrayAdapter<String> { }).start(); } + public KnownHostsAdapter(Context context, int viewResourceId) { + super(context, viewResourceId, new ArrayList<>()); + domains = new ArrayList<>(); + } + + public void refresh(Collection<String> knownHosts) { + domains = new ArrayList<>(knownHosts); + notifyDataSetChanged(); + } + @Override @NonNull public Filter getFilter() { |