Skip to content

Commit

Permalink
[Enhancement] Better status message when adding existing repo
Browse files Browse the repository at this point in the history
- Avoids Blocking UI When Adding Existing Repo

Closes borgbase#1306
  • Loading branch information
DaffyTheDuck committed Mar 12, 2023
1 parent 8bc980d commit a416f9c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/vorta/views/repo_add_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ def run(self):
params = BorgInfoRepoJob.prepare(self.values)
if params['ok']:
self.saveButton.setEnabled(False)
thread = BorgInfoRepoJob(params['cmd'], params)
thread.updated.connect(self._set_status)
thread.result.connect(self.run_result)
self.thread = thread # Needs to be connected to self for tests to work.
self.thread.run()
job = BorgInfoRepoJob(params['cmd'], params)
job.updated.connect(self._set_status)
job.result.connect(self.run_result)
self.job = job # Needs to be connected to self for tests to work.
QApplication.instance().jobs_manager.add_job(job)
else:
self._set_status(params['message'])

0 comments on commit a416f9c

Please sign in to comment.