Reglage du bug sur les conversations ouvertes.
--- a/default.properties Sun Nov 15 00:11:06 2009 +0100
+++ b/default.properties Mon Nov 16 22:39:11 2009 +0100
@@ -10,5 +10,5 @@
# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
-target=android-3
+target=android-5
apk-configurations=
--- a/res/layout/chat.xml Sun Nov 15 00:11:06 2009 +0100
+++ b/res/layout/chat.xml Mon Nov 16 22:39:11 2009 +0100
@@ -31,7 +31,7 @@
android:smoothScrollbar="false" android:layout_marginBottom="20sp"
android:padding="4px" />
<EditText android:id="@+id/chat_input" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:inputType="textShortMessage|textAutoComplete"
+ android:layout_height="wrap_content" android:inputType="textShortMessage"
android:imeOptions="actionSend" android:cursorVisible="true"
android:hint="@string/chat_input_default_value" />
</LinearLayout>
--- a/src/com/beem/project/beem/service/BeemChatManager.java Sun Nov 15 00:11:06 2009 +0100
+++ b/src/com/beem/project/beem/service/BeemChatManager.java Mon Nov 16 22:39:11 2009 +0100
@@ -248,7 +248,7 @@
IRoster mRoster = mService.getBind().getRoster();
for (ChatAdapter chat : mChats.values()) {
- if (!chat.isOpen())
+ if (chat.getMessages().size() > 0) //TODO check plutot le nombre de messages dans l'historique
openedChats.add(mRoster.getContact(chat.getParticipant().getJID()));
}
return (openedChats);
--- a/src/com/beem/project/beem/ui/Chat.java Sun Nov 15 00:11:06 2009 +0100
+++ b/src/com/beem/project/beem/ui/Chat.java Mon Nov 16 22:39:11 2009 +0100
@@ -246,7 +246,6 @@
case R.id.chat_menu_change_chat:
try {
final List<Contact> openedChats = mChatManager.getOpenedChatList();
-
if (openedChats.size() > 0)
createChatSwitcherDialog(openedChats);
else
@@ -279,24 +278,19 @@
for (Contact c : openedChats) {
items[i++] = c.getName();
}
-
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(getString(R.string.chat_dialog_change_chat_title));
builder.setItems(items, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
Intent chatIntent = new Intent(getApplicationContext(), com.beem.project.beem.ui.Chat.class);
- try {
- chatIntent.setData(mRoster.getContact(openedChats.get(item).getJID()).toUri());
- } catch (RemoteException e) {
- Log.e(TAG, e.getMessage());
- }
+ chatIntent.setData((openedChats.get(item)).toUri());
Chat.this.onNewIntent(chatIntent);
}
});
AlertDialog chatSwitcherDialog = builder.create();
chatSwitcherDialog.show();
}
-
+
private void createNoActiveChatsDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(getString(R.string.chat_no_more_chats));
@@ -315,7 +309,6 @@
mChat.setOpen(false);
mChat = mChatManager.createChat(contact, mMessageListener);
mChat.setOpen(true);
-
mChatManager.deleteChatNotification(mChat);
mContact = mRoster.getContact(contact.getJID());