[UNTESTED PUSH FOR DEVICE SYNC] add no_clobber param for footers

pull/4/head
Blake DeMarcy 2017-04-17 04:00:12 -05:00
parent 282559e3ef
commit 89e231c73c
1 changed files with 14 additions and 11 deletions

View File

@ -282,23 +282,29 @@ class App(object):
self.set_header("{} threads", len(self.walker)) self.set_header("{} threads", len(self.walker))
def set_default_footer(self): def set_default_footer(self, clobber_composer=False):
""" """
Sets the footer to the default for the current screen. Sets the footer to the default for the current screen.
""" """
if self.mode == "thread": if not clobber_composer and self.window_split:
return
elif self.mode == "thread":
footer = bars["thread"] % self.prefs["jump_count"] footer = bars["thread"] % self.prefs["jump_count"]
else: footer = bars["index"]
else:
footer = bars["index"]
self.set_footer(footer) self.set_footer(footer)
def set_bars(self): def set_bars(self, clobber_composer=False):
""" """
Sets both the footer and header to their default values Sets both the footer and header to their default values
for the current mode. for the current mode.
""" """
self.set_default_header() self.set_default_header()
self.set_default_footer() self.set_default_footer(clobber_composer)
def close_editor(self): def close_editor(self):
@ -662,8 +668,7 @@ class App(object):
for message in thread["messages"]: for message in thread["messages"]:
self.walker += self.make_message_body(message) self.walker += self.make_message_body(message)
self.set_default_header() self.set_default_header()
if not self.window_split: self.set_default_footer()
self.set_default_footer()
self.goto_post(mark(thread_id)) self.goto_post(mark(thread_id))
@ -985,8 +990,7 @@ class App(object):
value = 1 value = 1
self.prefs["jump_count"] = value self.prefs["jump_count"] = value
if not self.window_split: self.set_default_footer()
self.set_default_footer()
bbjrc("update", **self.prefs) bbjrc("update", **self.prefs)
@ -999,8 +1003,7 @@ class App(object):
value = 64 value = 64
self.prefs["jump_count"] = value self.prefs["jump_count"] = value
if not self.window_split: self.set_default_footer()
self.set_default_footer()
bbjrc("update", **self.prefs) bbjrc("update", **self.prefs)