Proper delete support from Cwtch (also remove fake delete) #195

Merged
erinn merged 1 commits from :delete into master 2019-08-10 02:26:38 +00:00
Owner

so the cwtch backend didn't respect this attribute delete so it kept trying to make the connections.

This now adopts the proper delete support from
cwtch.im/cwtch#265

And removes the fake one, so fake deleted contacts will reappear so they can be properly deleted

so the cwtch backend didn't respect this attribute delete so it kept trying to make the connections. This now adopts the proper delete support from https://git.openprivacy.ca/cwtch.im/cwtch/pulls/265 And removes the fake one, so fake deleted contacts will reappear so they can be properly deleted
Member

Drone Build Status: failure

https://build.openprivacy.ca/cwtch.im/ui/246

Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/ui/246
Member

Drone Build Status: success

https://build.openprivacy.ca/cwtch.im/ui/247

Drone Build Status: success https://build.openprivacy.ca/cwtch.im/ui/247
Owner

merge conflict (due to sarah's pr probably)

also the following is no longer correct:

onRemoveContact: function(handle) {
    for(var i = 0; i < contactsModel.count; i++){
        if(contactsModel.get(i)["_handle"] == handle) {
            console.log("deleting contact " + contactsModel.get(i)["_handle"])
            contactsModel.remove(i)
        }
    }
}

since contactsModel.remove(i) will shift the subsequent indices. however it's not semantically correct for there to be more than one contact with the same handle so it doesn't matter in practice; maybe put a return after the call to .remove() though, just to make it explicit?

merge conflict (due to sarah's pr probably) also the following is no longer correct: ``` onRemoveContact: function(handle) { for(var i = 0; i < contactsModel.count; i++){ if(contactsModel.get(i)["_handle"] == handle) { console.log("deleting contact " + contactsModel.get(i)["_handle"]) contactsModel.remove(i) } } } ``` since contactsModel.remove(i) will shift the subsequent indices. however it's not semantically correct for there to be more than one contact with the same handle so it doesn't matter in practice; maybe put a `return` after the call to .remove() though, just to make it explicit?
Member

Drone Build Status: success

https://build.openprivacy.ca/cwtch.im/ui/266

Drone Build Status: success https://build.openprivacy.ca/cwtch.im/ui/266
Member

Drone Build Status: success

https://build.openprivacy.ca/cwtch.im/ui/267

Drone Build Status: success https://build.openprivacy.ca/cwtch.im/ui/267
erinn closed this pull request 2019-08-10 02:26:37 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.