mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[AltStore] Updates ToastView appearance
This commit is contained in:
@@ -361,7 +361,7 @@ extension AppViewController
|
|||||||
{
|
{
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
let toastView = ToastView(text: error.localizedDescription, detailText: nil)
|
let toastView = ToastView(text: error.localizedDescription, detailText: nil)
|
||||||
toastView.show(in: self.navigationController!.view, duration: 2)
|
toastView.show(in: self.navigationController?.view ?? self.view, duration: 2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,8 +108,7 @@ private extension BrowseViewController
|
|||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
let toastView = RSTToastView(text: NSLocalizedString("Failed to Fetch Apps", comment: ""), detailText: error.localizedDescription)
|
let toastView = ToastView(text: error.localizedDescription, detailText: nil)
|
||||||
toastView.tintColor = .altGreen
|
|
||||||
toastView.show(in: self.navigationController?.view ?? self.view, duration: 2.0)
|
toastView.show(in: self.navigationController?.view ?? self.view, duration: 2.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,9 +149,8 @@ private extension BrowseViewController
|
|||||||
{
|
{
|
||||||
case .failure(OperationError.cancelled): break // Ignore
|
case .failure(OperationError.cancelled): break // Ignore
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
let toastView = RSTToastView(text: "Failed to install \(app.name)", detailText: error.localizedDescription)
|
let toastView = ToastView(text: error.localizedDescription, detailText: nil)
|
||||||
toastView.tintColor = .altGreen
|
toastView.show(in: self.navigationController?.view ?? self.view, duration: 2)
|
||||||
toastView.show(in: self.navigationController!.view, duration: 2)
|
|
||||||
|
|
||||||
case .success: print("Installed app:", app.identifier)
|
case .success: print("Installed app:", app.identifier)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,6 @@ class ToastView: RSTToastView
|
|||||||
{
|
{
|
||||||
super.layoutSubviews()
|
super.layoutSubviews()
|
||||||
|
|
||||||
self.layer.cornerRadius = self.bounds.midY
|
self.layer.cornerRadius = 16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -244,7 +244,6 @@ private extension MyAppsViewController
|
|||||||
{
|
{
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
let toastView = ToastView(text: error.localizedDescription, detailText: nil)
|
let toastView = ToastView(text: error.localizedDescription, detailText: nil)
|
||||||
toastView.tintColor = .refreshRed
|
|
||||||
toastView.setNeedsLayout()
|
toastView.setNeedsLayout()
|
||||||
toastView.show(in: self.navigationController?.view ?? self.view, duration: 2.0)
|
toastView.show(in: self.navigationController?.view ?? self.view, duration: 2.0)
|
||||||
|
|
||||||
@@ -424,9 +423,8 @@ private extension MyAppsViewController
|
|||||||
self.collectionView.reloadItems(at: [indexPath])
|
self.collectionView.reloadItems(at: [indexPath])
|
||||||
|
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
let toastView = RSTToastView(text: "Failed to update \(app.name)", detailText: error.localizedDescription)
|
let toastView = ToastView(text: error.localizedDescription, detailText: nil)
|
||||||
toastView.tintColor = .altGreen
|
toastView.show(in: self.navigationController?.view ?? self.view, duration: 2)
|
||||||
toastView.show(in: self.navigationController!.view, duration: 2)
|
|
||||||
|
|
||||||
self.collectionView.reloadItems(at: [indexPath])
|
self.collectionView.reloadItems(at: [indexPath])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user