Fix code quality issues

This commit is contained in:
Benoit Marty 2019-10-09 15:15:15 +02:00
parent 68db9c1cc0
commit eec470f2ce
3 changed files with 9 additions and 8 deletions

View file

@ -665,12 +665,14 @@ internal class KeysBackup @Inject constructor(
} }
} }
} }
Timber.v("restoreKeysWithRecoveryKey: Decrypted ${sessionsData.size} keys out of $sessionsFromHsCount from the backup store on the homeserver") Timber.v("restoreKeysWithRecoveryKey: Decrypted ${sessionsData.size} keys out" +
" of $sessionsFromHsCount from the backup store on the homeserver")
// Do not trigger a backup for them if they come from the backup version we are using // Do not trigger a backup for them if they come from the backup version we are using
val backUp = keysVersionResult.version != keysBackupVersion?.version val backUp = keysVersionResult.version != keysBackupVersion?.version
if (backUp) { if (backUp) {
Timber.v("restoreKeysWithRecoveryKey: Those keys will be backed up to backup version: ${keysBackupVersion?.version}") Timber.v("restoreKeysWithRecoveryKey: Those keys will be backed up" +
" to backup version: ${keysBackupVersion?.version}")
} }
// Import them into the crypto store // Import them into the crypto store

View file

@ -641,8 +641,7 @@ class RoomDetailFragment :
inviteView.callback = this inviteView.callback = this
} }
/* /* private fun onSendChoiceClicked(dialogListItem: DialogListItem) {
private fun onSendChoiceClicked(dialogListItem: DialogListItem) {
Timber.v("On send choice clicked: $dialogListItem") Timber.v("On send choice clicked: $dialogListItem")
when (dialogListItem) { when (dialogListItem) {
is DialogListItem.SendFile -> { is DialogListItem.SendFile -> {
@ -667,8 +666,8 @@ class RoomDetailFragment :
// launchNativeVideoRecorder() // launchNativeVideoRecorder()
} }
} }
} } */
*/
private fun handleMediaIntent(data: Intent) { private fun handleMediaIntent(data: Intent) {
val files: ArrayList<MediaFile> = data.getParcelableArrayListExtra(FilePickerActivity.MEDIA_FILES) val files: ArrayList<MediaFile> = data.getParcelableArrayListExtra(FilePickerActivity.MEDIA_FILES)
roomDetailViewModel.process(RoomDetailActions.SendMedia(files)) roomDetailViewModel.process(RoomDetailActions.SendMedia(files))

View file

@ -407,7 +407,7 @@ class RoomDetailViewModel @AssistedInject constructor(@Assisted initialState: Ro
val quotedTextMsg = StringBuilder() val quotedTextMsg = StringBuilder()
if (messageParagraphs != null) { if (messageParagraphs != null) {
for (i in messageParagraphs.indices) { for (i in messageParagraphs.indices) {
if (messageParagraphs[i].trim { it <= ' ' } != "") { if (messageParagraphs[i].trim() != "") {
quotedTextMsg.append("> ").append(messageParagraphs[i]) quotedTextMsg.append("> ").append(messageParagraphs[i])
} }
@ -759,4 +759,4 @@ class RoomDetailViewModel @AssistedInject constructor(@Assisted initialState: Ro
super.onCleared() super.onCleared()
} }
} }