Skip to content

Commit

Permalink
Merge pull request #441 from gini/BSDK-163-UI-issues-in-Digital-Invoi…
Browse files Browse the repository at this point in the history
…ce-screen-after-disabling-one-item

fix(GiniBankSDK): Fix UI issues in Digital Invoice screen after disabling one item
  • Loading branch information
a-szotyori authored Dec 18, 2023
2 parents 7b10d74 + 0fe28e0 commit ca3373a
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ class DigitalLineItemTableViewCell: UITableViewCell {
selectionStyle = .none

if viewModel?.index == 0 {
clipsToBounds = true
layer.cornerRadius = 8
layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMinYCorner]

round(corners: [.topLeft, .topRight], radius: 8)
separatorView.isHidden = true
}

Expand All @@ -114,6 +111,13 @@ class DigitalLineItemTableViewCell: UITableViewCell {
editButton.titleLabel?.font = configuration.textStyleFonts[.body]
}

override func prepareForReuse() {
super.prepareForReuse()
// When reusing cells, reset the rounded corners and the separator view visibility to their default values
round(radius: 0)
separatorView.isHidden = false
}

@objc func modeSwitchValueChange(sender: UISwitch) {
if let viewModel = viewModel {
delegate?.modeSwitchValueChanged(cell: self, lineItemViewModel: viewModel)
Expand Down

0 comments on commit ca3373a

Please sign in to comment.