From 82de880a1f75a097228210caf7a5923a3662ae11 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Tue, 4 Dec 2018 19:48:05 +0100 Subject: some code reorder for actionbar titles --- src/main/java/de/pixart/messenger/entities/Conversation.java | 8 -------- src/main/java/de/pixart/messenger/entities/MucOptions.java | 9 --------- src/main/java/de/pixart/messenger/ui/ConversationsActivity.java | 4 ++-- 3 files changed, 2 insertions(+), 19 deletions(-) (limited to 'src/main/java/de/pixart') diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index 5b7e490dc..809cee166 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -582,14 +582,6 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl } } - public int getNumberOfParticipants() { - if (getMode() == MODE_MULTI) { - return getMucOptions().NumberOfUsers(); - } else { - return 0; - } - } - public String getAccountUuid() { return this.accountUuid; } diff --git a/src/main/java/de/pixart/messenger/entities/MucOptions.java b/src/main/java/de/pixart/messenger/entities/MucOptions.java index bfad9e6a7..fcdc358fb 100644 --- a/src/main/java/de/pixart/messenger/entities/MucOptions.java +++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java @@ -473,15 +473,6 @@ public class MucOptions { return users; } - public int NumberOfUsers() { - List users = getUsersRelevantForNameAndAvatar(); - if (users.size() >= 1) { - return users.size() + 1; // add 1 for yourself - } else { - return 1; - } - } - public String createNameFromParticipants() { List users = getUsersRelevantForNameAndAvatar(); if (users.size() >= 2) { diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java index 847efc831..f1eaf4b61 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java @@ -177,7 +177,6 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio if (binding.secondaryFragment != null) { notifyFragmentOfBackendConnected(R.id.main_fragment); } - invalidateActionBarTitle(); return; } } @@ -216,13 +215,13 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio handleActivityResult(activityResult); } - invalidateActionBarTitle(); if (binding.secondaryFragment != null && ConversationFragment.getConversation(this) == null) { Conversation conversation = ConversationsOverviewFragment.getSuggestion(this); if (conversation != null) { openConversation(conversation, null); } } + invalidateActionBarTitle(); showDialogsIfMainIsOverview(); } @@ -640,6 +639,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio @Override public void onResume() { super.onResume(); + invalidateActionBarTitle(); this.mActivityPaused = false; } -- cgit v1.2.3