Remove duplicate code (IOS-140)
This commit is contained in:
parent
93533654f8
commit
dbf6e6b467
|
@ -44,3 +44,15 @@ extension DataSourceFacade {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension UserTableViewCellDelegate where Self: NeedsDependency & AuthContextProvider {
|
||||||
|
func userView(_ view: UserView, didTapButtonWith state: UserView.ButtonState, for user: MastodonUser) {
|
||||||
|
Task {
|
||||||
|
try await DataSourceFacade.responseToUserViewButtonAction(
|
||||||
|
dependency: self,
|
||||||
|
user: user.asRecord,
|
||||||
|
buttonState: state
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -93,14 +93,4 @@ extension FamiliarFollowersViewController: UITableViewDelegate, AutoGenerateTabl
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - UserTableViewCellDelegate
|
// MARK: - UserTableViewCellDelegate
|
||||||
extension FamiliarFollowersViewController: UserTableViewCellDelegate {
|
extension FamiliarFollowersViewController: UserTableViewCellDelegate {}
|
||||||
func userView(_ view: UserView, didTapButtonWith state: UserView.ButtonState, for user: MastodonUser) {
|
|
||||||
Task {
|
|
||||||
try await DataSourceFacade.responseToUserViewButtonAction(
|
|
||||||
dependency: self,
|
|
||||||
user: user.asRecord,
|
|
||||||
buttonState: state
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -119,14 +119,4 @@ extension FollowerListViewController: UITableViewDelegate, AutoGenerateTableView
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - UserTableViewCellDelegate
|
// MARK: - UserTableViewCellDelegate
|
||||||
extension FollowerListViewController: UserTableViewCellDelegate {
|
extension FollowerListViewController: UserTableViewCellDelegate {}
|
||||||
func userView(_ view: UserView, didTapButtonWith state: UserView.ButtonState, for user: MastodonUser) {
|
|
||||||
Task {
|
|
||||||
try await DataSourceFacade.responseToUserViewButtonAction(
|
|
||||||
dependency: self,
|
|
||||||
user: user.asRecord,
|
|
||||||
buttonState: state
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -117,14 +117,4 @@ extension FollowingListViewController: UITableViewDelegate, AutoGenerateTableVie
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - UserTableViewCellDelegate
|
// MARK: - UserTableViewCellDelegate
|
||||||
extension FollowingListViewController: UserTableViewCellDelegate {
|
extension FollowingListViewController: UserTableViewCellDelegate {}
|
||||||
func userView(_ view: UserView, didTapButtonWith state: UserView.ButtonState, for user: MastodonUser) {
|
|
||||||
Task {
|
|
||||||
try await DataSourceFacade.responseToUserViewButtonAction(
|
|
||||||
dependency: self,
|
|
||||||
user: user.asRecord,
|
|
||||||
buttonState: state
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -109,14 +109,4 @@ extension FavoritedByViewController: UITableViewDelegate, AutoGenerateTableViewD
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - UserTableViewCellDelegate
|
// MARK: - UserTableViewCellDelegate
|
||||||
extension FavoritedByViewController: UserTableViewCellDelegate {
|
extension FavoritedByViewController: UserTableViewCellDelegate {}
|
||||||
func userView(_ view: UserView, didTapButtonWith state: UserView.ButtonState, for user: MastodonUser) {
|
|
||||||
Task {
|
|
||||||
try await DataSourceFacade.responseToUserViewButtonAction(
|
|
||||||
dependency: self,
|
|
||||||
user: user.asRecord,
|
|
||||||
buttonState: state
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -109,14 +109,4 @@ extension RebloggedByViewController: UITableViewDelegate, AutoGenerateTableViewD
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - UserTableViewCellDelegate
|
// MARK: - UserTableViewCellDelegate
|
||||||
extension RebloggedByViewController: UserTableViewCellDelegate {
|
extension RebloggedByViewController: UserTableViewCellDelegate {}
|
||||||
func userView(_ view: UserView, didTapButtonWith state: UserView.ButtonState, for user: MastodonUser) {
|
|
||||||
Task {
|
|
||||||
try await DataSourceFacade.responseToUserViewButtonAction(
|
|
||||||
dependency: self,
|
|
||||||
user: user.asRecord,
|
|
||||||
buttonState: state
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -124,14 +124,6 @@ extension SearchHistoryViewController: SearchHistorySectionHeaderCollectionReusa
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func userView(_ view: UserView, didTapButtonWith state: UserView.ButtonState, for user: MastodonUser) {
|
|
||||||
Task {
|
|
||||||
try await DataSourceFacade.responseToUserViewButtonAction(
|
|
||||||
dependency: self,
|
|
||||||
user: user.asRecord,
|
|
||||||
buttonState: state
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension SearchHistoryViewController: UserTableViewCellDelegate {}
|
||||||
|
|
|
@ -259,14 +259,4 @@ extension SearchResultViewController: UITableViewDelegate, AutoGenerateTableView
|
||||||
extension SearchResultViewController: StatusTableViewCellDelegate { }
|
extension SearchResultViewController: StatusTableViewCellDelegate { }
|
||||||
|
|
||||||
// MARK: - UserTableViewCellDelegate
|
// MARK: - UserTableViewCellDelegate
|
||||||
extension SearchResultViewController: UserTableViewCellDelegate {
|
extension SearchResultViewController: UserTableViewCellDelegate {}
|
||||||
func userView(_ view: UserView, didTapButtonWith state: UserView.ButtonState, for user: MastodonUser) {
|
|
||||||
Task {
|
|
||||||
try await DataSourceFacade.responseToUserViewButtonAction(
|
|
||||||
dependency: self,
|
|
||||||
user: user.asRecord,
|
|
||||||
buttonState: state
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue