Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBAndrews committed Jan 22, 2024
1 parent d8e8011 commit 43a770d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ extension CommunityModel {
}

func menuFunctions(
_ callback: @escaping (_ item: Self) -> Void = { _ in },
editorTracker: EditorTracker? = nil,
postTracker: StandardPostTracker? = nil
postTracker: StandardPostTracker? = nil,
_ callback: @escaping (_ item: Self) -> Void = { _ in }
) -> [MenuFunction] {
var functions: [MenuFunction] = .init()
if let editorTracker {
Expand Down
3 changes: 1 addition & 2 deletions Mlem/Views/Tabs/Feeds/Feed Types/CommunityFeedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,9 @@ struct CommunityFeedView: View {
ToolbarItemGroup(placement: .secondaryAction) {
ForEach(
communityModel.menuFunctions(
{ communityModel = $0 },
editorTracker: editorTracker,
postTracker: postTracker
)
) { communityModel = $0 }
) { menuFunction in
MenuButton(menuFunction: menuFunction, confirmDestructive: confirmDestructive)
}
Expand Down
6 changes: 3 additions & 3 deletions Mlem/Views/Tabs/Search/Results/CommunityResultView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// Created by Sjmarf on 18/09/2023.
//

import SwiftUI
import Dependencies
import SwiftUI

struct CommunityResultView: View {
@Dependency(\.apiClient) private var apiClient
Expand Down Expand Up @@ -139,8 +139,8 @@ struct CommunityResultView: View {
.contextMenu {
ForEach(
community.menuFunctions(
trackerCallback,
editorTracker: editorTracker
editorTracker: editorTracker,
trackerCallback
)
) { item in
MenuButton(menuFunction: item, confirmDestructive: confirmDestructive)
Expand Down

0 comments on commit 43a770d

Please sign in to comment.