2022-10-10 13:14:52 +02:00
|
|
|
//
|
|
|
|
// AutoCompleteViewModel+Diffable.swift
|
|
|
|
// Mastodon
|
|
|
|
//
|
|
|
|
// Created by MainasuK Cirno on 2021-5-17.
|
|
|
|
//
|
|
|
|
|
|
|
|
import UIKit
|
2022-11-13 09:04:29 +01:00
|
|
|
import MastodonCore
|
2022-10-10 13:14:52 +02:00
|
|
|
|
|
|
|
extension AutoCompleteViewModel {
|
|
|
|
|
2022-11-13 09:04:29 +01:00
|
|
|
func setupDiffableDataSource(
|
|
|
|
tableView: UITableView
|
|
|
|
) {
|
|
|
|
diffableDataSource = AutoCompleteSection.tableViewDiffableDataSource(tableView: tableView)
|
|
|
|
|
|
|
|
var snapshot = NSDiffableDataSourceSnapshot<AutoCompleteSection, AutoCompleteItem>()
|
|
|
|
snapshot.appendSections([.main])
|
|
|
|
diffableDataSource?.apply(snapshot)
|
|
|
|
}
|
2022-10-10 13:14:52 +02:00
|
|
|
|
|
|
|
}
|