mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-28 20:45:17 +00:00
Fixed merge conflicts
This commit is contained in:
parent
0bc933dcec
commit
c6aefc5fb1
@ -915,10 +915,6 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
|
||||
// show or hide loading indicator
|
||||
binding.loader.isVisible = state.showLoader
|
||||
|
||||
if (state.isMessageRequestAccepted == true) {
|
||||
binding.messageRequestBar.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,10 +41,8 @@ import org.session.libsignal.utilities.AccountId
|
||||
import org.thoughtcrime.securesms.audio.AudioSlidePlayer
|
||||
import org.thoughtcrime.securesms.conversation.v2.menus.ConversationMenuHelper
|
||||
import org.thoughtcrime.securesms.database.GroupDatabase
|
||||
import org.thoughtcrime.securesms.database.ThreadDatabase
|
||||
import org.thoughtcrime.securesms.database.LokiMessageDatabase
|
||||
import org.thoughtcrime.securesms.database.ReactionDatabase
|
||||
import org.thoughtcrime.securesms.database.Storage
|
||||
import org.thoughtcrime.securesms.database.ThreadDatabase
|
||||
import org.thoughtcrime.securesms.database.model.MessageId
|
||||
import org.thoughtcrime.securesms.database.model.MessageRecord
|
||||
|
@ -1219,7 +1219,12 @@ class MmsDatabase(context: Context, databaseHelper: SQLCipherOpenHelper) : Messa
|
||||
var cursor: Cursor? = null
|
||||
try {
|
||||
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"
|
||||
cursor = db.query(
|
||||
TABLE_NAME,
|
||||
|
@ -1779,8 +1779,7 @@ open class Storage @Inject constructor(
|
||||
|
||||
val messageId = if (localId != null && localId > 0 && isMms != null) {
|
||||
// bail early is the message is marked as deleted
|
||||
val messagingDatabase: MessagingDatabase = if (isMms == true) DatabaseComponent.get(context).mmsDatabase()
|
||||
else DatabaseComponent.get(context).smsDatabase()
|
||||
val messagingDatabase: MessagingDatabase = if (isMms == true) mmsDatabase else smsDatabase
|
||||
if(messagingDatabase.getMessageRecord(localId)?.isDeleted == true) return
|
||||
|
||||
MessageId(localId, isMms)
|
||||
|
@ -308,7 +308,7 @@ public class ThreadDatabase extends Database {
|
||||
public void trimThreadBefore(long threadId, long timestamp) {
|
||||
Log.i("ThreadDatabase", "Trimming thread: " + threadId + " before :"+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);
|
||||
notifyConversationListeners(threadId);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user