@@ -98,6 +96,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView {
overridefunonDestroyView(){
presenter.unsubscribeMessages()
handler.removeCallbacksAndMessages(null)
super.onDestroyView()
}
...
...
@@ -144,7 +143,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView {
})
}
}
adapter.addDataSet(dataSet)
}
}
...
...
@@ -156,23 +154,12 @@ class ChatRoomFragment : Fragment(), ChatRoomView {
}
overridefunuploadFile(uri:Uri){
activity?.apply{
valfileName=uri.getFileName(this)
valmimeType=uri.getMimeType(this)
valfileRealPath=uri.getRealPathFromURI(this)
if(fileName!=null&&fileRealPath!=null){
presenter.uploadFile(
chatRoomId,
File(fileRealPath),
mimeType,
"",// TODO Just leaving it for now, in the future lets add the possibility to add a message with the file to be uploaded.
fileName.toString()
)
}
}
// TODO Just leaving a blank message that comes with the file for now. In the future lets add the possibility to add a message with the file to be uploaded.