mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-19 11:43:24 +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.addButton.isHidden = false
|
||||||
self.navigationBarButton.isHidden = false
|
self.navigationBarButton.isHidden = false
|
||||||
|
|
||||||
|
if #available(iOS 16, *)
|
||||||
|
{
|
||||||
|
// Hide REMOVE button in navigation bar.
|
||||||
|
self.navigationItem.rightBarButtonItem?.isHidden = true
|
||||||
|
}
|
||||||
|
|
||||||
case false?:
|
case false?:
|
||||||
title = NSLocalizedString("ADD", comment: "")
|
title = NSLocalizedString("ADD", comment: "")
|
||||||
self.navigationBarButton.tintColor = self.source.effectiveTintColor?.adjustedForDisplay ?? .altPrimary
|
self.navigationBarButton.tintColor = self.source.effectiveTintColor?.adjustedForDisplay ?? .altPrimary
|
||||||
@@ -226,6 +232,12 @@ class SourceDetailViewController: HeaderContentViewController<SourceHeaderView,
|
|||||||
self.addButton.isHidden = false
|
self.addButton.isHidden = false
|
||||||
self.navigationBarButton.isHidden = false
|
self.navigationBarButton.isHidden = false
|
||||||
|
|
||||||
|
if #available(iOS 16, *)
|
||||||
|
{
|
||||||
|
// Show ADD button in navigation bar.
|
||||||
|
self.navigationItem.rightBarButtonItem?.isHidden = false
|
||||||
|
}
|
||||||
|
|
||||||
case nil:
|
case nil:
|
||||||
title = ""
|
title = ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user