diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/AttachmentDialog.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/AttachmentDialog.kt index 7f7d75d45..40d291366 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/dialog/AttachmentDialog.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/AttachmentDialog.kt @@ -45,12 +45,10 @@ class AttachmentDialog(val activity: Activity, var chatController: ChatControlle private lateinit var dialogAttachmentBinding: DialogAttachmentBinding - init { - NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) - } - override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) + dialogAttachmentBinding = DialogAttachmentBinding.inflate(layoutInflater) setContentView(dialogAttachmentBinding.root) window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/AudioOutputDialog.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/AudioOutputDialog.kt index a1ffafecf..062cf2849 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/dialog/AudioOutputDialog.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/AudioOutputDialog.kt @@ -47,12 +47,10 @@ class AudioOutputDialog(val callActivity: CallActivity) : BottomSheetDialog(call private lateinit var dialogAudioOutputBinding: DialogAudioOutputBinding - init { - NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) - } - override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) + dialogAudioOutputBinding = DialogAudioOutputBinding.inflate(layoutInflater) setContentView(dialogAudioOutputBinding.root) window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/ContactsBottomDialog.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/ContactsBottomDialog.kt index cedad2eb1..b4bc81478 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/dialog/ContactsBottomDialog.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/ContactsBottomDialog.kt @@ -51,12 +51,10 @@ class ContactsBottomDialog( private lateinit var binding: DialogBottomContactsBinding - init { - NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) - } - override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) + binding = DialogBottomContactsBinding.inflate(layoutInflater) setContentView(binding.root) window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/ConversationsListBottomDialog.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/ConversationsListBottomDialog.kt index 589e60305..a3387912a 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/dialog/ConversationsListBottomDialog.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/ConversationsListBottomDialog.kt @@ -89,12 +89,10 @@ class ConversationsListBottomDialog( @Inject lateinit var userManager: UserManager - init { - NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) - } - override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) + binding = DialogConversationOperationsBinding.inflate(layoutInflater) setContentView(binding.root) window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/MessageActionsDialog.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/MessageActionsDialog.kt index a968d7c3e..173fee7db 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/dialog/MessageActionsDialog.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/MessageActionsDialog.kt @@ -75,12 +75,10 @@ class MessageActionsDialog( private lateinit var popup: EmojiPopup - init { - NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) - } - override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) + dialogMessageActionsBinding = DialogMessageActionsBinding.inflate(layoutInflater) setContentView(dialogMessageActionsBinding.root) window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/ScopeDialog.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/ScopeDialog.kt index ccbbce03b..0f2914139 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/dialog/ScopeDialog.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/ScopeDialog.kt @@ -50,12 +50,10 @@ class ScopeDialog( private lateinit var dialogScopeBinding: DialogScopeBinding - init { - NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) - } - override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) + dialogScopeBinding = DialogScopeBinding.inflate(layoutInflater) setContentView(dialogScopeBinding.root) diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/ShowReactionsDialog.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/ShowReactionsDialog.kt index 4fc04097a..dcba6c2fa 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/dialog/ShowReactionsDialog.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/ShowReactionsDialog.kt @@ -81,12 +81,10 @@ class ShowReactionsDialog( private val tagAll: String? = null - init { - NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) - } - override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + NextcloudTalkApplication.sharedApplication?.componentApplication?.inject(this) + binding = DialogMessageReactionsBinding.inflate(layoutInflater) setContentView(binding.root) window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)