diff options
Diffstat (limited to 'src/main')
7 files changed, 7 insertions, 14 deletions
diff --git a/src/main/java/de/pixart/messenger/Config.java b/src/main/java/de/pixart/messenger/Config.java index 13c86e6a1..d79f8ca64 100644 --- a/src/main/java/de/pixart/messenger/Config.java +++ b/src/main/java/de/pixart/messenger/Config.java @@ -60,8 +60,6 @@ public final class Config { public static final boolean FORCE_ORBOT = false; // always use TOR - public static final long CONTACT_SYNC_RETRY_INTERVAL = 1000L * 60 * 5; - public static final boolean HIDE_MESSAGE_TEXT_IN_NOTIFICATION = false; public static final boolean SHOW_CONNECTED_ACCOUNTS = false; //show number of connected accounts in foreground notification diff --git a/src/main/java/de/pixart/messenger/entities/Contact.java b/src/main/java/de/pixart/messenger/entities/Contact.java index 17a6b1099..1df6e120a 100644 --- a/src/main/java/de/pixart/messenger/entities/Contact.java +++ b/src/main/java/de/pixart/messenger/entities/Contact.java @@ -166,9 +166,6 @@ public class Contact implements ListItem, Blockable { if (isBlocked()) { tags.add(new Tag(context.getString(R.string.blocked), 0xff2e2f3b, 0)); } - if (showInPhoneBook()) { - tags.add(new Tag(context.getString(R.string.phone_book), 0xFF1E88E5, 0)); - } return tags; } @@ -387,8 +384,8 @@ public class Contact implements ListItem, Blockable { || (this.getOption(Contact.Options.DIRTY_PUSH)); } - public boolean showInPhoneBook() { - return systemAccount != null; + public boolean showInContactList() { + return showInRoster() || getOption(Options.SYNCED_VIA_OTHER); } public void parseSubscriptionFromElement(Element item) { diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index db6006ca3..4dcd79e9d 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -1147,9 +1147,8 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl final Contact contact = getContact(); return mode == MODE_SINGLE && !contact.isOwnServer() - && !contact.showInRoster() + && !contact.showInContactList() && !contact.isSelf() - && !contact.showInPhoneBook() && sentMessagesCount() == 0; } diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java index 14d235553..730e67170 100644 --- a/src/main/java/de/pixart/messenger/entities/Message.java +++ b/src/main/java/de/pixart/messenger/entities/Message.java @@ -673,7 +673,7 @@ public class Message extends AbstractEntity { public boolean trusted() { Contact contact = this.getContact(); - return status > STATUS_RECEIVED || (contact != null && (contact.showInRoster() || contact.isSelf())); + return status > STATUS_RECEIVED || (contact != null && (contact.showInContactList() || contact.isSelf())); } public boolean fixCounterpart() { diff --git a/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java b/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java index a760a563b..ac1866fec 100644 --- a/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java @@ -263,7 +263,7 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity im for (final Account account : xmppConnectionService.getAccounts()) { if (account.getStatus() != Account.State.DISABLED) { for (final Contact contact : account.getRoster().getContacts()) { - if (contact.showInRoster() && + if (contact.showInContactList() && !filterContacts.contains(contact.getJid().asBareJid().toString()) && contact.match(this, needle)) { getListItems().add(contact); diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java index 171db1bda..462fb4429 100644 --- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java @@ -869,12 +869,11 @@ public class StartConversationActivity extends XmppActivity implements XmppConne protected void filterContacts(String needle) { this.contacts.clear(); final List<Account> accounts = xmppConnectionService.getAccounts(); - final boolean singleAccountActive = isSingleAccountActive(accounts); for (Account account : accounts) { if (account.getStatus() != Account.State.DISABLED) { for (Contact contact : account.getRoster().getContacts()) { Presence.Status s = contact.getShownStatus(); - if ((contact.showInRoster() || (singleAccountActive && contact.showInPhoneBook())) && contact.match(this, needle) + if (contact.showInContactList() && contact.match(this, needle) && (!this.mHideOfflineContacts || (needle != null && !needle.trim().isEmpty()) || s.compareTo(Presence.Status.OFFLINE) < 0)) { diff --git a/src/main/res/values-fil/strings.xml b/src/main/res/values-fil/strings.xml index 449701f22..691e6fcf2 100644 --- a/src/main/res/values-fil/strings.xml +++ b/src/main/res/values-fil/strings.xml @@ -168,7 +168,7 @@ <string name="passwords_do_not_match">Ang password ay hindi magkatugma</string> <string name="invalid_jid">Hindi ito balido na Jabber-ID</string> <string name="error_out_of_memory">Wala ng memorya. Ang imahe ay napakalaki</string> - <string name="add_phone_book_text">Gusto mo bang magdagdag sa iyong address book?</string> + <string name="add_phone_book_text">Gusto mo bang magdagdag %s sa iyong address book?</string> <string name="server_info_show_more">Impormasyon sa server</string> <string name="server_info_mam">XEP-0313: MAM</string> <string name="server_info_carbon_messages">XEP-0280: Mensagheng karbon</string> |