Skip to content

Commit

Permalink
apply changes by ktlintFormat
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
  • Loading branch information
mahibi committed Aug 24, 2023
1 parent 68bf1ba commit bc425bc
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 20 deletions.
11 changes: 7 additions & 4 deletions app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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() }
Expand Down
16 changes: 10 additions & 6 deletions app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bc425bc

Please sign in to comment.