Skip to content

Commit

Permalink
extract duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
qwint committed Jul 4, 2024
1 parent eb03f33 commit 8074074
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kvui.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,11 +595,10 @@ def command_button_action(self, button):
"!help for server commands.")

def connect_button_action(self, button):
self.ctx.username = None
if self.ctx.server:
self.ctx.username = None
async_start(self.ctx.disconnect())
else:
self.ctx.username = None
async_start(self.ctx.connect(self.server_connect_bar.text.replace("/connect ", "")))

def on_stop(self):
Expand Down

0 comments on commit 8074074

Please sign in to comment.