updated mainwindow to stop thread when switching repo