mirror of
https://github.com/fromchat-messenger/app.git
synced 2026-09-22 19:15:05 +03:00
Implement server config
This commit is contained in:
@@ -6,9 +6,12 @@ import java.lang.ref.WeakReference
|
||||
actual object UtilsLibrary {
|
||||
private var init = false
|
||||
private lateinit var _context: WeakReference<Context>
|
||||
internal val context get() = _context.get()!!
|
||||
val context get() = _context.get()!!
|
||||
|
||||
actual fun init(vararg args: Any) {
|
||||
_context = WeakReference(args[0] as Context)
|
||||
if (!init) {
|
||||
_context = WeakReference(args[0] as Context)
|
||||
init = true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user