mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
Use marked property in ConsoleState.clear
This commit is contained in:
parent
653ed4e342
commit
500b61a811
@ -140,16 +140,12 @@ class ConsoleState(flow.State):
|
|||||||
self.set_focus(0)
|
self.set_focus(0)
|
||||||
|
|
||||||
def clear(self):
|
def clear(self):
|
||||||
marked_flows = []
|
marked_flows = [f for f in self.state.view if f.marked]
|
||||||
for f in self.flows:
|
|
||||||
if self.flow_marked(f):
|
|
||||||
marked_flows.append(f)
|
|
||||||
|
|
||||||
super(ConsoleState, self).clear()
|
super(ConsoleState, self).clear()
|
||||||
|
|
||||||
for f in marked_flows:
|
for f in marked_flows:
|
||||||
self.add_flow(f)
|
self.add_flow(f)
|
||||||
self.set_flow_marked(f, True)
|
f.marked = True
|
||||||
|
|
||||||
if len(self.flows.views) == 0:
|
if len(self.flows.views) == 0:
|
||||||
self.focus = None
|
self.focus = None
|
||||||
|
Loading…
Reference in New Issue
Block a user