mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
IF there are no tweets or favs, the timeline is not created
This commit is contained in:
parent
57315c3b6e
commit
71fed7300b
@ -715,6 +715,9 @@ class Controller(object):
|
||||
answer = commonMessageDialogs.protected_user()
|
||||
if answer == widgetUtils.NO: return
|
||||
if dlg.get_action() == "tweets":
|
||||
if usr["statuses_count"] == 0:
|
||||
commonMessageDialogs.no_tweets()
|
||||
return
|
||||
if dlg.get_user() in buff.session.settings["other_buffers"]["timelines"]:
|
||||
commonMessageDialogs.timeline_exist()
|
||||
return
|
||||
@ -728,6 +731,9 @@ class Controller(object):
|
||||
pub.sendMessage("restart-streams", streams=["timelinesStream"], session=buff.session)
|
||||
buffer.session.sound.play("create_timeline.ogg")
|
||||
else:
|
||||
if usr["favourites_count"] == 0:
|
||||
commonMessageDialogs.no_favs()
|
||||
return
|
||||
if dlg.get_user() in buffer.session.settings["other_buffers"]["favourites_timelines"]:
|
||||
commonMessageDialogs.timeline_exist()
|
||||
return
|
||||
|
@ -52,3 +52,9 @@ def no_following():
|
||||
def donation():
|
||||
dlg = wx.MessageDialog(None, _(u"If you like {0} we need your help to keep it going. Help us by donating to the project. This will help us pay for the server, the domain and some other things to ensure that {0} will be actively maintained. Your donation will give us the means to continue the development of {0}, and to keep {0} free. Would you like to donate now?").format(application.name), _(u"We need your help"), wx.ICON_QUESTION|wx.YES_NO)
|
||||
return dlg.ShowModal()
|
||||
|
||||
def no_tweets():
|
||||
return wx.MessageDialog(None, _(u"This user has no tweets. {0} can't create a timeline.").format(application.name), _(u"Error"), wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def no_favs():
|
||||
return wx.MessageDialog(None, _(u"This user has no favorited tweets. {0} can't create a timeline.").format(application.name), _(u"Error"), wx.ICON_ERROR).ShowModal()
|
||||
|
Loading…
Reference in New Issue
Block a user