##// END OF EJS Templates
Sort favorite and hidden tags when updating the list
neko259 -
r789:22849630 default
parent child Browse files
Show More
@@ -79,7 +79,6 b' class SettingsManager:'
79 for tag_name in tag_names:
79 for tag_name in tag_names:
80 tag = get_object_or_404(Tag, name=tag_name)
80 tag = get_object_or_404(Tag, name=tag_name)
81 tags.append(tag)
81 tags.append(tag)
82
83 return tags
82 return tags
84
83
85 def add_fav_tag(self, tag):
84 def add_fav_tag(self, tag):
@@ -89,6 +88,8 b' class SettingsManager:'
89 else:
88 else:
90 if not tag.name in tags:
89 if not tag.name in tags:
91 tags.append(tag.name)
90 tags.append(tag.name)
91
92 tags.sort()
92 self.set_setting(SETTING_FAVORITE_TAGS, tags)
93 self.set_setting(SETTING_FAVORITE_TAGS, tags)
93
94
94 def del_fav_tag(self, tag):
95 def del_fav_tag(self, tag):
@@ -114,6 +115,8 b' class SettingsManager:'
114 else:
115 else:
115 if not tag.name in tags:
116 if not tag.name in tags:
116 tags.append(tag.name)
117 tags.append(tag.name)
118
119 tags.sort()
117 self.set_setting(SETTING_HIDDEN_TAGS, tags)
120 self.set_setting(SETTING_HIDDEN_TAGS, tags)
118
121
119 def del_hidden_tag(self, tag):
122 def del_hidden_tag(self, tag):
General Comments 0
You need to be logged in to leave comments. Login now