IOS-1494B minor fix, deleting unneeded code and add errorAndCrash to guard IOS-1494B
authorAlejandro Gelos <agp@pep.security>
Fri, 24 May 2019 13:36:49 +0200
branchIOS-1494B
changeset 8753507699db72c2
parent 8741 927cc70c8347
child 8754 6698328eb449
IOS-1494B minor fix, deleting unneeded code and add errorAndCrash to guard
pEpForiOS/UI/EmailDisplay/EmailViewController.swift
pEpForiOS/UI/EmailDisplayList/EmailListViewModel.swift
     1.1 --- a/pEpForiOS/UI/EmailDisplay/EmailViewController.swift	Thu May 23 17:47:11 2019 +0200
     1.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailViewController.swift	Fri May 24 13:36:49 2019 +0200
     1.3 @@ -418,7 +418,10 @@
     1.4      }
     1.5  
     1.6      @IBAction func deleteButtonTapped(_ sender: UIBarButtonItem) {
     1.7 -        guard let message = message else { return }
     1.8 +        guard let message = message else {
     1.9 +            Log.shared.errorAndCrash("No message")
    1.10 +            return
    1.11 +        }
    1.12          Message.imapDelete(messages: [message])
    1.13          delegate?.emailDisplayDidDelete(message: message)
    1.14      }
     2.1 --- a/pEpForiOS/UI/EmailDisplayList/EmailListViewModel.swift	Thu May 23 17:47:11 2019 +0200
     2.2 +++ b/pEpForiOS/UI/EmailDisplayList/EmailListViewModel.swift	Fri May 24 13:36:49 2019 +0200
     2.3 @@ -284,7 +284,7 @@
     2.4      }
     2.5  
     2.6      func delete(forIndexPath indexPath: IndexPath) {
     2.7 -        let _ = deleteMessages(at: [indexPath])
     2.8 +        deleteMessages(at: [indexPath])
     2.9      }
    2.10  
    2.11      func message(representedByRowAt indexPath: IndexPath) -> Message? {