Skip to content

Commit

Permalink
fix: Close the transfers window if clearing it removes all items (#160)
Browse files Browse the repository at this point in the history
This change also disables the clear button if there are no items.
  • Loading branch information
jbmorley authored Dec 14, 2024
1 parent 0034834 commit bd67687
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Reconnect/Views/TransfersView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ struct TransfersView: View {

Button("Clear") {
transfersModel.clear()
if transfersModel.transfers.isEmpty {
dismiss()
}
}
.disabled(transfersModel.transfers.isEmpty)
}
.padding(LayoutMetrics.footerPadding)
}
Expand Down

0 comments on commit bd67687

Please sign in to comment.