delete comments

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2025-07-17 15:07:28 +02:00
parent 1c985cca67
commit 993cf0a8db
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
7 changed files with 6 additions and 75 deletions

View File

@ -146,10 +146,10 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
binding.messageAuthor.visibility = View.GONE
}
binding.messageText.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize)
// binding.messageText.text = processedMessageText
binding.messageText.text = processedMessageText
// just for debugging:
binding.messageText.text =
SpannableStringBuilder(processedMessageText).append(" (" + message.jsonMessageId + ")")
// binding.messageText.text =
// SpannableStringBuilder(processedMessageText).append(" (" + message.jsonMessageId + ")")
} else {
binding.messageText.visibility = View.GONE
binding.checkboxContainer.visibility = View.VISIBLE

View File

@ -160,10 +160,10 @@ class OutcomingTextMessageViewHolder(itemView: View) :
binding.messageTime.layoutParams = layoutParams
viewThemeUtils.platform.colorTextView(binding.messageText, ColorRole.ON_SURFACE_VARIANT)
// binding.messageText.text = processedMessageText
binding.messageText.text = processedMessageText
// just for debugging:
binding.messageText.text =
SpannableStringBuilder(processedMessageText).append(" (" + message.jsonMessageId + ")")
// binding.messageText.text =
// SpannableStringBuilder(processedMessageText).append(" (" + message.jsonMessageId + ")")
} else {
binding.messageText.visibility = View.GONE
binding.checkboxContainer.visibility = View.VISIBLE

View File

@ -145,7 +145,6 @@ class OfflineFirstChatRepository @Inject constructor(
Log.d(TAG, "conversationModel.internalId: " + conversationModel.internalId)
Log.d(TAG, "conversationModel.lastReadMessage:" + conversationModel.lastReadMessage)
// var newestMessageIdFromDb = chatDao.getNewestMessageId(internalConversationId, threadId)
var newestMessageIdFromDb = chatBlocksDao.getNewestMessageIdFromChatBlocks(internalConversationId, threadId)
Log.d(TAG, "newestMessageIdFromDb: $newestMessageIdFromDb")

View File

@ -20,33 +20,6 @@ interface ChatBlocksDao {
@Delete
fun deleteChatBlocks(blocks: List<ChatBlockEntity>)
// @Query(
// """
// SELECT *
// FROM ChatBlocks
// WHERE internalConversationId in (:internalConversationId)
// ORDER BY newestMessageId ASC
// """
// )
// fun getChatBlocks(
// internalConversationId: String
// ): Flow<List<ChatBlockEntity>>
// @Query(
// """
// SELECT *
// FROM ChatBlocks
// WHERE internalConversationId in (:internalConversationId)
// AND newestMessageId >= :messageId
// ORDER BY newestMessageId ASC
// """
// )
// fun getChatBlocksThatReachMessageId(
// internalConversationId: String,
// messageId: Long
// ):
// Flow<List<ChatBlockEntity>>
@Query(
"""
SELECT *

View File

@ -18,20 +18,6 @@ import kotlinx.coroutines.flow.Flow
@Dao
@Suppress("Detekt.TooManyFunctions")
interface ChatMessagesDao {
// @Query(
// """
// SELECT MAX(id) as max_items
// FROM ChatMessages
// WHERE internalConversationId = :internalConversationId
// AND isTemporary = 0
// AND (:threadId IS NULL OR threadId = :threadId)
// """
// )
// fun getNewestMessageId(
// internalConversationId: String,
// threadId: Long?
// ): Long
@Query(
"""
SELECT *

View File

@ -267,19 +267,3 @@ fun ErrorView(message: String) {
Text(text = message, color = MaterialTheme.colorScheme.error)
}
}
// @Preview(showBackground = true)
// @Composable
// fun PreviewLoadingIndicator() {
// MaterialTheme {
// LoadingIndicator()
// }
// }
//
// @Preview(showBackground = true)
// @Composable
// fun PreviewErrorView() {
// MaterialTheme {
// ErrorView("This is a preview error message.")
// }
// }

View File

@ -23,11 +23,6 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flowOf
class DummyChatMessagesDaoImpl : ChatMessagesDao {
// override fun getNewestMessageId(
// internalConversationId: String,
// threadId: Long?
// ): Long = 0L
override fun getMessagesForConversation(internalConversationId: String): Flow<List<ChatMessageEntity>> = flowOf()
override fun getTempMessagesForConversation(internalConversationId: String): Flow<List<ChatMessageEntity>> =
@ -209,10 +204,6 @@ class DummyConversationDaoImpl : ConversationsDao {
class DummyChatBlocksDaoImpl : ChatBlocksDao {
override fun deleteChatBlocks(blocks: List<ChatBlockEntity>) { /* */ }
// override fun getChatBlocks(
// internalConversationId: String
// ): Flow<List<ChatBlockEntity>> = flowOf()
override fun getChatBlocksContainingMessageId(
internalConversationId: String,
threadId: Long?,
@ -230,7 +221,5 @@ class DummyChatBlocksDaoImpl : ChatBlocksDao {
override suspend fun upsertChatBlock(chatBlock: ChatBlockEntity) { /* */ }
// override fun clearChatBlocksForUser(pattern: String) { /* */ }
override fun deleteChatBlocksOlderThan(internalConversationId: String, messageId: Long) { /* */ }
}