Skip to content

Commit

Permalink
ktlintFormat
Browse files Browse the repository at this point in the history
Signed-off-by: sowjanyakch <[email protected]>
  • Loading branch information
sowjanyakch committed Nov 28, 2024
1 parent 166955e commit 6c2a8d3
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ class ParticipantItem(
}

if (model.invitedActorId?.isNotEmpty() == true &&
ConversationUtils.isParticipantOwnerOrModerator(conversation)) {
ConversationUtils.isParticipantOwnerOrModerator(conversation)
) {
holder.binding.conversationInfoStatusMessage.text = model.invitedActorId
alignUsernameVertical(holder, 0f)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedA
import com.nextcloud.talk.chat.ChatActivity
import com.nextcloud.talk.chat.data.model.ChatMessage
import com.nextcloud.talk.databinding.ItemCustomIncomingDeckCardMessageBinding
import com.nextcloud.talk.extensions.loadBotsAvatar
import com.nextcloud.talk.extensions.loadChangelogBotAvatar
import com.nextcloud.talk.extensions.loadFederatedUserAvatar
import com.nextcloud.talk.ui.theme.ViewThemeUtils
import com.nextcloud.talk.utils.ApiUtils
import com.nextcloud.talk.utils.ChatMessageUtils
Expand Down Expand Up @@ -122,6 +119,7 @@ class IncomingDeckCardViewHolder(incomingView: View, payload: Any) : MessageHold
)
}

@SuppressLint("StringFormatInvalid")
private fun showDeckCard(message: ChatMessage) {
if (message.messageParameters != null && message.messageParameters!!.size > 0) {
for (key in message.messageParameters!!.keys) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedA
import com.nextcloud.talk.chat.ChatActivity
import com.nextcloud.talk.chat.data.model.ChatMessage
import com.nextcloud.talk.databinding.ItemCustomIncomingLinkPreviewMessageBinding
import com.nextcloud.talk.extensions.loadBotsAvatar
import com.nextcloud.talk.extensions.loadChangelogBotAvatar
import com.nextcloud.talk.extensions.loadFederatedUserAvatar
import com.nextcloud.talk.ui.theme.ViewThemeUtils
import com.nextcloud.talk.utils.ApiUtils
import com.nextcloud.talk.utils.ChatMessageUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedA
import com.nextcloud.talk.chat.ChatActivity
import com.nextcloud.talk.chat.data.model.ChatMessage
import com.nextcloud.talk.databinding.ItemCustomIncomingPollMessageBinding
import com.nextcloud.talk.extensions.loadBotsAvatar
import com.nextcloud.talk.extensions.loadChangelogBotAvatar
import com.nextcloud.talk.extensions.loadFederatedUserAvatar
import com.nextcloud.talk.polls.ui.PollMainDialogFragment
import com.nextcloud.talk.ui.theme.ViewThemeUtils
import com.nextcloud.talk.utils.ApiUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedA
import com.nextcloud.talk.chat.ChatActivity
import com.nextcloud.talk.chat.data.model.ChatMessage
import com.nextcloud.talk.databinding.ItemCustomIncomingTextMessageBinding
import com.nextcloud.talk.extensions.loadBotsAvatar
import com.nextcloud.talk.extensions.loadChangelogBotAvatar
import com.nextcloud.talk.extensions.loadDefaultAvatar
import com.nextcloud.talk.extensions.loadFederatedUserAvatar
import com.nextcloud.talk.extensions.loadFirstLetterAvatar
import com.nextcloud.talk.ui.theme.ViewThemeUtils
import com.nextcloud.talk.utils.ApiUtils
import com.nextcloud.talk.utils.ChatMessageUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ import com.nextcloud.talk.application.NextcloudTalkApplication.Companion.sharedA
import com.nextcloud.talk.chat.ChatActivity
import com.nextcloud.talk.chat.data.model.ChatMessage
import com.nextcloud.talk.databinding.ItemCustomIncomingVoiceMessageBinding
import com.nextcloud.talk.extensions.loadBotsAvatar
import com.nextcloud.talk.extensions.loadChangelogBotAvatar
import com.nextcloud.talk.extensions.loadFederatedUserAvatar
import com.nextcloud.talk.ui.theme.ViewThemeUtils
import com.nextcloud.talk.utils.ApiUtils
import com.nextcloud.talk.utils.ChatMessageUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class ListOpenConversationsActivity : BaseActivity() {
}
binding.searchEdit.doOnTextChanged { text, _, _, count ->
adapter.filter(text.toString())
if(text.toString().isNotEmpty() && searching){
if (text.toString().isNotEmpty() && searching) {
binding.clearSearchButton.visibility = View.VISIBLE
}else{
} else {
binding.clearSearchButton.visibility = View.GONE
}
}
Expand All @@ -98,10 +98,10 @@ class ListOpenConversationsActivity : BaseActivity() {
}
}

private fun showOrHideClearButton(){
private fun showOrHideClearButton() {
if (!binding.searchEdit.text.isNullOrEmpty()) {
binding.clearSearchButton.visibility = View.VISIBLE
}else{
} else {
binding.clearSearchButton.visibility = View.GONE
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import com.nextcloud.talk.ui.theme.ViewThemeUtils

class ChatMessageUtils {

fun setAvatarOnMessage(view: ImageView, message: ChatMessage, viewThemeUtils : ViewThemeUtils) {
fun setAvatarOnMessage(view: ImageView, message: ChatMessage, viewThemeUtils: ViewThemeUtils) {
view.visibility = View.VISIBLE
if (message.actorType == "guests" || message.actorType == "emails") {
if (message.actorDisplayName?.isNotEmpty() == true) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,11 @@ class AppPreferencesImpl(val context: Context) : AppPreferences {
}

override fun getShowNotificationWarning(): Boolean {
return runBlocking { async {
readBoolean(SHOW_NOTIFICATION_WARNING, true).first()
} }.getCompleted()
return runBlocking {
async {
readBoolean(SHOW_NOTIFICATION_WARNING, true).first()
}
}.getCompleted()
}

override fun setShowNotificationWarning(showNotificationWarning: Boolean) =
Expand Down

0 comments on commit 6c2a8d3

Please sign in to comment.