Change MessageProvider delete URI to use folder ID instead of server ID
This commit is contained in:
parent
70841e40d7
commit
dde0ef9820
1 changed files with 3 additions and 5 deletions
|
@ -144,9 +144,7 @@ public class MessageProvider extends ContentProvider {
|
|||
|
||||
List<String> segments = uri.getPathSegments();
|
||||
int accountId = Integer.parseInt(segments.get(1));
|
||||
// FIXME: Change URI to include folder database ID instead of server ID
|
||||
long folderId = 0L;
|
||||
String folderServerId = segments.get(2);
|
||||
long folderId = Long.parseLong(segments.get(2));
|
||||
String msgUid = segments.get(3);
|
||||
|
||||
// get account
|
||||
|
@ -167,7 +165,7 @@ public class MessageProvider extends ContentProvider {
|
|||
|
||||
if (myAccount != null) {
|
||||
MessageReference messageReference = new MessageReference(myAccount.getUuid(),
|
||||
folderId, folderServerId, msgUid, null);
|
||||
folderId, "dummyValue", msgUid, null);
|
||||
MessagingController controller = MessagingController.getInstance(getContext());
|
||||
controller.deleteMessage(messageReference, null);
|
||||
}
|
||||
|
@ -391,7 +389,7 @@ public class MessageProvider extends ContentProvider {
|
|||
return CONTENT_URI.buildUpon()
|
||||
.appendPath("delete_message")
|
||||
.appendPath(Integer.toString(accountNumber))
|
||||
.appendPath(message.getFolder().getServerId())
|
||||
.appendPath(Long.toString(message.getFolder().getDatabaseId()))
|
||||
.appendPath(message.getUid())
|
||||
.build()
|
||||
.toString();
|
||||
|
|
Loading…
Reference in a new issue