Skip to content

Commit

Permalink
chore: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
khcrysalis committed Oct 24, 2024
1 parent c041682 commit c2758ca
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
18 changes: 16 additions & 2 deletions iOS/Views/Settings/DonationTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,24 @@ class DonationTableViewCell: UITableViewCell {
}

private func configureStackViewItems() {
let item2 = DonationItemView(icon: UIImage(systemName: "lock.fill"), title: String.localized("DONATION_CELL_1_TITLE"), description: String.localized("DONATION_CELL_1_DESCRIPTION"))
let item3 = DonationItemView(icon: UIImage(systemName: "heart.fill"), title: String.localized("DONATION_CELL_2_TITLE"), description: String.localized("DONATION_CELL_2_DESCRIPTION"))
let item2 = DonationItemView(
icon: UIImage(systemName: "lock.fill"),
title: String.localized("DONATION_CELL_1_TITLE"),
description: String.localized("DONATION_CELL_1_DESCRIPTION")
)
let item3 = DonationItemView(
icon: UIImage(systemName: "heart.fill"),
title: String.localized("DONATION_CELL_2_TITLE"),
description: String.localized("DONATION_CELL_2_DESCRIPTION")
)
let item4 = DonationItemView(
icon: UIImage(systemName: "heart.text.square.fill"),
title: "Remove This Alert",
description: "Remove annoying alerts like these after getting beta access!"
)

stackView.addArrangedSubview(item2)
stackView.addArrangedSubview(item4)
stackView.addArrangedSubview(item3)
}
}
Expand Down
2 changes: 1 addition & 1 deletion iOS/Views/Settings/Reset/ResetAlertOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ extension SettingsViewController {
let message = ""
+ "\(cacheSize())\n"
+ "\(sourcesCount())\n"
+ "\(downloadedCount())\n"
+ "\(signedCount())\n"
+ "\(downloadedCount())\n"
+ "\(certificateCount())"

resetAlert(
Expand Down
23 changes: 19 additions & 4 deletions iOS/Views/TabbarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,26 @@ class TabbarController: UITabBarController, UITabBarControllerDelegate {
}

private func setupTabs() {
let sources = self.createNavigation(with: String.localized("TAB_SOURCES"), and: UIImage(named: "globe2"), vc: SourcesViewController())
let library = self.createNavigation(with: String.localized("TAB_LIBRARY"), and: UIImage(systemName: "square.grid.2x2.fill"), vc: LibraryViewController())
let settings = self.createNavigation(with: String.localized("TAB_SETTINGS"), and: UIImage(systemName: "gearshape.2.fill"), vc: SettingsViewController())
let sources = self.createNavigation(
with: String.localized("TAB_SOURCES"),
and: UIImage(named: "globe2"), vc: SourcesViewController()
)
let library = self.createNavigation(
with: String.localized("TAB_LIBRARY"),
and: UIImage(systemName: "square.grid.2x2.fill"),
vc: LibraryViewController()
)
let settings = self.createNavigation(
with: String.localized("TAB_SETTINGS"),
and: UIImage(systemName: "gearshape.2.fill"),
vc: SettingsViewController()
)

var viewControllers = [sources, library, settings]
var viewControllers = [
sources,
library,
settings
]

self.setViewControllers(viewControllers, animated: false)
}
Expand Down

0 comments on commit c2758ca

Please sign in to comment.