Skip to content
  • Àlex Fiestas's avatar
    Notify correctly the added and modified indexes · b2d04972
    Àlex Fiestas authored
    Right now we have a hack that adds a mock "New User" account into the
    model, which doesn't contain any data. This user is alawys there and it
    is always in the bottom.
    
    So, when we add a new user, what we are doing is updating the information
    from the "New User" to the information of the newly added account, and
    adding a new "New user" account at the bottom.
    
    [0] - user1
    [1] - user2
    [2] - user3
    [3] - New User
    
    model->UserAdded
    
    [0] - user1
    [1] - user2
    [2] - user3
    [3] - user4 //We have to notify 3 has been changed
    [4] - New User //we have to notify 4 has been added
    
    Since we don't know if we are going to keep "New User" around, it is not
    worth it to move it into a Proxy Model (where it belongs). Will refactor
    the code once we decide what to do.
    b2d04972