From bc425bc0d3801e76af3f5f1c076e078f8bd7046e Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Thu, 24 Aug 2023 09:45:57 +0200 Subject: [PATCH] apply changes by ktlintFormat Signed-off-by: Marcel Hibbe --- .../nextcloud/talk/activities/CallActivity.kt | 11 +++++++---- .../java/com/nextcloud/talk/chat/ChatActivity.kt | 16 ++++++++++------ .../conversationinfo/ConversationInfoActivity.kt | 6 ++++-- .../talk/conversationinfo/GuestAccessHelper.kt | 6 ++++-- .../ConversationsListActivity.kt | 7 +++++-- .../nextcloud/talk/jobs/NotificationWorker.kt | 9 +++++---- 6 files changed, 35 insertions(+), 20 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt index 9728225ccf..c86b080c1b 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt @@ -430,7 +430,8 @@ class CallActivity : CallBaseActivity() { Snackbar.make( binding!!.root, context.resources.getString(R.string.record_active_info), - Snackbar.LENGTH_LONG).show() + Snackbar.LENGTH_LONG + ).show() } } else if (viewState is RecordingStartingState) { if (isAllowedToStartOrStopRecording) { @@ -614,9 +615,11 @@ class CallActivity : CallBaseActivity() { callRecordingViewModel!!.clickRecordButton() } } else { - Snackbar.make(binding!!.root, context.resources.getString(R.string.record_active_info), Snackbar - .LENGTH_LONG) - .show() + Snackbar.make( + binding!!.root, + context.resources.getString(R.string.record_active_info), + Snackbar.LENGTH_LONG + ).show() } } binding!!.lowerHandButton.setOnClickListener { l: View? -> raiseHandViewModel!!.lowerHand() } diff --git a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt index 4486144e36..aa4e7ee3be 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt @@ -2366,16 +2366,20 @@ class ChatActivity : } } catch (e: IllegalStateException) { context.resources?.getString(R.string.nc_upload_failed)?.let { - Snackbar.make(binding.root, it, Snackbar - .LENGTH_LONG) - .show() + Snackbar.make( + binding.root, + it, + Snackbar.LENGTH_LONG + ).show() } Log.e(javaClass.simpleName, "Something went wrong when trying to upload file", e) } catch (e: IllegalArgumentException) { context.resources?.getString(R.string.nc_upload_failed)?.let { - Snackbar.make(binding.root, it, Snackbar - .LENGTH_LONG) - .show() + Snackbar.make( + binding.root, + it, + Snackbar.LENGTH_LONG + ).show() } Log.e(javaClass.simpleName, "Something went wrong when trying to upload file", e) } diff --git a/app/src/main/java/com/nextcloud/talk/conversationinfo/ConversationInfoActivity.kt b/app/src/main/java/com/nextcloud/talk/conversationinfo/ConversationInfoActivity.kt index 09803559db..631db4239f 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationinfo/ConversationInfoActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationinfo/ConversationInfoActivity.kt @@ -594,9 +594,11 @@ class ConversationInfoActivity : } override fun onNext(genericOverall: GenericOverall) { - Snackbar.make(binding.root, + Snackbar.make( + binding.root, context.getString(R.string.nc_clear_history_success), - Snackbar.LENGTH_LONG).show() + Snackbar.LENGTH_LONG + ).show() } override fun onError(e: Throwable) { diff --git a/app/src/main/java/com/nextcloud/talk/conversationinfo/GuestAccessHelper.kt b/app/src/main/java/com/nextcloud/talk/conversationinfo/GuestAccessHelper.kt index b0c6aa6656..4ec42f0ea7 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationinfo/GuestAccessHelper.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationinfo/GuestAccessHelper.kt @@ -151,9 +151,11 @@ class GuestAccessHelper( override fun onComplete() { if (resendInvitationsResult.successful) { - Snackbar.make(binding.root, + Snackbar.make( + binding.root, R.string.nc_guest_access_resend_invitations_successful, - Snackbar.LENGTH_SHORT).show() + Snackbar.LENGTH_SHORT + ).show() } } } diff --git a/app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt b/app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt index 9d07a2d80e..ce2766d6a9 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt @@ -1179,8 +1179,11 @@ class ConversationsListActivity : Log.d(TAG, "upload starting after permissions were granted") showSendFilesConfirmDialog() } else { - Snackbar.make(binding.root, context.getString(R.string.read_storage_no_permission), Snackbar.LENGTH_LONG) - .show() + Snackbar.make( + binding.root, + context.getString(R.string.read_storage_no_permission), + Snackbar.LENGTH_LONG + ).show() } } } diff --git a/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.kt b/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.kt index 44c7407d61..59a5a441a7 100644 --- a/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.kt +++ b/app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.kt @@ -329,8 +329,11 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor Log.e(TAG, "Failed to get NC notification", e) if (BuildConfig.DEBUG) { Handler(Looper.getMainLooper()).post { - Snackbar.make(View(applicationContext), "Failed to get NC notification", Snackbar - .LENGTH_LONG).show() + Snackbar.make( + View(applicationContext), + "Failed to get NC notification", + Snackbar.LENGTH_LONG + ).show() } } } @@ -744,7 +747,6 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor Manifest.permission.POST_NOTIFICATIONS ) != PackageManager.PERMISSION_GRANTED ) { - // here to request the missing permissions, and then overriding // public void onRequestPermissionsResult(int requestCode, String[] permissions, // int[] grantResults) @@ -925,7 +927,6 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor Manifest.permission.POST_NOTIFICATIONS ) != PackageManager.PERMISSION_GRANTED ) { - // here to request the missing permissions, and then overriding // public void onRequestPermissionsResult(int requestCode, String[] permissions, // int[] grantResults)