diff --git a/src/org/linphone/ChatFragment.java b/src/org/linphone/ChatFragment.java index da4a611f5..f4aaf7337 100644 --- a/src/org/linphone/ChatFragment.java +++ b/src/org/linphone/ChatFragment.java @@ -479,7 +479,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC public boolean onContextItemSelected(MenuItem item) { switch (item.getItemId()) { case MENU_DELETE_MESSAGE: - LinphoneActivity.instance().getChatStorage().deleteMessage(item.getGroupId()); + LinphoneActivity.instance().getChatStorage().deleteMessage(chatRoom, item.getGroupId()); invalidate(); break; case MENU_SAVE_PICTURE: diff --git a/src/org/linphone/ChatStorage.java b/src/org/linphone/ChatStorage.java index 90bc8a4bb..15660bbba 100644 --- a/src/org/linphone/ChatStorage.java +++ b/src/org/linphone/ChatStorage.java @@ -354,9 +354,11 @@ public class ChatStorage { return chatList; } - public void deleteMessage(int id) { + public void deleteMessage(LinphoneChatRoom chatroom, int id) { if (useNativeAPI) { - //TODO + LinphoneChatMessage[] history = chatroom.getHistory(); + LinphoneChatMessage message = history[id-1]; + chatroom.deleteMessage(message); } else { db.delete(TABLE_NAME, "id LIKE " + id, null); } diff --git a/submodules/linphone b/submodules/linphone index 679624223..88a0da21c 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 679624223898212549d46757e52646a95b9ab8b8 +Subproject commit 88a0da21c15c3ac031e55b40e219aebee85e82b0