mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-25 05:35:39 +01:00
delete comments
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
1c985cca67
commit
993cf0a8db
@ -146,10 +146,10 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
|
|||||||
binding.messageAuthor.visibility = View.GONE
|
binding.messageAuthor.visibility = View.GONE
|
||||||
}
|
}
|
||||||
binding.messageText.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize)
|
binding.messageText.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize)
|
||||||
// binding.messageText.text = processedMessageText
|
binding.messageText.text = processedMessageText
|
||||||
// just for debugging:
|
// just for debugging:
|
||||||
binding.messageText.text =
|
// binding.messageText.text =
|
||||||
SpannableStringBuilder(processedMessageText).append(" (" + message.jsonMessageId + ")")
|
// SpannableStringBuilder(processedMessageText).append(" (" + message.jsonMessageId + ")")
|
||||||
} else {
|
} else {
|
||||||
binding.messageText.visibility = View.GONE
|
binding.messageText.visibility = View.GONE
|
||||||
binding.checkboxContainer.visibility = View.VISIBLE
|
binding.checkboxContainer.visibility = View.VISIBLE
|
||||||
|
@ -160,10 +160,10 @@ class OutcomingTextMessageViewHolder(itemView: View) :
|
|||||||
|
|
||||||
binding.messageTime.layoutParams = layoutParams
|
binding.messageTime.layoutParams = layoutParams
|
||||||
viewThemeUtils.platform.colorTextView(binding.messageText, ColorRole.ON_SURFACE_VARIANT)
|
viewThemeUtils.platform.colorTextView(binding.messageText, ColorRole.ON_SURFACE_VARIANT)
|
||||||
// binding.messageText.text = processedMessageText
|
binding.messageText.text = processedMessageText
|
||||||
// just for debugging:
|
// just for debugging:
|
||||||
binding.messageText.text =
|
// binding.messageText.text =
|
||||||
SpannableStringBuilder(processedMessageText).append(" (" + message.jsonMessageId + ")")
|
// SpannableStringBuilder(processedMessageText).append(" (" + message.jsonMessageId + ")")
|
||||||
} else {
|
} else {
|
||||||
binding.messageText.visibility = View.GONE
|
binding.messageText.visibility = View.GONE
|
||||||
binding.checkboxContainer.visibility = View.VISIBLE
|
binding.checkboxContainer.visibility = View.VISIBLE
|
||||||
|
@ -145,7 +145,6 @@ class OfflineFirstChatRepository @Inject constructor(
|
|||||||
Log.d(TAG, "conversationModel.internalId: " + conversationModel.internalId)
|
Log.d(TAG, "conversationModel.internalId: " + conversationModel.internalId)
|
||||||
Log.d(TAG, "conversationModel.lastReadMessage:" + conversationModel.lastReadMessage)
|
Log.d(TAG, "conversationModel.lastReadMessage:" + conversationModel.lastReadMessage)
|
||||||
|
|
||||||
// var newestMessageIdFromDb = chatDao.getNewestMessageId(internalConversationId, threadId)
|
|
||||||
var newestMessageIdFromDb = chatBlocksDao.getNewestMessageIdFromChatBlocks(internalConversationId, threadId)
|
var newestMessageIdFromDb = chatBlocksDao.getNewestMessageIdFromChatBlocks(internalConversationId, threadId)
|
||||||
Log.d(TAG, "newestMessageIdFromDb: $newestMessageIdFromDb")
|
Log.d(TAG, "newestMessageIdFromDb: $newestMessageIdFromDb")
|
||||||
|
|
||||||
|
@ -20,33 +20,6 @@ interface ChatBlocksDao {
|
|||||||
@Delete
|
@Delete
|
||||||
fun deleteChatBlocks(blocks: List<ChatBlockEntity>)
|
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(
|
@Query(
|
||||||
"""
|
"""
|
||||||
SELECT *
|
SELECT *
|
||||||
|
@ -18,20 +18,6 @@ import kotlinx.coroutines.flow.Flow
|
|||||||
@Dao
|
@Dao
|
||||||
@Suppress("Detekt.TooManyFunctions")
|
@Suppress("Detekt.TooManyFunctions")
|
||||||
interface ChatMessagesDao {
|
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(
|
@Query(
|
||||||
"""
|
"""
|
||||||
SELECT *
|
SELECT *
|
||||||
|
@ -267,19 +267,3 @@ fun ErrorView(message: String) {
|
|||||||
Text(text = message, color = MaterialTheme.colorScheme.error)
|
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.")
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
@ -23,11 +23,6 @@ import kotlinx.coroutines.flow.Flow
|
|||||||
import kotlinx.coroutines.flow.flowOf
|
import kotlinx.coroutines.flow.flowOf
|
||||||
|
|
||||||
class DummyChatMessagesDaoImpl : ChatMessagesDao {
|
class DummyChatMessagesDaoImpl : ChatMessagesDao {
|
||||||
// override fun getNewestMessageId(
|
|
||||||
// internalConversationId: String,
|
|
||||||
// threadId: Long?
|
|
||||||
// ): Long = 0L
|
|
||||||
|
|
||||||
override fun getMessagesForConversation(internalConversationId: String): Flow<List<ChatMessageEntity>> = flowOf()
|
override fun getMessagesForConversation(internalConversationId: String): Flow<List<ChatMessageEntity>> = flowOf()
|
||||||
|
|
||||||
override fun getTempMessagesForConversation(internalConversationId: String): Flow<List<ChatMessageEntity>> =
|
override fun getTempMessagesForConversation(internalConversationId: String): Flow<List<ChatMessageEntity>> =
|
||||||
@ -209,10 +204,6 @@ class DummyConversationDaoImpl : ConversationsDao {
|
|||||||
class DummyChatBlocksDaoImpl : ChatBlocksDao {
|
class DummyChatBlocksDaoImpl : ChatBlocksDao {
|
||||||
override fun deleteChatBlocks(blocks: List<ChatBlockEntity>) { /* */ }
|
override fun deleteChatBlocks(blocks: List<ChatBlockEntity>) { /* */ }
|
||||||
|
|
||||||
// override fun getChatBlocks(
|
|
||||||
// internalConversationId: String
|
|
||||||
// ): Flow<List<ChatBlockEntity>> = flowOf()
|
|
||||||
|
|
||||||
override fun getChatBlocksContainingMessageId(
|
override fun getChatBlocksContainingMessageId(
|
||||||
internalConversationId: String,
|
internalConversationId: String,
|
||||||
threadId: Long?,
|
threadId: Long?,
|
||||||
@ -230,7 +221,5 @@ class DummyChatBlocksDaoImpl : ChatBlocksDao {
|
|||||||
|
|
||||||
override suspend fun upsertChatBlock(chatBlock: ChatBlockEntity) { /* */ }
|
override suspend fun upsertChatBlock(chatBlock: ChatBlockEntity) { /* */ }
|
||||||
|
|
||||||
// override fun clearChatBlocksForUser(pattern: String) { /* */ }
|
|
||||||
|
|
||||||
override fun deleteChatBlocksOlderThan(internalConversationId: String, messageId: Long) { /* */ }
|
override fun deleteChatBlocksOlderThan(internalConversationId: String, messageId: Long) { /* */ }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user