pEpForiOS/UI/EmailDisplay/MessageSubjectCell.swift
author igor <igor@pep-project.org>
Fri, 13 Jan 2017 10:44:06 +0100
changeset 1414 63f17f38ca24
parent 1363 88b4933fe58f
child 1472 0c0cd852f3f3
permissions -rw-r--r--
IOS-382 Fixed
yves@1362
     1
//
yves@1362
     2
//  MessageSubjectCell.swift
yves@1362
     3
//
yves@1362
     4
//  Created by Yves Landert on 21.12.16.
yves@1362
     5
//  Copyright © 2016 appculture AG. All rights reserved.
yves@1362
     6
//
yves@1362
     7
yves@1362
     8
import UIKit
yves@1362
     9
import MessageModel
yves@1362
    10
yves@1362
    11
open class MessageSubjectCell: MessageCell {
yves@1362
    12
    
yves@1363
    13
    let dateFormatter = UIHelper.dateFormatterEmailDetails()
yves@1363
    14
    
yves@1362
    15
    public override func updateCell(_ model: ComposeFieldModel, _ message: Message) {
yves@1362
    16
        fieldModel = model
yves@1363
    17
        titleLabel?.text = message.shortMessage
yves@1362
    18
        
yves@1363
    19
        if let receivedDate = message.received {
yves@1363
    20
            UIHelper.putString(dateFormatter.string(from: receivedDate as Date), toLabel: valueLabel)
yves@1363
    21
        } else {
yves@1363
    22
            UIHelper.putString(nil, toLabel: valueLabel)
yves@1363
    23
        }
yves@1362
    24
    }
yves@1362
    25
}