32
|
|
|
Ken VanDine |
11 years ago
|
|
|
31
|
|
|
Ken VanDine |
11 years ago
|
|
|
30
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
29
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
28
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
27
|
|
Fully generalize Dispatcher.Do so that it is capable of nearly anything.
Now you can search all accounts like this:
Dispatcher.Do('search', '', 'search terms')
Or you can search a specific account like this:
Dispatcher.Do('search', '4/identica', 'search terms')
And it also supports things like liking or deleting:
Dispatcher.Do('like', '7/facebook', 'obj_id') Dispatcher.Do('delete', '2/twitter', 'obj_id')
Regardless of what action you call as the first argument, if the second argument is the empty string, then that action will be called for all accounts, so if you're doing something destructive like a delete, you have to be wary of id collisions across services.
|
Robert Bruce Park |
11 years ago
|
|
|
26
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
25
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
24
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
23
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
22
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
21
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
20
|
|
Fix some AccountManager methods. Fixes lp:1069509
Ok, so I reviewed this in much more depth than previously. This commit:
* Unifies the behavior of disabling and deleting accounts. Now, if you're in UOA, and you flick an account to 'OFF', it's messages will be removed from the model. Similarly, if you outright delete an account, the associated messages are also deleted. Currently we do not make any distinction between a "disabled" and a "deleted" account. In both cases, messages are removed from the model, and no attempts are made to redownload messages from that account, until it is re-enabled later.
* Removes the "refresh callback" from the AccountManager, because that was stupid. It turns out, when an account is enabled, you only need to call 'receive' on that one account, not on all of them together. So this is a nice little efficiency win.
* Updates all the tests to the new API changes.
I tested this thoroughly with friends-service.sh, using UOA to enable, disable, delete, and recreate accounts, and it works great.
The best part is, thanks to my previous work on using Model.insert_sorted instead of Model.append, deleting and re-adding messages to the model doesn't change the order of those messages in the Model.
|
Robert Bruce Park |
11 years ago
|
|
|
19
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
18
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
17
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
16
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
15
|
|
|
Robert Bruce Park |
11 years ago
|
|
|
14
|
|
|
Ken VanDine |
11 years ago
|
|
|
13
|
|
|
Barry Warsaw |
11 years ago
|
|
|