mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-15 13:35:04 -05:00
Code clean up
This commit is contained in:
parent
e98f7e57b0
commit
11e26e71f6
@ -1,7 +1,6 @@
|
|||||||
package eu.siacs.conversations.ui;
|
package eu.siacs.conversations.ui;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.res.Resources;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import eu.siacs.conversations.xmpp.OnUpdateBlocklist;
|
|||||||
import eu.siacs.conversations.xmpp.jid.Jid;
|
import eu.siacs.conversations.xmpp.jid.Jid;
|
||||||
|
|
||||||
public class BlocklistActivity extends AbstractSearchableListItemActivity implements OnUpdateBlocklist {
|
public class BlocklistActivity extends AbstractSearchableListItemActivity implements OnUpdateBlocklist {
|
||||||
private List<String> mKnownHosts = new ArrayList<String>();
|
private List<String> mKnownHosts = new ArrayList<>();
|
||||||
|
|
||||||
private Account account = null;
|
private Account account = null;
|
||||||
|
|
||||||
|
@ -11,8 +11,6 @@ import android.widget.Toast;
|
|||||||
import eu.siacs.conversations.R;
|
import eu.siacs.conversations.R;
|
||||||
import eu.siacs.conversations.entities.Account;
|
import eu.siacs.conversations.entities.Account;
|
||||||
import eu.siacs.conversations.services.XmppConnectionService;
|
import eu.siacs.conversations.services.XmppConnectionService;
|
||||||
import eu.siacs.conversations.xmpp.jid.InvalidJidException;
|
|
||||||
import eu.siacs.conversations.xmpp.jid.Jid;
|
|
||||||
|
|
||||||
public class ChangePasswordActivity extends XmppActivity implements XmppConnectionService.OnAccountPasswordChanged {
|
public class ChangePasswordActivity extends XmppActivity implements XmppConnectionService.OnAccountPasswordChanged {
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import eu.siacs.conversations.entities.ListItem;
|
|||||||
import eu.siacs.conversations.xmpp.jid.Jid;
|
import eu.siacs.conversations.xmpp.jid.Jid;
|
||||||
|
|
||||||
public class ChooseContactActivity extends AbstractSearchableListItemActivity {
|
public class ChooseContactActivity extends AbstractSearchableListItemActivity {
|
||||||
private List<String> mActivatedAccounts = new ArrayList<String>();
|
private List<String> mActivatedAccounts = new ArrayList<>();
|
||||||
private List<String> mKnownHosts;
|
private List<String> mKnownHosts;
|
||||||
|
|
||||||
private Set<Contact> selected;
|
private Set<Contact> selected;
|
||||||
@ -61,7 +61,7 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity {
|
|||||||
InputMethodManager.HIDE_IMPLICIT_ONLY);
|
InputMethodManager.HIDE_IMPLICIT_ONLY);
|
||||||
MenuInflater inflater = getMenuInflater();
|
MenuInflater inflater = getMenuInflater();
|
||||||
inflater.inflate(R.menu.select_multiple, menu);
|
inflater.inflate(R.menu.select_multiple, menu);
|
||||||
selected = new HashSet<Contact>();
|
selected = new HashSet<>();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
|||||||
case R.id.action_advanced_mode:
|
case R.id.action_advanced_mode:
|
||||||
this.mAdvancedMode = !menuItem.isChecked();
|
this.mAdvancedMode = !menuItem.isChecked();
|
||||||
menuItem.setChecked(this.mAdvancedMode);
|
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);
|
mConferenceInfoTable.setVisibility(this.mAdvancedMode ? View.VISIBLE : View.GONE);
|
||||||
invalidateOptionsMenu();
|
invalidateOptionsMenu();
|
||||||
updateView();
|
updateView();
|
||||||
|
@ -433,9 +433,8 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setupIme() {
|
public void setupIme() {
|
||||||
if (activity == null) {
|
if (activity != null) {
|
||||||
return;
|
if (activity.usingEnterKey() && activity.enterIsSend()) {
|
||||||
} else if (activity.usingEnterKey() && activity.enterIsSend()) {
|
|
||||||
mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_FLAG_MULTI_LINE));
|
mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_FLAG_MULTI_LINE));
|
||||||
mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE));
|
mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE));
|
||||||
} else if (activity.usingEnterKey()) {
|
} else if (activity.usingEnterKey()) {
|
||||||
@ -446,6 +445,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||||||
mEditMessage.setInputType(mEditMessage.getInputType() | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE);
|
mEditMessage.setInputType(mEditMessage.getInputType() | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(final LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(final LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
Loading…
Reference in New Issue
Block a user