aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/ui')
-rw-r--r--src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java2
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java10
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java14
-rw-r--r--src/eu/siacs/conversations/ui/SettingsActivity.java18
-rw-r--r--src/eu/siacs/conversations/ui/StartConversationActivity.java10
-rw-r--r--src/eu/siacs/conversations/ui/XmppActivity.java9
-rw-r--r--src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java3
7 files changed, 37 insertions, 29 deletions
diff --git a/src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
index 76c12a47..04059d52 100644
--- a/src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
+++ b/src/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
@@ -201,7 +201,7 @@ public class ConferenceDetailsActivity extends XmppActivity {
private void populateView() {
mYourPhoto.setImageBitmap(conversation.getAccount().getImage(this, 48));
setTitle(conversation.getName());
- mFullJid.setText(conversation.getContactJid().split("/",2)[0]);
+ mFullJid.setText(conversation.getContactJid().split("/", 2)[0]);
mYourNick.setText(conversation.getMucOptions().getActualNick());
mRoleAffiliaton = (TextView) findViewById(R.id.muc_role);
if (conversation.getMucOptions().online()) {
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index b6b6aa72..3accafe8 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -167,8 +167,6 @@ public class ConversationActivity extends XmppActivity implements
if (!getSelectedConversation().isRead()) {
xmppConnectionService
.markRead(getSelectedConversation());
- UIHelper.updateNotification(getApplicationContext(),
- getConversationList(), null, false);
listView.invalidateViews();
}
}
@@ -297,7 +295,8 @@ public class ConversationActivity extends XmppActivity implements
int which) {
conversation
.setNextEncryption(Message.ENCRYPTION_NONE);
- xmppConnectionService.databaseBackend.updateConversation(conversation);
+ xmppConnectionService.databaseBackend
+ .updateConversation(conversation);
selectPresenceToAttachFile(attachmentChoice);
}
});
@@ -402,7 +401,7 @@ public class ConversationActivity extends XmppActivity implements
});
builder.create().show();
}
-
+
protected void attachFileDialog() {
View menuAttachFile = findViewById(R.id.action_attach_file);
if (menuAttachFile == null) {
@@ -473,7 +472,8 @@ public class ConversationActivity extends XmppActivity implements
conversation.setNextEncryption(Message.ENCRYPTION_NONE);
break;
}
- xmppConnectionService.databaseBackend.updateConversation(conversation);
+ xmppConnectionService.databaseBackend
+ .updateConversation(conversation);
fragment.updateChatMsgHint();
return true;
}
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index a8dee4f7..7916560d 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -381,10 +381,12 @@ public class ConversationFragment extends Fragment {
activity.getSlidingPaneLayout().closePane();
activity.getActionBar().setDisplayHomeAsUpEnabled(true);
activity.getActionBar().setHomeButtonEnabled(true);
- if (conversation.getMode() == Conversation.MODE_SINGLE || activity.useSubjectToIdentifyConference()) {
+ if (conversation.getMode() == Conversation.MODE_SINGLE
+ || activity.useSubjectToIdentifyConference()) {
activity.getActionBar().setTitle(conversation.getName());
} else {
- activity.getActionBar().setTitle(conversation.getContactJid().split("/")[0]);
+ activity.getActionBar().setTitle(
+ conversation.getContactJid().split("/")[0]);
}
activity.invalidateOptionsMenu();
}
@@ -502,8 +504,6 @@ public class ConversationFragment extends Fragment {
updateChatMsgHint();
if (!activity.shouldPaneBeOpen()) {
activity.xmppConnectionService.markRead(conversation);
- UIHelper.updateNotification(getActivity(),
- activity.getConversationList(), null, false);
activity.updateConversationList();
}
this.updateSendButton();
@@ -668,7 +668,8 @@ public class ConversationFragment extends Fragment {
int which) {
conversation
.setNextEncryption(Message.ENCRYPTION_NONE);
- xmppService.databaseBackend.updateConversation(conversation);
+ xmppService.databaseBackend
+ .updateConversation(conversation);
message.setEncryption(Message.ENCRYPTION_NONE);
xmppService.sendMessage(message);
messageSent();
@@ -697,7 +698,8 @@ public class ConversationFragment extends Fragment {
conversation
.setNextEncryption(Message.ENCRYPTION_NONE);
message.setEncryption(Message.ENCRYPTION_NONE);
- xmppService.databaseBackend.updateConversation(conversation);
+ xmppService.databaseBackend
+ .updateConversation(conversation);
xmppService.sendMessage(message);
messageSent();
}
diff --git a/src/eu/siacs/conversations/ui/SettingsActivity.java b/src/eu/siacs/conversations/ui/SettingsActivity.java
index fc361fb8..fc6308fc 100644
--- a/src/eu/siacs/conversations/ui/SettingsActivity.java
+++ b/src/eu/siacs/conversations/ui/SettingsActivity.java
@@ -21,7 +21,7 @@ public class SettingsActivity extends XmppActivity implements
super.onCreate(savedInstanceState);
mSettingsFragment = new SettingsFragment();
getFragmentManager().beginTransaction()
- .replace(android.R.id.content,mSettingsFragment).commit();
+ .replace(android.R.id.content, mSettingsFragment).commit();
}
@Override
@@ -34,12 +34,16 @@ public class SettingsActivity extends XmppActivity implements
super.onStart();
PreferenceManager.getDefaultSharedPreferences(this)
.registerOnSharedPreferenceChangeListener(this);
- ListPreference resources = (ListPreference) mSettingsFragment.findPreference("resource");
- if (resources!=null) {
- ArrayList<CharSequence> entries = new ArrayList<CharSequence>(Arrays.asList(resources.getEntries()));
- entries.add(0,Build.MODEL);
- resources.setEntries(entries.toArray(new CharSequence[entries.size()]));
- resources.setEntryValues(entries.toArray(new CharSequence[entries.size()]));
+ ListPreference resources = (ListPreference) mSettingsFragment
+ .findPreference("resource");
+ if (resources != null) {
+ ArrayList<CharSequence> entries = new ArrayList<CharSequence>(
+ Arrays.asList(resources.getEntries()));
+ entries.add(0, Build.MODEL);
+ resources.setEntries(entries.toArray(new CharSequence[entries
+ .size()]));
+ resources.setEntryValues(entries.toArray(new CharSequence[entries
+ .size()]));
}
}
diff --git a/src/eu/siacs/conversations/ui/StartConversationActivity.java b/src/eu/siacs/conversations/ui/StartConversationActivity.java
index e4b49d08..1a5fba95 100644
--- a/src/eu/siacs/conversations/ui/StartConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/StartConversationActivity.java
@@ -325,8 +325,8 @@ public class StartConversationActivity extends XmppActivity {
final AutoCompleteTextView jid = (AutoCompleteTextView) dialogView
.findViewById(R.id.jid);
jid.setAdapter(new KnownHostsAdapter(this,
- android.R.layout.simple_list_item_1, mKnownHosts));
- if (prefilledJid!=null) {
+ android.R.layout.simple_list_item_1, mKnownHosts));
+ if (prefilledJid != null) {
jid.append(prefilledJid);
}
populateAccountSpinner(spinner);
@@ -536,7 +536,8 @@ public class StartConversationActivity extends XmppActivity {
setIntent(null);
return false;
}
- } else if (getIntent() != null && Intent.ACTION_VIEW.equals(getIntent().getAction())) {
+ } else if (getIntent() != null
+ && Intent.ACTION_VIEW.equals(getIntent().getAction())) {
Uri uri = getIntent().getData();
String jid = uri.getSchemeSpecificPart().split("\\?")[0];
return handleJid(jid);
@@ -545,8 +546,7 @@ public class StartConversationActivity extends XmppActivity {
}
private boolean handleJid(String jid) {
- List<Contact> contacts = xmppConnectionService
- .findContacts(jid);
+ List<Contact> contacts = xmppConnectionService.findContacts(jid);
if (contacts.size() == 0) {
showCreateContactDialog(jid);
return false;
diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java
index b54bc152..518f7b0b 100644
--- a/src/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/eu/siacs/conversations/ui/XmppActivity.java
@@ -63,7 +63,7 @@ public abstract class XmppActivity extends Activity {
protected int mColorOrange;
protected int mColorGreen;
protected int mPrimaryColor;
-
+
protected boolean mUseSubject = true;
private DisplayMetrics metrics;
@@ -217,7 +217,7 @@ public abstract class XmppActivity extends Activity {
return PreferenceManager
.getDefaultSharedPreferences(getApplicationContext());
}
-
+
public boolean useSubjectToIdentifyConference() {
return mUseSubject;
}
@@ -256,7 +256,7 @@ public abstract class XmppActivity extends Activity {
intent.putExtra("contact", contact.getJid());
startActivity(intent);
}
-
+
public void switchToAccount(Account account) {
Intent intent = new Intent(this, EditAccountActivity.class);
intent.putExtra("jid", account.getJid());
@@ -294,7 +294,8 @@ public abstract class XmppActivity extends Activity {
if (conversation != null) {
conversation
.setNextEncryption(Message.ENCRYPTION_PGP);
- xmppConnectionService.databaseBackend.updateConversation(conversation);
+ xmppConnectionService.databaseBackend
+ .updateConversation(conversation);
}
}
diff --git a/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
index e40723f4..7b470faa 100644
--- a/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
+++ b/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
@@ -52,7 +52,8 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
}
TextView convName = (TextView) view
.findViewById(R.id.conversation_name);
- if (conv.getMode() == Conversation.MODE_SINGLE || activity.useSubjectToIdentifyConference()) {
+ if (conv.getMode() == Conversation.MODE_SINGLE
+ || activity.useSubjectToIdentifyConference()) {
convName.setText(conv.getName());
} else {
convName.setText(conv.getContactJid().split("/")[0]);