mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-03 10:47:35 +01:00
parent
195029fc15
commit
6c4e3efbde
@ -4,6 +4,7 @@ import WidgetKit
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
import Intents
|
import Intents
|
||||||
import MastodonSDK
|
import MastodonSDK
|
||||||
|
import MastodonCore
|
||||||
import MastodonLocalization
|
import MastodonLocalization
|
||||||
|
|
||||||
struct FollowersCountWidgetProvider: IntentTimelineProvider {
|
struct FollowersCountWidgetProvider: IntentTimelineProvider {
|
||||||
@ -70,6 +71,9 @@ struct FollowersCountWidget: Widget {
|
|||||||
private extension FollowersCountWidgetProvider {
|
private extension FollowersCountWidgetProvider {
|
||||||
func loadCurrentEntry(for configuration: FollowersCountIntent, in context: Context, completion: @escaping (FollowersCountEntry) -> Void) {
|
func loadCurrentEntry(for configuration: FollowersCountIntent, in context: Context, completion: @escaping (FollowersCountEntry) -> Void) {
|
||||||
Task {
|
Task {
|
||||||
|
|
||||||
|
AuthenticationServiceProvider.shared.restore()
|
||||||
|
|
||||||
guard
|
guard
|
||||||
let authBox = WidgetExtension.appContext
|
let authBox = WidgetExtension.appContext
|
||||||
.authenticationService
|
.authenticationService
|
||||||
|
@ -4,6 +4,7 @@ import WidgetKit
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
import MastodonSDK
|
import MastodonSDK
|
||||||
import MastodonLocalization
|
import MastodonLocalization
|
||||||
|
import MastodonCore
|
||||||
|
|
||||||
struct HashtagWidgetProvider: IntentTimelineProvider {
|
struct HashtagWidgetProvider: IntentTimelineProvider {
|
||||||
func placeholder(in context: Context) -> HashtagWidgetTimelineEntry {
|
func placeholder(in context: Context) -> HashtagWidgetTimelineEntry {
|
||||||
@ -24,6 +25,8 @@ struct HashtagWidgetProvider: IntentTimelineProvider {
|
|||||||
extension HashtagWidgetProvider {
|
extension HashtagWidgetProvider {
|
||||||
func loadMostRecentHashtag(for configuration: HashtagIntent, in context: Context, completion: @escaping (HashtagWidgetTimelineEntry) -> Void ) {
|
func loadMostRecentHashtag(for configuration: HashtagIntent, in context: Context, completion: @escaping (HashtagWidgetTimelineEntry) -> Void ) {
|
||||||
|
|
||||||
|
AuthenticationServiceProvider.shared.restore()
|
||||||
|
|
||||||
guard
|
guard
|
||||||
let authBox = WidgetExtension.appContext
|
let authBox = WidgetExtension.appContext
|
||||||
.authenticationService
|
.authenticationService
|
||||||
|
@ -5,6 +5,7 @@ import SwiftUI
|
|||||||
import Intents
|
import Intents
|
||||||
import MastodonSDK
|
import MastodonSDK
|
||||||
import MastodonLocalization
|
import MastodonLocalization
|
||||||
|
import MastodonCore
|
||||||
|
|
||||||
struct LatestFollowersWidgetProvider: IntentTimelineProvider {
|
struct LatestFollowersWidgetProvider: IntentTimelineProvider {
|
||||||
func placeholder(in context: Context) -> LatestFollowersEntry {
|
func placeholder(in context: Context) -> LatestFollowersEntry {
|
||||||
@ -77,6 +78,9 @@ struct LatestFollowersWidget: Widget {
|
|||||||
private extension LatestFollowersWidgetProvider {
|
private extension LatestFollowersWidgetProvider {
|
||||||
func loadCurrentEntry(for configuration: LatestFollowersIntent, in context: Context, completion: @escaping (LatestFollowersEntry) -> Void) {
|
func loadCurrentEntry(for configuration: LatestFollowersIntent, in context: Context, completion: @escaping (LatestFollowersEntry) -> Void) {
|
||||||
Task { @MainActor in
|
Task { @MainActor in
|
||||||
|
|
||||||
|
AuthenticationServiceProvider.shared.restore()
|
||||||
|
|
||||||
guard
|
guard
|
||||||
let authBox = WidgetExtension.appContext
|
let authBox = WidgetExtension.appContext
|
||||||
.authenticationService
|
.authenticationService
|
||||||
|
@ -4,6 +4,7 @@ import WidgetKit
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
import Intents
|
import Intents
|
||||||
import MastodonSDK
|
import MastodonSDK
|
||||||
|
import MastodonCore
|
||||||
import MastodonLocalization
|
import MastodonLocalization
|
||||||
|
|
||||||
struct MultiFollowersCountWidgetProvider: IntentTimelineProvider {
|
struct MultiFollowersCountWidgetProvider: IntentTimelineProvider {
|
||||||
@ -70,6 +71,9 @@ struct MultiFollowersCountWidget: Widget {
|
|||||||
private extension MultiFollowersCountWidgetProvider {
|
private extension MultiFollowersCountWidgetProvider {
|
||||||
func loadCurrentEntry(for configuration: MultiFollowersCountIntent, in context: Context, completion: @escaping (MultiFollowersCountEntry) -> Void) {
|
func loadCurrentEntry(for configuration: MultiFollowersCountIntent, in context: Context, completion: @escaping (MultiFollowersCountEntry) -> Void) {
|
||||||
Task {
|
Task {
|
||||||
|
|
||||||
|
AuthenticationServiceProvider.shared.restore()
|
||||||
|
|
||||||
guard
|
guard
|
||||||
let authBox = WidgetExtension.appContext
|
let authBox = WidgetExtension.appContext
|
||||||
.authenticationService
|
.authenticationService
|
||||||
|
Loading…
x
Reference in New Issue
Block a user