Tusker/Tusker/Screens/Local Predicate Statuses List/BookmarksViewController.swift

36 lines
1.0 KiB
Swift

//
// BookmarksViewController.swift
// Tusker
//
// Created by Shadowfacts on 12/15/19.
// Copyright © 2019 Shadowfacts. All rights reserved.
//
import UIKit
import Pachyderm
class BookmarksViewController: LocalPredicateStatusesViewController {
init(mastodonController: MastodonController) {
super.init(
predicate: { $0.reblog == nil && $0.bookmarked ?? false },
predicateTitle: "Bookmarks",
request: { Client.getBookmarks(range: $0) },
mastodonController: mastodonController
)
userActivity = UserActivityManager.bookmarksActivity(accountID: mastodonController.accountInfo!.id)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
extension BookmarksViewController: StateRestorableViewController {
func stateRestorationActivity() -> NSUserActivity? {
return UserActivityManager.bookmarksActivity(accountID: mastodonController.accountInfo!.id)
}
}