|
@@ -33,7 +33,7 @@ import com.nextcloud.talk.components.filebrowser.controllers.BrowserController
|
|
import com.nextcloud.talk.controllers.ChatController
|
|
import com.nextcloud.talk.controllers.ChatController
|
|
|
|
|
|
|
|
|
|
-class AttachmentDialog(val activity: Activity, var chatController :ChatController) : BottomSheetDialog(activity) {
|
|
|
|
|
|
+class AttachmentDialog(val activity: Activity, var chatController: ChatController) : BottomSheetDialog(activity) {
|
|
|
|
|
|
@BindView(R.id.txt_attach_file_from_local)
|
|
@BindView(R.id.txt_attach_file_from_local)
|
|
@JvmField
|
|
@JvmField
|
|
@@ -49,11 +49,17 @@ class AttachmentDialog(val activity: Activity, var chatController :ChatControlle
|
|
super.onCreate(savedInstanceState)
|
|
super.onCreate(savedInstanceState)
|
|
val view = layoutInflater.inflate(R.layout.dialog_attachment, null)
|
|
val view = layoutInflater.inflate(R.layout.dialog_attachment, null)
|
|
setContentView(view)
|
|
setContentView(view)
|
|
-
|
|
|
|
window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
|
window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
|
-
|
|
|
|
unbinder = ButterKnife.bind(this, view)
|
|
unbinder = ButterKnife.bind(this, view)
|
|
|
|
|
|
|
|
+ var serverName = chatController.conversationUser?.serverName
|
|
|
|
+ attachFromCloud?.text = chatController.resources?.let {
|
|
|
|
+ if(serverName.isNullOrEmpty()){
|
|
|
|
+ serverName = it.getString(R.string.nc_server_product_name)
|
|
|
|
+ }
|
|
|
|
+ String.format(it.getString(R.string.nc_upload_from_cloud), serverName)
|
|
|
|
+ }
|
|
|
|
+
|
|
attachFromLocal?.setOnClickListener {
|
|
attachFromLocal?.setOnClickListener {
|
|
chatController.sendSelectLocalFileIntent()
|
|
chatController.sendSelectLocalFileIntent()
|
|
dismiss()
|
|
dismiss()
|