IOS-915 logging to pinpoint the problem
authorDirk Zimmermann <dirk@pep-project.org>
Thu, 01 Feb 2018 11:29:01 +0100
changeset 3866b5901734830a
parent 3865 bbbcc1f7498f
child 3867 4b7a7d407a82
IOS-915 logging to pinpoint the problem
pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
pEpForiOS/Util/SortedSet.swift
     1.1 --- a/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Thu Feb 01 14:29:25 2018 +0100
     1.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Thu Feb 01 11:29:01 2018 +0100
     1.3 @@ -453,18 +453,21 @@
     1.4  
     1.5  extension EmailListViewController: EmailListViewModelDelegate {
     1.6      func emailListViewModel(viewModel: EmailListViewModel, didInsertDataAt indexPath: IndexPath) {
     1.7 +        Log.shared.info(component: #function, content: "\(model?.rowCount ?? 0)")
     1.8          tableView.beginUpdates()
     1.9          tableView.insertRows(at: [indexPath], with: .automatic)
    1.10          tableView.endUpdates()
    1.11      }
    1.12      
    1.13      func emailListViewModel(viewModel: EmailListViewModel, didRemoveDataAt indexPath: IndexPath) {
    1.14 +        Log.shared.info(component: #function, content: "\(model?.rowCount ?? 0)")
    1.15          tableView.beginUpdates()
    1.16          tableView.deleteRows(at: [indexPath], with: .automatic)
    1.17          tableView.endUpdates()
    1.18      }
    1.19      
    1.20      func emailListViewModel(viewModel: EmailListViewModel, didUpdateDataAt indexPath: IndexPath) {
    1.21 +        Log.shared.info(component: #function, content: "\(model?.rowCount ?? 0)")
    1.22          tableView.beginUpdates()
    1.23          tableView.reloadRows(at: [indexPath], with: .none)
    1.24          tableView.endUpdates()
     2.1 --- a/pEpForiOS/Util/SortedSet.swift	Thu Feb 01 14:29:25 2018 +0100
     2.2 +++ b/pEpForiOS/Util/SortedSet.swift	Thu Feb 01 11:29:01 2018 +0100
     2.3 @@ -38,6 +38,7 @@
     2.4  
     2.5          let idx = indexOfObjectIfInserted(obj: object)
     2.6          set.insert(object, at: idx)
     2.7 +        Log.shared.info(component: #function, content: "\(count)")
     2.8          return idx
     2.9      }
    2.10      
    2.11 @@ -46,6 +47,7 @@
    2.12          defer { objc_sync_exit(self) }
    2.13  
    2.14          set.remove(object)
    2.15 +        Log.shared.info(component: #function, content: "\(count)")
    2.16      }
    2.17      
    2.18      public func removeObject(at index: Int) {
    2.19 @@ -57,6 +59,7 @@
    2.20              return
    2.21          }
    2.22          set.removeObject(at: index)
    2.23 +        Log.shared.info(component: #function, content: "\(count)")
    2.24      }
    2.25      
    2.26      public func object(at index: Int) -> T? {
    2.27 @@ -88,6 +91,7 @@
    2.28          defer { objc_sync_exit(self) }
    2.29          
    2.30          set.removeAllObjects()
    2.31 +        Log.shared.info(component: #function, content: "\(count)")
    2.32      }
    2.33  
    2.34      // MARK: -