Updated liblinphone + messages can be deleted one by one using liblinphone storage
This commit is contained in:
parent
aaf4af3b26
commit
b8490bac65
3 changed files with 6 additions and 4 deletions
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 679624223898212549d46757e52646a95b9ab8b8
|
||||
Subproject commit 88a0da21c15c3ac031e55b40e219aebee85e82b0
|
Loading…
Reference in a new issue