make channel list's display add channels only on explicit add

This commit is contained in:
DevilXD committed 2022-02-10 21:34:36 +01:00
1 parent 3ccbd4c3db
commit 473af57aeb
3 files changed
+10 -10

No files matched your search

+2 -2
View File
@@ -676,7 +676,7 @@ class ChannelList:
def clear_selection(self):
self._table.selection_set('')
def display(self, channel: Channel):
def display(self, channel: Channel, *, add: bool = False):
# priority
priority = "✔" if channel.priority else "❌"
# status
@@ -707,7 +707,7 @@ class ChannelList:
self._set(iid, "priority", priority)
if points != '': # we still want to display 0
self._set(iid, "points", points)
else:
elif add:
self._channel_map[iid] = channel
self._insert(
iid,