Преглед на файлове

add comments about shared DcContext instance

cyberta преди 5 години
родител
ревизия
34ed96ec3e
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      deltachat-ios/DC/Wrapper.swift

+ 3 - 0
deltachat-ios/DC/Wrapper.swift

@@ -3,6 +3,8 @@ import UIKit
 import AVFoundation
 
 class DcContext {
+    /// TODO: THIS global instance should be replaced in the future, for example for a multi-account scenario,
+    /// where we want to have more than one DcContext.
     static let dcContext: DcContext = DcContext()
     let contextPointer: OpaquePointer
 
@@ -19,6 +21,7 @@ class DcContext {
         dc_context_unref(contextPointer)
     }
 
+    /// Injection of DcContext is preferred over the usage of the shared variable
     static var shared: DcContext {
         return .dcContext
     }