Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(swift-ios): copy thread metadata from row menus #8622

Mergedsaphid(GitHub profile, opens in a new tab)merged 7 commits intot3code/rebuild-mobile-app-swift fromrefs/pull/8622/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 5 changed files with 192 additions and 4 deletions (loading 2).

x
0 of 5 viewed, 5 left
34 additions and 3 deletionsapps/swift-ios/Features/Workspace/HomeThreadCollectionView.swiftModified
View file
@@ -276,13 +276,19 @@
contextMenuConfigurationForItemAt indexPath: IndexPath,
point: CGPoint
) -> UIContextMenuConfiguration? {
- guard case let .thread(thread, _, _, isArchived, _, _) = item(at: indexPath) else {
+ guard case let .thread(thread, context, _, isArchived, _, _) = item(at: indexPath) else {
return nil
​
return UIContextMenuConfiguration(identifier: nil, previewProvider: nil) { [weak self] _ in
guard let self else { return nil }
- return UIMenu(children: self.menuActions(for: thread, isArchived: isArchived))
+ return UIMenu(
+ children: self.menuActions(
+ for: thread,
+ context: context,
+ isArchived: isArchived
+ )
+ )
​
@@ -654,7 +660,11 @@
​
- private func menuActions(for thread: FeatureThread, isArchived: Bool) -> [UIMenuElement] {
+ private func menuActions(
+ for thread: FeatureThread,