Correct show own accounts preference call

This commit is contained in:
Arne 2024-09-16 17:42:22 +02:00
parent 82f1967b74
commit 75100790f6
2 changed files with 2 additions and 2 deletions

View file

@ -71,7 +71,7 @@ public class ConversationAdapter
viewHolder.binding.conversationName.setText(name); viewHolder.binding.conversationName.setText(name);
} }
if (activity.xmppConnectionService != null && activity.xmppConnectionService.getPreferences().getBoolean("show_own_accounts", false)) { if (activity.xmppConnectionService != null && activity.xmppConnectionService.getBooleanPreference("show_own_accounts", R.bool.show_own_accounts)) {
viewHolder.binding.account.setVisibility(View.VISIBLE); viewHolder.binding.account.setVisibility(View.VISIBLE);
viewHolder.binding.account.setText(conversation.getAccount().getJid().asBareJid()); viewHolder.binding.account.setText(conversation.getAccount().getJid().asBareJid());
} else { } else {

View file

@ -145,7 +145,7 @@ public class ListItemAdapter extends ArrayAdapter<ListItem> {
} else { } else {
viewHolder.jid.setVisibility(View.GONE); viewHolder.jid.setVisibility(View.GONE);
} }
if (activity.xmppConnectionService != null && activity.xmppConnectionService.getPreferences().getBoolean("show_own_accounts", false)) { if (activity.xmppConnectionService != null && activity.xmppConnectionService.getBooleanPreference("show_own_accounts", R.bool.show_own_accounts)) {
viewHolder.account.setVisibility(View.VISIBLE); viewHolder.account.setVisibility(View.VISIBLE);
viewHolder.account.setText(item.getAccount().getJid().asBareJid()); viewHolder.account.setText(item.getAccount().getJid().asBareJid());
} else { } else {