A bugfix on buffers deletion

This commit is contained in:
Manuel Cortez 2015-02-12 13:18:24 -06:00
parent a3e7effb83
commit 066814724b

View File

@ -218,8 +218,8 @@ class baseBufferController(bufferController):
if "timeline" in self.name: if "timeline" in self.name:
dlg = commonMessageDialogs.remove_buffer() dlg = commonMessageDialogs.remove_buffer()
if dlg == widgetUtils.YES: if dlg == widgetUtils.YES:
if self.name[:9] in self.session.settings["other_buffers"]["timelines"]: if self.name[:-9] in self.session.settings["other_buffers"]["timelines"]:
self.session.settings["other_buffers"]["timelines"].remove(self.name[:9]) self.session.settings["other_buffers"]["timelines"].remove(self.name[:-9])
return True return True
elif dlg == widgetUtils.NO: elif dlg == widgetUtils.NO:
return False return False
@ -602,8 +602,8 @@ class trendsBufferController(bufferController):
def remove_buffer(self): def remove_buffer(self):
dlg = commonMessageDialogs.remove_buffer() dlg = commonMessageDialogs.remove_buffer()
if dlg == widgetUtils.YES: if dlg == widgetUtils.YES:
if self.name in self.session.settings["other_buffers"]["trending_topic_buffers"]: if self.name[:-3] in self.session.settings["other_buffers"]["trending_topic_buffers"]:
self.session.settings["other_buffers"]["trending_topic_buffers"].remove(self.name) self.session.settings["other_buffers"]["trending_topic_buffers"].remove(self.name[:-3])
return True return True
elif dlg == widgetUtils.NO: elif dlg == widgetUtils.NO:
return False return False