Apply automated ktlint 1.2.1 formatting.

This commit is contained in:
Nicholas Tinsley
2024-05-15 21:57:46 -04:00
committed by Clark Chen
parent e861c022da
commit cfb4377de3
39 changed files with 190 additions and 60 deletions

View File

@@ -145,7 +145,8 @@ class DebugLogsPromptDialogFragment : FixedRoundedCornerBottomSheetDialogFragmen
enum class Purpose(val serialized: Int) {
NOTIFICATIONS(1), CRASH(2);
NOTIFICATIONS(1),
CRASH(2);
companion object {
fun deserialize(serialized: Int): Purpose {

View File

@@ -60,7 +60,10 @@ class ContextMenuList(recyclerView: RecyclerView, onItemClick: () -> Unit) {
}
private enum class DisplayType {
TOP, BOTTOM, MIDDLE, ONLY
TOP,
BOTTOM,
MIDDLE,
ONLY
}
private class ItemViewHolder(

View File

@@ -114,11 +114,13 @@ class SignalContextMenu private constructor(
}
enum class HorizontalPosition {
START, END
START,
END
}
enum class VerticalPosition {
ABOVE, BELOW
ABOVE,
BELOW
}
/**

View File

@@ -117,7 +117,7 @@ class ClickPreferenceViewHolder(itemView: View) : PreferenceViewHolder<ClickPref
class LongClickPreferenceViewHolder(itemView: View) : PreferenceViewHolder<LongClickPreference>(itemView) {
override fun bind(model: LongClickPreference) {
super.bind(model)
itemView.setOnLongClickListener() {
itemView.setOnLongClickListener {
model.onLongClick()
true
}

View File

@@ -355,11 +355,18 @@ class InternalBackupPlaygroundViewModel : ViewModel() {
)
enum class BackupState(val inProgress: Boolean = false) {
NONE, EXPORT_IN_PROGRESS(true), EXPORT_DONE, BACKUP_JOB_DONE, IMPORT_IN_PROGRESS(true)
NONE,
EXPORT_IN_PROGRESS(true),
EXPORT_DONE,
BACKUP_JOB_DONE,
IMPORT_IN_PROGRESS(true)
}
enum class BackupUploadState(val inProgress: Boolean = false) {
NONE, UPLOAD_IN_PROGRESS(true), UPLOAD_DONE, UPLOAD_FAILED
NONE,
UPLOAD_IN_PROGRESS(true),
UPLOAD_DONE,
UPLOAD_FAILED
}
sealed class RemoteBackupState {

View File

@@ -17,6 +17,7 @@ data class UsernameLinkSettingsState(
val indeterminateProgress: Boolean = false
) {
enum class ActiveTab {
Code, Scan
Code,
Scan
}
}

View File

@@ -817,7 +817,13 @@ class ConversationSettingsFragment : DSLSettingsFragment(
else -> R.string.ConversationSettingsFragment__block
}
val titleTint = if (isBlocked) null else if (state.isDeprecatedOrUnregistered) alertDisabledTint else alertTint
val titleTint = if (isBlocked) {
null
} else if (state.isDeprecatedOrUnregistered) {
alertDisabledTint
} else {
alertTint
}
clickPref(
title = if (titleTint != null) DSLSettingsText.from(title, titleTint) else DSLSettingsText.from(title),

View File

@@ -1,4 +1,4 @@
@file:Suppress("ktlint:filename")
@file:Suppress("ktlint:standard:filename")
package org.thoughtcrime.securesms.components.settings

View File

@@ -375,6 +375,7 @@ data class CallParticipantsState(
}
enum class SelectedPage {
GRID, FOCUSED
GRID,
FOCUSED
}
}