Storage: Removed clean the local database before being deleted

This commit is contained in:
Manuel Cortez 2016-04-02 02:59:59 -06:00
parent 7139a2bcb3
commit 8badd3987a

View File

@ -333,6 +333,7 @@ class baseBufferController(bufferController):
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])
self.session.db.pop(self.name)
return True return True
elif dlg == widgetUtils.NO: elif dlg == widgetUtils.NO:
return False return False
@ -341,6 +342,7 @@ class baseBufferController(bufferController):
if dlg == widgetUtils.YES: if dlg == widgetUtils.YES:
if self.name[:-9] in self.session.settings["other_buffers"]["favourites_timelines"]: if self.name[:-9] in self.session.settings["other_buffers"]["favourites_timelines"]:
self.session.settings["other_buffers"]["favourites_timelines"].remove(self.name[:-9]) self.session.settings["other_buffers"]["favourites_timelines"].remove(self.name[:-9])
self.session.db.pop(self.name)
return True return True
elif dlg == widgetUtils.NO: elif dlg == widgetUtils.NO:
return False return False
@ -671,6 +673,7 @@ class listBufferController(baseBufferController):
if dlg == widgetUtils.YES: if dlg == widgetUtils.YES:
if self.name[:-5] in self.session.settings["other_buffers"]["lists"]: if self.name[:-5] in self.session.settings["other_buffers"]["lists"]:
self.session.settings["other_buffers"]["lists"].remove(self.name[:-5]) self.session.settings["other_buffers"]["lists"].remove(self.name[:-5])
self.session.db.pop(self.name)
return True return True
elif dlg == widgetUtils.NO: elif dlg == widgetUtils.NO:
return False return False
@ -742,6 +745,7 @@ class peopleBufferController(baseBufferController):
if dlg == widgetUtils.YES: if dlg == widgetUtils.YES:
if self.name[:-10] in self.session.settings["other_buffers"]["followers_timelines"]: if self.name[:-10] in self.session.settings["other_buffers"]["followers_timelines"]:
self.session.settings["other_buffers"]["followers_timelines"].remove(self.name[:-10]) self.session.settings["other_buffers"]["followers_timelines"].remove(self.name[:-10])
self.session.db.pop(self.name)
return True return True
elif dlg == widgetUtils.NO: elif dlg == widgetUtils.NO:
return False return False
@ -750,6 +754,7 @@ class peopleBufferController(baseBufferController):
if dlg == widgetUtils.YES: if dlg == widgetUtils.YES:
if self.name[:-8] in self.session.settings["other_buffers"]["friends_timelines"]: if self.name[:-8] in self.session.settings["other_buffers"]["friends_timelines"]:
self.session.settings["other_buffers"]["friends_timelines"].remove(self.name[:-8]) self.session.settings["other_buffers"]["friends_timelines"].remove(self.name[:-8])
self.session.db.pop(self.name)
return True return True
elif dlg == widgetUtils.NO: elif dlg == widgetUtils.NO:
return False return False
@ -899,6 +904,7 @@ class searchBufferController(baseBufferController):
if self.name[:-11] in self.session.settings["other_buffers"]["tweet_searches"]: if self.name[:-11] in self.session.settings["other_buffers"]["tweet_searches"]:
self.session.settings["other_buffers"]["tweet_searches"].remove(self.name[:-11]) self.session.settings["other_buffers"]["tweet_searches"].remove(self.name[:-11])
self.timer.cancel() self.timer.cancel()
self.session.db.pop(self.name)
return True return True
elif dlg == widgetUtils.NO: elif dlg == widgetUtils.NO:
return False return False
@ -939,6 +945,7 @@ class searchPeopleBufferController(peopleBufferController):
if self.name[:-11] in self.session.settings["other_buffers"]["tweet_searches"]: if self.name[:-11] in self.session.settings["other_buffers"]["tweet_searches"]:
self.session.settings["other_buffers"]["tweet_searches"].remove(self.name[:-11]) self.session.settings["other_buffers"]["tweet_searches"].remove(self.name[:-11])
self.timer.cancel() self.timer.cancel()
self.session.db.pop(self.name)
return True return True
elif dlg == widgetUtils.NO: elif dlg == widgetUtils.NO:
return False return False
@ -1006,6 +1013,7 @@ class trendsBufferController(bufferController):
if self.name[:-3] 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[:-3]) self.session.settings["other_buffers"]["trending_topic_buffers"].remove(self.name[:-3])
self.timer.cancel() self.timer.cancel()
self.session.db.pop(self.name)
return True return True
elif dlg == widgetUtils.NO: elif dlg == widgetUtils.NO:
return False return False