Skip to content

Commit

Permalink
fix detekt issues
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Scherzinger <[email protected]>
  • Loading branch information
AndyScherzinger committed Nov 8, 2023
1 parent cfd6244 commit 4678a59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ class ChatActivity :
}
} else {
Log.d(TAG, "Downloaded to cache")
downloadFileToCache(message,true ) {
downloadFileToCache(message, true) {
setUpWaveform(message)
}
}
Expand Down Expand Up @@ -4141,13 +4141,13 @@ class ChatActivity :
if (file.exists()) {
share(message)
} else {
downloadFileToCache(message, false ) {
downloadFileToCache(message, false) {
share(message)
}
}
}

private fun saveImage(message: ChatMessage){
private fun saveImage(message: ChatMessage) {
if (permissionUtil.isFilesPermissionGranted()) {
saveImageToStorage(message)
} else {
Expand Down Expand Up @@ -4177,7 +4177,7 @@ class ChatActivity :
if (file.exists()) {
showSaveToStorageWarning(message)
} else {
downloadFileToCache(message ,false) {
downloadFileToCache(message, false) {
showSaveToStorageWarning(message)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ class MessageActionsDialog(
dialogMessageActionsBinding.emojiMore.installForceSingleEmoji()
}



/*
This method is a hacky workaround to avoid bug #1914
As the bug happens only for the very first time when the popup is opened,
Expand Down Expand Up @@ -355,8 +353,8 @@ class MessageActionsDialog(
dialogMessageActionsBinding.menuOpenInNcApp.visibility = getVisibility(visible)
}

private fun initMenuItemSave (visible: Boolean) {
if (visible){
private fun initMenuItemSave(visible: Boolean) {
if (visible) {
dialogMessageActionsBinding.menuSaveMessage.setOnClickListener {
chatActivity.checkIfSaveable(message)
dismiss()
Expand Down

0 comments on commit 4678a59

Please sign in to comment.