append to listorder
This commit is contained in:
parent
02c61c6350
commit
3a8429b9ac
1 changed files with 9 additions and 0 deletions
|
@ -44,6 +44,11 @@ class Peer(object):
|
||||||
self.info['peers'] = {}
|
self.info['peers'] = {}
|
||||||
if 'lists' not in self.info:
|
if 'lists' not in self.info:
|
||||||
self.info['lists'] = {}
|
self.info['lists'] = {}
|
||||||
|
for name in self.info['lists']:
|
||||||
|
if 'listorder' not in self.info:
|
||||||
|
self.info['listorder'] = []
|
||||||
|
if name not in self.info['listorder']:
|
||||||
|
self.info['listorder'].append(name)
|
||||||
|
|
||||||
def apply_log(self):
|
def apply_log(self):
|
||||||
changes = []
|
changes = []
|
||||||
|
@ -113,6 +118,10 @@ class Peer(object):
|
||||||
query = args[1]
|
query = args[1]
|
||||||
if name not in self.info['lists']:
|
if name not in self.info['lists']:
|
||||||
self.info['lists'][name] = []
|
self.info['lists'][name] = []
|
||||||
|
if 'listorder' not in self.info:
|
||||||
|
self.info['listorder'] = []
|
||||||
|
if name not in self.info['listorder']:
|
||||||
|
self.info['listorder'].append(name)
|
||||||
elif action == 'editlist':
|
elif action == 'editlist':
|
||||||
name, new = args
|
name, new = args
|
||||||
if name in self.info['lists']:
|
if name in self.info['lists']:
|
||||||
|
|
Loading…
Reference in a new issue