浏览代码

delete deprecated ProfileCell

cyberta 5 年之前
父节点
当前提交
2b62429ca8
共有 2 个文件被更改,包括 0 次插入45 次删除
  1. 0 4
      deltachat-ios.xcodeproj/project.pbxproj
  2. 0 41
      deltachat-ios/View/Cell/ProfileCell.swift

+ 0 - 4
deltachat-ios.xcodeproj/project.pbxproj

@@ -143,7 +143,6 @@
 		AE25F09022807AD800CDEA66 /* AvatarSelectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE25F08F22807AD800CDEA66 /* AvatarSelectionCell.swift */; };
 		AE38B31822672DFC00EC37A1 /* ActionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE38B31722672DFC00EC37A1 /* ActionCell.swift */; };
 		AE39D323249CFC1A007346A1 /* DocumentGalleryController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE39D322249CFC1A007346A1 /* DocumentGalleryController.swift */; };
-		AE406EF0240FF8FF005F7022 /* ProfileCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE406EEF240FF8FF005F7022 /* ProfileCell.swift */; };
 		AE4AEE3522B1030D000AA495 /* PreviewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE4AEE3422B1030D000AA495 /* PreviewController.swift */; };
 		AE52EA19229EB53C00C586C9 /* ContactDetailHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE52EA18229EB53C00C586C9 /* ContactDetailHeader.swift */; };
 		AE52EA20229EB9F000C586C9 /* EditGroupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE52EA1F229EB9F000C586C9 /* EditGroupViewController.swift */; };
@@ -435,7 +434,6 @@
 		AE25F08F22807AD800CDEA66 /* AvatarSelectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AvatarSelectionCell.swift; sourceTree = "<group>"; };
 		AE38B31722672DFC00EC37A1 /* ActionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionCell.swift; sourceTree = "<group>"; };
 		AE39D322249CFC1A007346A1 /* DocumentGalleryController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentGalleryController.swift; sourceTree = "<group>"; };
-		AE406EEF240FF8FF005F7022 /* ProfileCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileCell.swift; sourceTree = "<group>"; };
 		AE4AEE3422B1030D000AA495 /* PreviewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewController.swift; sourceTree = "<group>"; };
 		AE52EA18229EB53C00C586C9 /* ContactDetailHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactDetailHeader.swift; sourceTree = "<group>"; };
 		AE52EA1F229EB9F000C586C9 /* EditGroupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditGroupViewController.swift; sourceTree = "<group>"; };
@@ -864,7 +862,6 @@
 		AE406EEE240FA454005F7022 /* Cell */ = {
 			isa = PBXGroup;
 			children = (
-				AE406EEF240FF8FF005F7022 /* ProfileCell.swift */,
 				AE0AA951247800E700D42A7F /* GalleryCell.swift */,
 				AE8DD450249D1DFB009A4BC1 /* FileTableViewCell.swift */,
 			);
@@ -1363,7 +1360,6 @@
 				305961DC2346125100C80F33 /* MessagesLayoutDelegate.swift in Sources */,
 				3059620A2346125100C80F33 /* TextMessageSizeCalculator.swift in Sources */,
 				78ED839421D5AF8A00243125 /* QrCodeView.swift in Sources */,
-				AE406EF0240FF8FF005F7022 /* ProfileCell.swift in Sources */,
 				305961F02346125100C80F33 /* NSConstraintLayoutSet.swift in Sources */,
 				3059620E234614E700C80F33 /* DcContact+Extension.swift in Sources */,
 				AED423D7249F580700B6B2BB /* BlockedContactsViewController.swift in Sources */,

+ 0 - 41
deltachat-ios/View/Cell/ProfileCell.swift

@@ -1,41 +0,0 @@
-import UIKit
-import DcCore
-
-class ProfileCell: UITableViewCell {
-
-    private let detailView = ContactDetailHeader()
-
-    init(contact: DcContact, displayName: String?, address: String?) {
-        super.init(style: .default, reuseIdentifier: nil)
-        accessoryType = .disclosureIndicator
-        setupSubviews()
-        update(contact: contact, displayName: displayName, address: address)
-        detailView.backgroundColor = .clear
-    }
-
-    required init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    private func setupSubviews() {
-        contentView.addSubview(detailView)
-        detailView.translatesAutoresizingMaskIntoConstraints = false
-        detailView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 0).isActive = true
-        detailView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 0).isActive = true
-        detailView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: 0).isActive = true
-        detailView.trailingAnchor.constraint(equalTo: accessoryView?.trailingAnchor ?? contentView.trailingAnchor, constant: 0).isActive = true
-        let heightConstraint = detailView.heightAnchor.constraint(equalToConstant: ContactDetailHeader.headerHeight)
-        heightConstraint.priority = .defaultLow
-        heightConstraint.isActive = true
-    }
-
-    func update(contact: DcContact, displayName: String?, address: String?) {
-        let email = address ?? contact.email
-        detailView.updateDetails(title: displayName ?? contact.displayName, subtitle: email)
-        if let image = contact.profileImage {
-            detailView.setImage(image)
-        } else {
-            detailView.setBackupImage(name: displayName ?? email, color: contact.color)
-        }
-    }
-}