diff --git a/apple/OmnivoreKit/Sources/App/AppExtensions/Share/ShareExtensionViewModel.swift b/apple/OmnivoreKit/Sources/App/AppExtensions/Share/ShareExtensionViewModel.swift index f8a29c7ba..a315f1e8f 100644 --- a/apple/OmnivoreKit/Sources/App/AppExtensions/Share/ShareExtensionViewModel.swift +++ b/apple/OmnivoreKit/Sources/App/AppExtensions/Share/ShareExtensionViewModel.swift @@ -38,6 +38,12 @@ public class ShareExtensionViewModel: ObservableObject { extensionContext?.completeRequest(returningItems: [], completionHandler: nil) } + public func dismissExtension(extensionContext: NSExtensionContext?) { + if let extensionContext = extensionContext { + extensionContext.completeRequest(returningItems: [], completionHandler: nil) + } + } + func savePage(extensionContext: NSExtensionContext?) { if let extensionContext = extensionContext { save(extensionContext) diff --git a/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift b/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift index 4e0731b9d..3096fbb55 100644 --- a/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift +++ b/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift @@ -323,7 +323,7 @@ public struct ShareExtensionView: View { #endif Spacer() Button(action: { - extensionContext?.completeRequest(returningItems: [], completionHandler: nil) + viewModel.dismissExtension(extensionContext: extensionContext) }, label: { Text("Dismiss") #if os(iOS) diff --git a/apple/OmnivoreKit/Sources/Utils/UIViewControllerExtensions.swift b/apple/OmnivoreKit/Sources/Utils/UIViewControllerExtensions.swift index dbb9f2397..68ea96d0b 100644 --- a/apple/OmnivoreKit/Sources/Utils/UIViewControllerExtensions.swift +++ b/apple/OmnivoreKit/Sources/Utils/UIViewControllerExtensions.swift @@ -49,6 +49,8 @@ child.didMove(toParent: self) } } + + #endif #if os(macOS) diff --git a/apple/Sources/ShareExtension/ShareExtensionViewController.swift b/apple/Sources/ShareExtension/ShareExtensionViewController.swift index c1efb133d..6977692b1 100644 --- a/apple/Sources/ShareExtension/ShareExtensionViewController.swift +++ b/apple/Sources/ShareExtension/ShareExtensionViewController.swift @@ -8,13 +8,18 @@ import Views import UIKit @objc(ShareExtensionViewController) - final class ShareExtensionViewController: UIViewController { + final class ShareExtensionViewController: UIViewController, UIGestureRecognizerDelegate { let labelsViewModel = LabelsViewModel() let viewModel = ShareExtensionViewModel() override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = .clear + view.backgroundColor = UIColor(white: 1.0, alpha: 0.001) + view.isUserInteractionEnabled = true + + let dismissGesture = UITapGestureRecognizer(target: self, action: #selector(self.viewTapped(_:))) + dismissGesture.delegate = self + view.addGestureRecognizer(dismissGesture) if !viewModel.services.authenticator.isLoggedIn, !viewModel.services.dataService.appEnvironment.environmentConfigured @@ -60,6 +65,14 @@ import Views ) } + func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool { + return touch.view == gestureRecognizer.view + } + + @objc func viewTapped(_ panGesture: UIGestureRecognizer) { + viewModel.dismissExtension(extensionContext: extensionContext) + } + func openSheet(_ rootView: AnyView) { let hostingController = UIHostingController(rootView: rootView) diff --git a/packages/web/pages/settings/discover-feeds/index.tsx b/packages/web/pages/settings/discover-feeds/index.tsx index 961d3133b..e75bd76ac 100644 --- a/packages/web/pages/settings/discover-feeds/index.tsx +++ b/packages/web/pages/settings/discover-feeds/index.tsx @@ -14,8 +14,11 @@ import { unsubscribeDiscoverFeedMutation } from '../../../lib/networking/mutatio import { applyStoredTheme } from '../../../lib/themeUpdater' import { showErrorToast, showSuccessToast } from '../../../lib/toastHelpers' import { formatMessage } from '../../../locales/en/messages' -import { useGetDiscoverFeeds } from "../../../lib/networking/queries/useGetDiscoverFeeds" -import { UpdateDiscoverFeedInput, updateDiscoverFeedMutation } from "../../../lib/networking/mutations/updateDiscoverFeedMutation" +import { useGetDiscoverFeeds } from '../../../lib/networking/queries/useGetDiscoverFeeds' +import { + UpdateDiscoverFeedInput, + updateDiscoverFeedMutation, +} from '../../../lib/networking/mutations/updateDiscoverFeedMutation' export default function DiscoverFeedsSettings(): JSX.Element { const router = useRouter() @@ -53,7 +56,9 @@ export default function DiscoverFeedsSettings(): JSX.Element { async function onDelete(id: string): Promise { const result = await unsubscribeDiscoverFeedMutation(id) if (result) { - showSuccessToast('Discover Feed unsubscribed', { position: 'bottom-right' }) + showSuccessToast('Discover Feed unsubscribed', { + position: 'bottom-right', + }) } else { showErrorToast('Failed to unsubscribe', { position: 'bottom-right' }) } @@ -74,7 +79,7 @@ export default function DiscoverFeedsSettings(): JSX.Element { suggestionInfo={{ title: 'Add RSS and Atom feeds to your Omnivore account', message: - 'When you add a new feed the last 24hrs of items, or at least one item will be added to your account. Feeds will be checked for updates every hour, and new items will be added to your Following. You can also add feeds to your Library by checking the box below.', + 'When you add a new feed the last 24hrs of items, or at least one item will be added to your account. Feeds will be checked for updates every four hours, and new items will be added to your Following. You can also add feeds to your Library by checking the box below.', docs: 'https://docs.omnivore.app/using/feeds.html', key: '--settings-feeds-show-help', CTAText: 'Add a feed', diff --git a/packages/web/pages/settings/feeds/index.tsx b/packages/web/pages/settings/feeds/index.tsx index 2588f096c..37bc5dae1 100644 --- a/packages/web/pages/settings/feeds/index.tsx +++ b/packages/web/pages/settings/feeds/index.tsx @@ -131,7 +131,7 @@ export default function Rss(): JSX.Element { suggestionInfo={{ title: 'Add RSS and Atom feeds to your Omnivore account', message: - 'When you add a new feed the last 24hrs of items, or at least one item will be added to your account. Feeds will be checked for updates every hour, and new items will be added to your Following. You can also add feeds to your Library by checking the box below.', + 'When you add a new feed the last 24hrs of items, or at least one item will be added to your account. Feeds will be checked for updates every four hours, and new items will be added to your Following. You can also add feeds to your Library by checking the box below.', docs: 'https://docs.omnivore.app/using/feeds.html', key: '--settings-feeds-show-help', CTAText: 'Add a feed', diff --git a/packages/web/styles/articleInnerStyling.css b/packages/web/styles/articleInnerStyling.css index 251da4bb7..3550d0e82 100644 --- a/packages/web/styles/articleInnerStyling.css +++ b/packages/web/styles/articleInnerStyling.css @@ -86,7 +86,7 @@ font-size: 1.43em !important; } .article-inner-css h3 { - font-size: 1.25em !important; + font-size: 1.0em !important; } .article-inner-css h4, .article-inner-css h5,