Fixed merge conflicts

This commit is contained in:
SessionHero01 2024-10-23 15:15:49 +11:00
parent 0bc933dcec
commit c6aefc5fb1
No known key found for this signature in database
5 changed files with 8 additions and 10 deletions

View File

@ -915,10 +915,6 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
// show or hide loading indicator // show or hide loading indicator
binding.loader.isVisible = state.showLoader binding.loader.isVisible = state.showLoader
if (state.isMessageRequestAccepted == true) {
binding.messageRequestBar.visibility = View.GONE
}
} }
} }
} }

View File

@ -41,10 +41,8 @@ import org.session.libsignal.utilities.AccountId
import org.thoughtcrime.securesms.audio.AudioSlidePlayer import org.thoughtcrime.securesms.audio.AudioSlidePlayer
import org.thoughtcrime.securesms.conversation.v2.menus.ConversationMenuHelper import org.thoughtcrime.securesms.conversation.v2.menus.ConversationMenuHelper
import org.thoughtcrime.securesms.database.GroupDatabase import org.thoughtcrime.securesms.database.GroupDatabase
import org.thoughtcrime.securesms.database.ThreadDatabase
import org.thoughtcrime.securesms.database.LokiMessageDatabase import org.thoughtcrime.securesms.database.LokiMessageDatabase
import org.thoughtcrime.securesms.database.ReactionDatabase import org.thoughtcrime.securesms.database.ReactionDatabase
import org.thoughtcrime.securesms.database.Storage
import org.thoughtcrime.securesms.database.ThreadDatabase import org.thoughtcrime.securesms.database.ThreadDatabase
import org.thoughtcrime.securesms.database.model.MessageId import org.thoughtcrime.securesms.database.model.MessageId
import org.thoughtcrime.securesms.database.model.MessageRecord import org.thoughtcrime.securesms.database.model.MessageRecord

View File

@ -1219,7 +1219,12 @@ class MmsDatabase(context: Context, databaseHelper: SQLCipherOpenHelper) : Messa
var cursor: Cursor? = null var cursor: Cursor? = null
try { try {
val db = databaseHelper.readableDatabase val db = databaseHelper.readableDatabase
var where = "$THREAD_ID = ? AND $DATE_SENT < $date" var where =
THREAD_ID + " = ? AND (CASE (" + MESSAGE_BOX + " & " + MmsSmsColumns.Types.BASE_TYPE_MASK + ") "
for (outgoingType in MmsSmsColumns.Types.OUTGOING_MESSAGE_TYPES) {
where += " WHEN $outgoingType THEN $DATE_SENT < $date"
}
where += " ELSE $DATE_RECEIVED < $date END)"
if (onlyMedia) where += " AND $PART_COUNT >= 1" if (onlyMedia) where += " AND $PART_COUNT >= 1"
cursor = db.query( cursor = db.query(
TABLE_NAME, TABLE_NAME,

View File

@ -1779,8 +1779,7 @@ open class Storage @Inject constructor(
val messageId = if (localId != null && localId > 0 && isMms != null) { val messageId = if (localId != null && localId > 0 && isMms != null) {
// bail early is the message is marked as deleted // bail early is the message is marked as deleted
val messagingDatabase: MessagingDatabase = if (isMms == true) DatabaseComponent.get(context).mmsDatabase() val messagingDatabase: MessagingDatabase = if (isMms == true) mmsDatabase else smsDatabase
else DatabaseComponent.get(context).smsDatabase()
if(messagingDatabase.getMessageRecord(localId)?.isDeleted == true) return if(messagingDatabase.getMessageRecord(localId)?.isDeleted == true) return
MessageId(localId, isMms) MessageId(localId, isMms)

View File

@ -308,7 +308,7 @@ public class ThreadDatabase extends Database {
public void trimThreadBefore(long threadId, long timestamp) { public void trimThreadBefore(long threadId, long timestamp) {
Log.i("ThreadDatabase", "Trimming thread: " + threadId + " before :"+timestamp); Log.i("ThreadDatabase", "Trimming thread: " + threadId + " before :"+timestamp);
DatabaseComponent.get(context).smsDatabase().deleteMessagesInThreadBeforeDate(threadId, timestamp); DatabaseComponent.get(context).smsDatabase().deleteMessagesInThreadBeforeDate(threadId, timestamp);
DatabaseComponent.get(context).mmsDatabase().deleteMessagesInThreadBeforeDate(threadId, timestamp); DatabaseComponent.get(context).mmsDatabase().deleteMessagesInThreadBeforeDate(threadId, timestamp, false);
update(threadId, false); update(threadId, false);
notifyConversationListeners(threadId); notifyConversationListeners(threadId);
} }