aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/ui/BlocklistActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java22
4 files changed, 15 insertions, 15 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/BlocklistActivity.java b/src/main/java/de/pixart/messenger/ui/BlocklistActivity.java
index 3ee40aa7f..175702b08 100644
--- a/src/main/java/de/pixart/messenger/ui/BlocklistActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/BlocklistActivity.java
@@ -19,7 +19,7 @@ import de.pixart.messenger.xmpp.OnUpdateBlocklist;
import de.pixart.messenger.xmpp.jid.Jid;
public class BlocklistActivity extends AbstractSearchableListItemActivity implements OnUpdateBlocklist {
- private List<String> mKnownHosts = new ArrayList<String>();
+ private List<String> mKnownHosts = new ArrayList<>();
private Account account = null;
@Override
diff --git a/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java b/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java
index b1dd48a5f..86f7902c9 100644
--- a/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ChooseContactActivity.java
@@ -29,7 +29,7 @@ import de.pixart.messenger.entities.ListItem;
import de.pixart.messenger.xmpp.jid.Jid;
public class ChooseContactActivity extends AbstractSearchableListItemActivity {
- private List<String> mActivatedAccounts = new ArrayList<String>();
+ private List<String> mActivatedAccounts = new ArrayList<>();
private List<String> mKnownHosts;
private Set<Contact> selected;
@@ -61,7 +61,7 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity {
InputMethodManager.HIDE_IMPLICIT_ONLY);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.select_multiple, menu);
- selected = new HashSet<Contact>();
+ selected = new HashSet<>();
return true;
}
diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
index a040e1964..77c5c255a 100644
--- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
@@ -324,7 +324,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
case R.id.action_advanced_mode:
this.mAdvancedMode = !menuItem.isChecked();
menuItem.setChecked(this.mAdvancedMode);
- getPreferences().edit().putBoolean("advanced_muc_mode", mAdvancedMode).commit();
+ getPreferences().edit().putBoolean("advanced_muc_mode", mAdvancedMode).apply();
mConferenceInfoTable.setVisibility(this.mAdvancedMode ? View.VISIBLE : View.GONE);
invalidateOptionsMenu();
updateView();
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index 50b93cf5e..d8eb6eac2 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -452,17 +452,17 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
}
public void setupIme() {
- if (activity == null) {
- return;
- } else if (activity.usingEnterKey() && activity.enterIsSend()) {
- mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_FLAG_MULTI_LINE));
- mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE));
- } else if (activity.usingEnterKey()) {
- mEditMessage.setInputType(mEditMessage.getInputType() | InputType.TYPE_TEXT_FLAG_MULTI_LINE);
- mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE));
- } else {
- mEditMessage.setInputType(mEditMessage.getInputType() | InputType.TYPE_TEXT_FLAG_MULTI_LINE);
- mEditMessage.setInputType(mEditMessage.getInputType() | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE);
+ if (activity != null) {
+ if (activity.usingEnterKey() && activity.enterIsSend()) {
+ mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_FLAG_MULTI_LINE));
+ mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE));
+ } else if (activity.usingEnterKey()) {
+ mEditMessage.setInputType(mEditMessage.getInputType() | InputType.TYPE_TEXT_FLAG_MULTI_LINE);
+ mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE));
+ } else {
+ mEditMessage.setInputType(mEditMessage.getInputType() | InputType.TYPE_TEXT_FLAG_MULTI_LINE);
+ mEditMessage.setInputType(mEditMessage.getInputType() | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE);
+ }
}
}