mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 04:29:45 +01:00
reformat kotlin code
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
b532e823a1
commit
45ed897c34
@ -615,7 +615,11 @@ class ChatController(args: Bundle) :
|
|||||||
|
|
||||||
private fun checkReadOnlyState() {
|
private fun checkReadOnlyState() {
|
||||||
if (currentConversation != null) {
|
if (currentConversation != null) {
|
||||||
if (currentConversation?.shouldShowLobby(conversationUser) ?: false || currentConversation?.conversationReadOnlyState != null && currentConversation?.conversationReadOnlyState == Conversation.ConversationReadOnlyState.CONVERSATION_READ_ONLY) {
|
if (currentConversation?.shouldShowLobby(conversationUser) ?: false ||
|
||||||
|
currentConversation?.conversationReadOnlyState != null &&
|
||||||
|
currentConversation?.conversationReadOnlyState ==
|
||||||
|
Conversation.ConversationReadOnlyState.CONVERSATION_READ_ONLY
|
||||||
|
) {
|
||||||
|
|
||||||
conversationVoiceCallMenuItem?.icon?.alpha = 99
|
conversationVoiceCallMenuItem?.icon?.alpha = 99
|
||||||
conversationVideoMenuItem?.icon?.alpha = 99
|
conversationVideoMenuItem?.icon?.alpha = 99
|
||||||
@ -745,7 +749,10 @@ class ChatController(args: Bundle) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
|
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
|
||||||
if (requestCode == UploadAndShareFilesWorker.REQUEST_PERMISSION && grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
if (requestCode == UploadAndShareFilesWorker.REQUEST_PERMISSION &&
|
||||||
|
grantResults.isNotEmpty() &&
|
||||||
|
grantResults[0] == PackageManager.PERMISSION_GRANTED
|
||||||
|
) {
|
||||||
Log.d(ConversationsListController.TAG, "upload starting after permissions were granted")
|
Log.d(ConversationsListController.TAG, "upload starting after permissions were granted")
|
||||||
uploadFiles(filesToUpload)
|
uploadFiles(filesToUpload)
|
||||||
} else {
|
} else {
|
||||||
@ -843,10 +850,11 @@ class ChatController(args: Bundle) :
|
|||||||
super.onAttach(view)
|
super.onAttach(view)
|
||||||
eventBus?.register(this)
|
eventBus?.register(this)
|
||||||
|
|
||||||
if (conversationUser?.userId != "?" && conversationUser?.hasSpreedFeatureCapability("mention-flag") ?: false && activity != null) {
|
if (conversationUser?.userId != "?" &&
|
||||||
activity?.findViewById<View>(R.id.toolbar)?.setOnClickListener { v ->
|
conversationUser?.hasSpreedFeatureCapability("mention-flag") ?: false &&
|
||||||
showConversationInfoScreen()
|
activity != null
|
||||||
}
|
) {
|
||||||
|
activity?.findViewById<View>(R.id.toolbar)?.setOnClickListener { v -> showConversationInfoScreen() }
|
||||||
}
|
}
|
||||||
|
|
||||||
isLeavingForConversation = false
|
isLeavingForConversation = false
|
||||||
@ -1373,7 +1381,11 @@ class ChatController(args: Bundle) :
|
|||||||
chatMessage.isLinkPreviewAllowed = isLinkPreviewAllowed
|
chatMessage.isLinkPreviewAllowed = isLinkPreviewAllowed
|
||||||
|
|
||||||
val shouldScroll =
|
val shouldScroll =
|
||||||
!isThereANewNotice && !shouldAddNewMessagesNotice && layoutManager?.findFirstVisibleItemPosition() == 0 || adapter != null && adapter?.itemCount == 0
|
!isThereANewNotice &&
|
||||||
|
!shouldAddNewMessagesNotice &&
|
||||||
|
layoutManager?.findFirstVisibleItemPosition() == 0 ||
|
||||||
|
adapter != null &&
|
||||||
|
adapter?.itemCount == 0
|
||||||
|
|
||||||
if (!shouldAddNewMessagesNotice && !shouldScroll && popupBubble != null) {
|
if (!shouldAddNewMessagesNotice && !shouldScroll && popupBubble != null) {
|
||||||
if (!popupBubble!!.isShown) {
|
if (!popupBubble!!.isShown) {
|
||||||
|
@ -75,7 +75,8 @@ class UploadAndShareFilesWorker(val context: Context, workerParameters: WorkerPa
|
|||||||
|
|
||||||
if (!isStoragePermissionGranted(context)) {
|
if (!isStoragePermissionGranted(context)) {
|
||||||
Log.w(
|
Log.w(
|
||||||
TAG, "Storage permission is not granted. As a developer please make sure you check for" +
|
TAG,
|
||||||
|
"Storage permission is not granted. As a developer please make sure you check for" +
|
||||||
"permissions via UploadAndShareFilesWorker.isStoragePermissionGranted() and " +
|
"permissions via UploadAndShareFilesWorker.isStoragePermissionGranted() and " +
|
||||||
"UploadAndShareFilesWorker.requestStoragePermission() beforehand. If you already " +
|
"UploadAndShareFilesWorker.requestStoragePermission() beforehand. If you already " +
|
||||||
"did but end up with this warning, the user most likely revoked the permission"
|
"did but end up with this warning, the user most likely revoked the permission"
|
||||||
|
Loading…
Reference in New Issue
Block a user