mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Hides “REMOVE” button in navigation bar if source is already added
This commit is contained in:
@@ -219,6 +219,12 @@ class SourceDetailViewController: HeaderContentViewController<SourceHeaderView,
|
||||
self.addButton.isHidden = false
|
||||
self.navigationBarButton.isHidden = false
|
||||
|
||||
if #available(iOS 16, *)
|
||||
{
|
||||
// Hide REMOVE button in navigation bar.
|
||||
self.navigationItem.rightBarButtonItem?.isHidden = true
|
||||
}
|
||||
|
||||
case false?:
|
||||
title = NSLocalizedString("ADD", comment: "")
|
||||
self.navigationBarButton.tintColor = self.source.effectiveTintColor?.adjustedForDisplay ?? .altPrimary
|
||||
@@ -226,6 +232,12 @@ class SourceDetailViewController: HeaderContentViewController<SourceHeaderView,
|
||||
self.addButton.isHidden = false
|
||||
self.navigationBarButton.isHidden = false
|
||||
|
||||
if #available(iOS 16, *)
|
||||
{
|
||||
// Show ADD button in navigation bar.
|
||||
self.navigationItem.rightBarButtonItem?.isHidden = false
|
||||
}
|
||||
|
||||
case nil:
|
||||
title = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user