aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-10-20 21:55:22 +0200
committerChristian Schneppe <christian@pix-art.de>2018-10-20 21:55:22 +0200
commitb2d98cbd131ca4b926a27886b3c911a992a17d3f (patch)
treec205aead6f457b04b192986a73621ce8ca60339f /src/main/java
parent68ffe98e510647a706c364648a5836f8a47ab10f (diff)
removed unused paramater 'newTask' from switchToConversation api
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/StartConversationActivity.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java34
3 files changed, 12 insertions, 30 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java b/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java
index 7e457bf5c..2d535a44c 100644
--- a/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java
@@ -53,7 +53,7 @@ public class ShareViaAccountActivity extends XmppActivity {
final Jid contact = Jid.of(getIntent().getStringExtra(EXTRA_CONTACT));
final Conversation conversation = xmppConnectionService.findOrCreateConversation(
account, contact, false, false);
- switchToConversation(conversation, body, false);
+ switchToConversation(conversation, body);
} catch (IllegalArgumentException e) {
// ignore error
}
@@ -83,7 +83,7 @@ public class ShareViaAccountActivity extends XmppActivity {
final Jid contact = Jid.of(getIntent().getStringExtra(EXTRA_CONTACT));
final Conversation conversation = xmppConnectionService.findOrCreateConversation(
account, contact, false, false);
- switchToConversation(conversation, body, false);
+ switchToConversation(conversation, body);
} catch (IllegalArgumentException e) {
// ignore error
}
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
index 10574fab4..7be62165b 100644
--- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
@@ -552,7 +552,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
protected void switchToConversation(Contact contact, String body) {
Conversation conversation = xmppConnectionService.findOrCreateConversation(contact.getAccount(), contact.getJid(), false, true);
- switchToConversation(conversation, body, false);
+ switchToConversation(conversation, body);
}
@Override
@@ -788,7 +788,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
if (invite.isAction(XmppUri.ACTION_JOIN)) {
Conversation muc = xmppConnectionService.findFirstMuc(invite.getJid());
if (muc != null) {
- switchToConversation(muc, invite.getBody(), false);
+ switchToConversation(muc, invite.getBody());
return true;
} else {
showJoinConferenceDialog(invite.getJid().asBareJid().toString());
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index d01f29ac5..929d1566b 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -447,26 +447,26 @@ public abstract class XmppActivity extends ActionBarActivity {
}
public void switchToConversation(Conversation conversation) {
- switchToConversation(conversation, null, false);
+ switchToConversation(conversation, null);
}
public void switchToConversationAndQuote(Conversation conversation, String text) {
- switchToConversation(conversation, text, true, null, false, false);
+ switchToConversation(conversation, text, true, null, false);
}
- public void switchToConversation(Conversation conversation, String text, boolean newTask) {
- switchToConversation(conversation, text, false, null, false, newTask);
+ public void switchToConversation(Conversation conversation, String text) {
+ switchToConversation(conversation, text, false, null, false);
}
public void highlightInMuc(Conversation conversation, String nick) {
- switchToConversation(conversation, null, false, nick, false, false);
+ switchToConversation(conversation, null, false, nick, false);
}
public void privateMsgInMuc(Conversation conversation, String nick) {
- switchToConversation(conversation, null, false, nick, true, false);
+ switchToConversation(conversation, null, false, nick, true);
}
- private void switchToConversation(Conversation conversation, String text, boolean asQuote, String nick, boolean pm, boolean newTask) {
+ private void switchToConversation(Conversation conversation, String text, boolean asQuote, String nick, boolean pm) {
Intent intent = new Intent(this, ConversationsActivity.class);
intent.setAction(ConversationsActivity.ACTION_VIEW_CONVERSATION);
intent.putExtra(ConversationsActivity.EXTRA_CONVERSATION, conversation.getUuid());
@@ -480,13 +480,7 @@ public abstract class XmppActivity extends ActionBarActivity {
intent.putExtra(ConversationsActivity.EXTRA_NICK, nick);
intent.putExtra(ConversationsActivity.EXTRA_IS_PRIVATE_MESSAGE, pm);
}
- if (newTask) {
- intent.setFlags(intent.getFlags()
- | Intent.FLAG_ACTIVITY_NEW_TASK
- | Intent.FLAG_ACTIVITY_SINGLE_TOP);
- } else {
- intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_CLEAR_TOP);
- }
+ intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
overridePendingTransition(R.animator.fade_in, R.animator.fade_out);
finish();
@@ -598,18 +592,6 @@ public abstract class XmppActivity extends ActionBarActivity {
}
}
- protected boolean noAccountUsesPgp() {
- if (!hasPgp()) {
- return true;
- }
- for (Account account : xmppConnectionService.getAccounts()) {
- if (account.getPgpId() != 0) {
- return false;
- }
- }
- return true;
- }
-
@SuppressWarnings("deprecation")
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
protected void setListItemBackgroundOnView(View view) {