diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-12-04 19:48:05 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-12-04 20:03:05 +0100 |
commit | 82de880a1f75a097228210caf7a5923a3662ae11 (patch) | |
tree | a7f9dc9c57140b52d35b4cdb631b38f14871dd19 /src | |
parent | e8ed23f58c7eb97a1b7b76d75249a819d6c1789c (diff) |
some code reorder for actionbar titles
Diffstat (limited to '')
3 files changed, 2 insertions, 19 deletions
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<User> users = getUsersRelevantForNameAndAvatar(); - if (users.size() >= 1) { - return users.size() + 1; // add 1 for yourself - } else { - return 1; - } - } - public String createNameFromParticipants() { List<User> 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; } |