Fix bw sync button being disabled

This commit is contained in:
crschnick
2026-03-27 21:02:36 +00:00
parent 80c30db03b
commit f45bc36afb
@@ -225,10 +225,13 @@ public class BitwardenPasswordManager implements PasswordManager {
var syncButton = new ButtonComp(AppI18n.observable("sync"), new FontIcon("mdi2r-refresh"), () -> {
button.get().setDisable(true);
ThreadHelper.runFailableAsync(() -> {
sync();
Platform.runLater(() -> {
button.get().setDisable(false);
});
try {
sync();
} finally {
Platform.runLater(() -> {
button.get().setDisable(false);
});
}
});
});
syncButton.apply(struc -> button.set(struc));