diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-07-29 19:52:37 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-07-29 19:52:37 +0200 |
commit | 94933e21cd08c53a23e5ec6c12bc1dc383b1f3ce (patch) | |
tree | 4fa096547d0917f603252c9a279e4208ba4ef711 /src/main/java/eu/siacs/conversations/ui/BlocklistActivity.java | |
parent | 50889004f3c679387d95ba9c49a53a8f882ba33c (diff) |
changed package id inside manifest and project
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/BlocklistActivity.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/BlocklistActivity.java | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/BlocklistActivity.java b/src/main/java/eu/siacs/conversations/ui/BlocklistActivity.java deleted file mode 100644 index abec8ed76..000000000 --- a/src/main/java/eu/siacs/conversations/ui/BlocklistActivity.java +++ /dev/null @@ -1,74 +0,0 @@ -package eu.siacs.conversations.ui; - -import android.os.Bundle; -import android.text.Editable; -import android.view.View; -import android.widget.AdapterView; - -import java.util.Collections; - -import eu.siacs.conversations.entities.Account; -import eu.siacs.conversations.entities.Contact; -import eu.siacs.conversations.xmpp.OnUpdateBlocklist; -import eu.siacs.conversations.xmpp.jid.Jid; - -public class BlocklistActivity extends AbstractSearchableListItemActivity implements OnUpdateBlocklist { - - private Account account = null; - - @Override - public void onCreate(final Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - getListView().setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { - - @Override - public boolean onItemLongClick(final AdapterView<?> parent, - final View view, - final int position, - final long id) { - BlockContactDialog.show(parent.getContext(), xmppConnectionService,(Contact) getListItems().get(position)); - return true; - } - }); - } - - @Override - public void onBackendConnected() { - for (final Account account : xmppConnectionService.getAccounts()) { - if (account.getJid().toString().equals(getIntent().getStringExtra(EXTRA_ACCOUNT))) { - this.account = account; - break; - } - } - filterContacts(); - } - - @Override - protected void filterContacts(final String needle) { - getListItems().clear(); - if (account != null) { - for (final Jid jid : account.getBlocklist()) { - final Contact contact = account.getRoster().getContact(jid); - if (contact.match(this, needle) && contact.isBlocked()) { - getListItems().add(contact); - } - } - Collections.sort(getListItems()); - } - getListItemAdapter().notifyDataSetChanged(); - } - - protected void refreshUiReal() { - final Editable editable = getSearchEditText().getText(); - if (editable != null) { - filterContacts(editable.toString()); - } else { - filterContacts(); - } - } - - @Override - public void OnUpdateBlocklist(final OnUpdateBlocklist.Status status) { - refreshUi(); - } -} |