Change memo sort-order
This commit is contained in:
parent
c5e83aa16a
commit
c891a00d68
1 changed files with 2 additions and 2 deletions
4
memos.py
4
memos.py
|
@ -665,7 +665,7 @@ class PesterMemo(PesterConvo):
|
||||||
item.halfop = halfop
|
item.halfop = halfop
|
||||||
item.admin = admin
|
item.admin = admin
|
||||||
item.voice = voice
|
item.voice = voice
|
||||||
self.umodes = ["box", "founder", "op", "halfop", "admin", "voice"]
|
self.umodes = ["box", "founder", "admin", "op", "halfop", "voice"]
|
||||||
self.iconCrap(item)
|
self.iconCrap(item)
|
||||||
self.userlist.addItem(item)
|
self.userlist.addItem(item)
|
||||||
self.sortUsers()
|
self.sortUsers()
|
||||||
|
@ -676,7 +676,7 @@ class PesterMemo(PesterConvo):
|
||||||
while listing is not None:
|
while listing is not None:
|
||||||
users.append(self.userlist.takeItem(0))
|
users.append(self.userlist.takeItem(0))
|
||||||
listing = self.userlist.item(0)
|
listing = self.userlist.item(0)
|
||||||
users.sort(key=lambda x: ((-1 if x.box else (0 if x.founder else (1 if x.op else (2 if x.halfop else (3 if x.admin else (4 if x.voice else 5)))))), x.text()))
|
users.sort(key=lambda x: ((-1 if x.box else (0 if x.founder else (1 if x.admin else (2 if x.op else (3 if x.halfop else (4 if x.voice else 5)))))), x.text()))
|
||||||
for u in users:
|
for u in users:
|
||||||
self.userlist.addItem(u)
|
self.userlist.addItem(u)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue